diff --git a/Agatha.ServiceLayer/Agatha.ServiceLayer.csproj b/Agatha.ServiceLayer/Agatha.ServiceLayer.csproj index 9a2dc20..fc10e06 100644 --- a/Agatha.ServiceLayer/Agatha.ServiceLayer.csproj +++ b/Agatha.ServiceLayer/Agatha.ServiceLayer.csproj @@ -54,8 +54,13 @@ 4 - - ..\packages\Common.Logging.2.0.0\lib\2.0\Common.Logging.dll + + ..\packages\Common.Logging.3.1.0\lib\net40\Common.Logging.dll + True + + + ..\packages\Common.Logging.Core.3.1.0\lib\net40\Common.Logging.Core.dll + True diff --git a/Agatha.ServiceLayer/packages.config b/Agatha.ServiceLayer/packages.config index acc6b75..64f3a48 100644 --- a/Agatha.ServiceLayer/packages.config +++ b/Agatha.ServiceLayer/packages.config @@ -1,4 +1,5 @@  - + + \ No newline at end of file diff --git a/Agatha.Spring/Agatha.Spring.csproj b/Agatha.Spring/Agatha.Spring.csproj index 13d4ddf..9c5fafd 100644 --- a/Agatha.Spring/Agatha.Spring.csproj +++ b/Agatha.Spring/Agatha.Spring.csproj @@ -37,9 +37,17 @@ agatha.snk - - False - ..\packages\Spring.Core.1.3.2\lib\net40\Spring.Core.dll + + ..\packages\Common.Logging.3.1.0\lib\net40\Common.Logging.dll + True + + + ..\packages\Common.Logging.Core.3.1.0\lib\net40\Common.Logging.Core.dll + True + + + ..\packages\Spring.Core.2.0.1\lib\net40\Spring.Core.dll + True diff --git a/Agatha.Spring/packages.config b/Agatha.Spring/packages.config index 0b2640c..8d53d9d 100644 --- a/Agatha.Spring/packages.config +++ b/Agatha.Spring/packages.config @@ -1,5 +1,6 @@  - - + + + \ No newline at end of file diff --git a/Tests/App.config b/Tests/App.config index f621483..34ee38a 100644 --- a/Tests/App.config +++ b/Tests/App.config @@ -1,4 +1,4 @@ - + @@ -8,23 +8,25 @@ - + - + + - - + + + + + + - + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index e542fcc..e7d2028 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,5 +1,6 @@  + Debug AnyCPU @@ -32,6 +33,7 @@ false false true + 90f3efc6 true @@ -59,8 +61,13 @@ False ..\packages\Castle.Windsor.3.0.0.4001\lib\net40\Castle.Windsor.dll - - ..\packages\Common.Logging.2.0.0\lib\2.0\Common.Logging.dll + + ..\packages\Common.Logging.3.1.0\lib\net40\Common.Logging.dll + True + + + ..\packages\Common.Logging.Core.3.1.0\lib\net40\Common.Logging.Core.dll + True ..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll @@ -86,9 +93,9 @@ False ..\libs\rhino.mocks\Rhino.Mocks.dll - - False - ..\packages\Spring.Core.1.3.2\lib\net40\Spring.Core.dll + + ..\packages\Spring.Core.2.0.1\lib\net40\Spring.Core.dll + True False @@ -195,7 +202,9 @@ Designer - + + Designer + @@ -217,7 +226,16 @@ + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + - - - - -

- And this is an example of specifying a hierarchy of contexts. The - hierarchy in this case is only a simple parent->child hierarchy, but - hopefully it illustrates the nesting of context configurations. This - nesting of contexts can be arbitrarily deep, and is one way... child - contexts know about their parent contexts, but parent contexts do not - know how many child contexts they have (if any), or have references - to any such child contexts. -

- - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mark Pollack - Aleksandar Seovic - Rick Evans - - - - - Creates an instance - using the context definitions supplied in a custom - configuration section. - - -

- This instance is - also used to configure the . -

-
- - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - An instance - populated with the object definitions supplied in the configuration - section. - -
- - - Create all child-contexts in the given for the given context. - - The parent context to use - The current configContext - The list of child context elements - - - - Instantiates a new context. - - - - - Gets the context's name specified in the name attribute of the context element. - - The current configContext - The context element - - - - Extracts the context-type from the context element. - If none is specified, returns the parent's type. - - - - - Extracts the case-sensitivity attribute from the context element - - - - - Gets the context specified in the type - attribute of the context element. - - -

- If this attribute is not defined it defaults to the - type. -

-
- - If the context type does not implement the - interface. - -
- - - Returns the array of resources containing object definitions for - this context. - - - - - Returns the array of child contexts for this context. - - - - - The of - created if no type attribute is specified on a context element. - - - - - - Get the context's case-sensitivity to use if none is specified - - -

- Derived handlers may override this property to change their default case-sensitivity. -

-

- Defaults to 'true'. -

-
-
- - - Specifies, whether the instantiated context will be automatically registered in the - global . - - - - - Returns if the context should be lazily - initialized. - - - - - Constants defining the structure and values associated with the - schema for laying out Spring.NET contexts in XML. - - - - - Defines a single - . - - - - - Specifies a context name. - - - - - Specifies if context should be case sensitive or not. Default is true. - - - - - Specifies a . - - -

- Does not have to be fully assembly qualified, but its generally regarded - as better form if the names of one's objects - are specified explicitly. -

-
-
- - - Specifies whether context should be lazy initialized. - - - - - Defines an - - - - - Specifies the URI for an - . - - - - - Provides access to a central registry of - s. - - -

- A singleton implementation to access one or more application contexts. Application - context instances are cached. -

-

Note that the use of this class or similar is unnecessary except (sometimes) for - a small amount of glue code. Excessive usage will lead to code that is more tightly - coupled, and harder to modify or test. Consider refactoring your code to use standard - Dependency Injection techniques or implement the interface IApplicationContextAware to - obtain a reference to an application context.

-
- Mark Pollack - Aleksandar Seovic - -
- - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the ContextRegistry class. - - -

- Explicit static constructor to tell C# compiler - not to mark type as beforefieldinit. -

-
-
- - - Registers an instance of an - . - - -

- This is usually called via a - inside a .NET - application configuration file. -

-
- The application context to be registered. - - If a context has previously been registered using the same name - -
- - - Handles events raised by an application context. - - - - - - - Removes the context from the registry - - - Has no effect if the context wasn't registered - - ´the context to remove from the registry - - - - Returns the root application context. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The root application context. -
- - - Returns context based on specified name. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The context name. - The specified context, or null, if context with that name doesn't exists. - - If the context name is null or empty - -
- - - Removes all registered - s from this - registry. - - - Raises the event while still holding a lock on - - - - - Allows to check, if a context is already registered - - The context name. - true, if the context is already registered. false otherwise - - - - This event is fired, if ContextRegistry.Clear() is called.
- Clients may register to get informed -
- - This event is fired while still holding a lock on the Registry.
- 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used -
-
- - - Gets an object that should be used to synchronize access to ContextRegistry - from the calling code. - - - - - Default implementation of the - interface. - - -

- Provides easy ways to store all the necessary values needed to resolve - messages from an . -

-
- Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Describes objects that are suitable for message resolution in a - . - - -

- Spring.NET's own validation error classes implement this interface. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - -

- The last code will therefore be the default one. -

-
- - A array of codes which are associated - with this message. - -
- - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - Creates a new instance of the - class - using a single code. - - The message code to be resolved. - - - - Initializes a new instance of the class. - - The codes to be used to resolve this message - - - - Creates a new instance of the - class - using multiple codes. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - - - Creates a new instance of the - class - using multiple codes and a default message. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - The default message used if no code could be resolved. - - - - - Creates a new instance of the - class - from another resolvable. - - -

- This is the copy constructor for the - class. -

-
- - The to be copied. - - - If the supplied is . - -
- - - Returns a representation of this - . - - - A representation of this - . - - - - - Calls the visit method on the supplied - to output a version of this class. - - The visitor to use. - - A representation of this - . - - - - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - - A array of codes which are associated - with this message. - - - - - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - - Return the default code for this resolvable. - - - The default code of this resolvable; this will be the last code in - the codes array, or if this instance has no - codes. - - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - - Default section handler that can handle any configuration section. - - -

- Simply returns the configuration section as an . -

-
- Aleksandar Seovic -
- - - Returns the configuration section as an - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is a null reference. - - - The for the section. - - Config section as XmlElement. - - - - Empty implementation that - simply delegates all method calls to it's parent - . - - -

- If no parent is available, - no messages will be resolved (and a - will be thrown). -

-

- Used as placeholder by the - class, - if the context definition doesn't define its own - . Not intended for direct use - in applications. -

-
- Juergan Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - - Generic ApplicationContext implementation that holds a single internal - instance and does not - assume a specific object definition format. - - - Implements the interface in order - to allow for aplying any object definition readers to it. - Typical usage is to register a variety of object definitions via the - interface and then call - to initialize those - objects with application context semantics (handling - , auto-detecting - ObjectFactoryPostProcessors, etc). - - In contrast to other IApplicationContext implementations that create a new internal - IObjectFactory instance for each refresh, the internal IObjectFactory of this context - is available right from the start, to be able to register object definitions on it. - may only be called once - Usage examples - - GenericApplicationContext ctx = new GenericApplicationContext(); - // register your objects and object definitions - ctx.RegisterObjectDefinition(...) - ctx.Refresh(); - - - Mark Pollack - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true names in the context are case sensitive. - - - - Initializes a new instance of the class. - - The object factory instance to use for this context. - - - - Initializes a new instance of the class. - - The parent application context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - - - - Initializes a new instance of the class. - - The object factory to use for this context - The parent applicaiton context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - The object factory to use for this context - - - - Do nothing operation. We hold a single internal ObjectFactory and rely on callers - to register objects throug our public methods (or the ObjectFactory's). - - - In the case of errors encountered while refreshing the object factory. - - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - - - - Return the internal object factory of this application context. - - - - - - Gets the underlying object factory of this context, available for - registering object definitions. - - You need to call Refresh to initialize the - objects factory and its contained objects with application context - semantics (autodecting IObjectFactoryPostProcessors, etc). - The internal object factory (as DefaultListableObjectFactory). - - - - Helper class for easy access to messages from an - , providing various - overloaded GetMessage methods. - - -

- Available from - , but also - reusable as a standalone helper to delegate to in application objects. -

-
- Juergen Hoeller - Griffin Caprio (.NET) - - -
- - - Creates a new instance of the - class - that uses the current - for all locale specific lookups. - - - The to use to locate messages. - - - - - Creates a new instance of the - class - - - The to use to locate - messages. - - - The to use for - locale specific messages. - - - - - Retrieve the message for the given code and the default - . - - The code of the message. - The message. - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - The message. - - - - Retrieve the message for the given code and the default - . - - The code of the message. - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - . - - - The . - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - in the given - . - - - The . - - - The to use for - lookups. - - The message - - If the message could not be found. - - - - - Visitor class to represent - instances. - - -

- Used in the first instance to supply stringified versions of - instances. -

-

- Other methods can be added here to return different representations, - including XML, CSV, etc.. -

-
- Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - - - Outputs the supplied - as a nicely formatted . - - - The to output. - - - - - Configuration section handler for the (recommended, Spring.NET standard) parsers - config section. - - -

- Spring.NET allows the registration of custom configuration parsers that - can be used to create simplified configuration schemas that better - describe object definitions. -

-

- For example, Spring.NET uses this facility internally in order to - define simplified schemas for various AOP, Data and Services definitions. -

-
- -

- The following example shows how to configure both this section handler - and how to define custom configuration parsers within a Spring.NET - config section. -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Registers parsers specified in the (recommended, Spring.NET standard) - parsers config section with the . - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because parsers - are registered as a side-effect of this object's execution and there - is thus no need to return anything. - - - - - An that doesn't do a whole lot. - - -

- is an implementation of - the NullObject pattern. It should be used in those situations where a - needs to be passed (say to a - method) but where the resolution of messages is not required. -

-

- There should not (typically) be a need to instantiate instances of this class; - does not maintan any state - and the instance is - thus safe to pass around. -

-
- Aleksandar Seovic -
- - - The canonical instance of the - class. - - - - - Creates a new instance of the class. - - -

- Consider using - instead. -

-
-
- - - Simply returns the supplied message as-is. - - The code of the message to resolve. - - The to resolve the - code for. - - - The supplied message as-is. - - - - - Always returns . - - The code of the object to resolve. - - The to resolve the - code for. - - - (always). - - - - - Does nothing. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Handler for Spring.NET resourceHandlers config section. - - -

- Spring allows registration of custom resource handlers that can be used to load - object definitions from. -

-

- For example, if you wanted to store your object definitions in a database instead - of in the config file, you could write a custom implementation - and register it with Spring using 'db' as a protocol name. -

-

- Afterwards, you would simply specify resource URI within the context config element - using your custom resource handler. -

-
- -

- The following example shows how to configure both this section handler, - how to define custom resource within Spring config section, and how to load - object definitions using custom resource handler: -

- - - - -
- - - - - - - - - - - - - - Aleksandar Seovic - - - - - Registers resource handlers that are specified in - the resources config section with the . - - - The configuration settings in a corresponding parent - configuration section. Ignored. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns null, because resource handlers are registered - as a sideffect of its execution and there is no need to return anything. - - - - - An implementation that - accesses resources from .resx / .resource files. - - Note that for the method - GetResourceObject if the resource name resolves to null, then in - .NET 1.1 the return value will be String.Empty whereas - in .NET 2.0 it will return null. - Griffin Caprio (.NET) - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - - - - Defines a simple initialization callback for objects that need to to some - post-initialization logic after all of their dependencies have been injected. - - -

- An implementation of the - - method might perform some additional custom initialization (over and above that - performed by the constructor), or merely check that all mandatory properties - have been set (this last example is a very typical use case of this interface). -

- - The use of the - interface - by non-Spring.NET framework code can be avoided (and is generally - discouraged). The Spring.NET container provides support for a generic - initialization method given to the object definition in the object - configuration store (be it XML, or a database, etc). This requires - slightly more configuration (one attribute-value pair in the case of - XML configuration), but removes any dependency on Spring.NET from the - class definition. - -
- Rod Johnson - Rick Evans (.NET) - -
- - - 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. - -
- - - Creates a new instance of the - class. - - - - - Resolves a given code by searching through each assembly name in - the base names array. - - The code to resolve. - - The to use for lookups. - - The message from the resource set. - - - - Resolves a given code by searching through each assembly name in the array. - - The code to resolve. - - The to use for lookups. - - The object from the resource set. - - - - Uses a System.ComponentModel.ComponentResourceManager - to apply resources to object properties. - Resource key names are of the form objectName.propertyName - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - An object that contains the property values to be applied. - - - The base name of the object to use for the key lookup. - - - The to use for lookups. - If , uses the - value. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - - - Resolves a code into an object given a base name. - - The to search. - The code to resolve. - - The to use for lookups. - - The object from the resource file. - - - - Returns a representation of the - . - - A representation of the - . - - - - Invoked by an - after it has set all object properties supplied. - - -

- The list may contain objects of type or - . types - are converted to instances using the notation - resourcename, assembly partial name. -

-
- - If the conversion from a to a - can't be performed. - -
- - - The collection of s - in this . - - - - - that allows concrete registration of - objects and messages in code, rather than from external configuration sources. - - -

- Mainly useful for testing. -

-
- Rod Johnson - Griffin Caprio (.NET) -
- - - Creates a new instance of the StaticApplicationContext class. - - - - - Creates a new instance of the StaticApplicationContext class. - - The parent application context. - - - - Creates a new, named instance of the StaticApplicationContext class. - - the context name - The parent application context. - - - - Do nothing: we rely on callers to update our public methods. - - - - - Register a singleton object with the default object factory. - - The name of the object. - The of the object. - The property values for the singleton instance. - - - - Registers a prototype object with the default object factory. - - The name of the prototype object. - The of the prototype object. - The property values for the prototype instance. - - - - Associate the given message with the given code. - - The lookup code. - - The that the message should be found within. - - The message associated with the lookup code. - - - - Simple implementation of - that allows messages to be held in an object and added programmatically. - - -

- Mainly useful for testing. -

-

- This supports internationalization. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Creates a new instance of the - class. - - - - - Returns a format string. - - The code of the message to resolve. - - The to resolve the - code for. - - - A format string or if not found. - - - - - - Resolves an object (typically an icon or bitmap). - - The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - - - - - - Applies resources to object properties. - - -

- Uses a System.ComponentModel.ComponentResourceManager - internally to apply resources to object properties. Resource key - names are of the form objectName.propertyName. -

-

- This feature is not currently supported on version 1.0 of the .NET platform. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - -
- - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The message format associated with this lookup code. - - - - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The object associated with this lookup code. - - - - - Returns a representation of this - message source. - - - A containing all of this message - source's messages. - - - - - Configuration section handler for the Spring.NET typeAliases - config section. - - -

- Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

-

- This includes type names specified within an object definition, as well - as values of the properties or constructor arguments that expect - instances. -

-
- -

- The following example shows how to configure both this section handler and - how to define type aliases within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeAliases config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of this - object's execution and thus there is no need to return anything. - - - - - Configuration section handler for the Spring.NET typeConverters - config section. - - -

- Type converters are used to convert objects from one type into another - when injecting property values, evaluating expressions, performing data - binding, etc. -

-

- They are a very powerful mechanism as they allow Spring.NET to automatically - convert string-based property values from the configuration file into the appropriate - type based on the target property's type or to convert string values submitted - via a web form into a type that is used by your data model when Spring.NET data - binding is used. Because they offer such tremendous help, you should always provide - a type converter implementation for your custom types that you want to be able to use - for injected properties or for data binding. -

-

- The standard .NET mechanism for specifying type converter for a particular type is - to decorate the type with a , passing the type - of the -derived class as a parameter. -

-

- This mechanism will still work and is a preferred way of defining type converters if - you control the source code for the type that you want to define a converter for. However, - this configuration section allows you to specify converters for the types that you don't - control and it also allows you to override some of the standard type converters, such as - the ones that are defined for some of the types in the .NET Base Class Library. -

-
- -

- The following example shows how to configure both this section handler and - how to define type converters within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeConverters config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of - its execution and thus there is no need to return anything. - - - - - An implementation that - reads context definitions from XML based resources. - - -

- Currently, the resources that are supported are the file, - http, ftp, config and assembly resource - types. -

-

- You can provide custom implementations of the - interface and and register them - with any that inherits - from the - - interface. -

- - In case of multiple config locations, later object definitions will - override ones defined in previously loaded resources. This can be - leveraged to deliberately override certain object definitions via an - extra XML file. - -
- -

- Find below some examples of instantiating an - using a - variety of different XML resources. -

- - // an XmlApplicationContext that reads its object definitions from an - // XML file that has been embedded in an assembly... - IApplicationContext context = new XmlApplicationContext - ( - "assembly://AssemblyName/NameSpace/ResourceName" - ); - - // an XmlApplicationContext that reads its object definitions from a - // number of disparate XML resources... - IApplicationContext context = new XmlApplicationContext - ( - // from an XML file that has been embedded in an assembly... - "assembly://AssemblyName/NameSpace/ResourceName", - // and from a (relative) filesystem-based resource... - "file://Objects/services.xml", - // and from an App.config / Web.config resource... - "config://spring/objects" - ); - -
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - -
- - - Initializes a new instance of the XmlApplicationContext class. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The created context will be case sensitive. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - This constructor is meant to be used by derived classes. By passing =false, it is - the responsibility of the deriving class to call to initialize the context instance. - - if true, is called automatically. - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - An array of resource locations, referring to the XML object - definition files with which this context is to be built. - - - An array of resource locations, or if none. - - - - - - An array of resources instances with which this context is to be built. - - - An array of s, or if none. - - - - - - Encapsulates arguments to the class. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - - - - Initializes a new instance of the XmlApplicationContextArgs class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - if set to true [case sensitive]. - if set to true [refresh]. - - - Exception thrown during application context initialization. - Rod Johnson - Mark Pollack (.NET) - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Marks an interface as being an application event listener. - - Griffin Caprio - - - - - Creates a new instance of the - class. - - - - - The callback for application events. - - - - - To be implemented by any object that wishes to be notified - of the associated with it. - - -

- In the current implementation, the - will typically be the - associated that - spawned the implementing object. -

-

- The can usually also be - passed on as an object reference to arbitrary object properties or - constructor arguments, because a - is typically defined as an - object with the well known name "messageSource" in the - associated application context. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Sets the associated - with this object. - - -

- Invoked after population of normal object properties but - before an initializing callback such as the - - method of the - interface - or a custom init-method. -

-

- It is also invoked before the - - property of any - - implementation. -

-
- - The associated - with this object. - -
- - - Interface to be implemented by any object that wishes to be notified - of the (typically the - ) that it runs in. - - -

- Note that dependencies can also - be exposed as object properties of type - , populated via strings with - automatic type conversion by the object factory. This obviates the - need for implementing any callback interface just for the purpose of - accessing a specific resource. -

-

- You typically need an - when your application object has to access a variety of file resources - whose names are calculated. A good strategy is to make the object use - a default resource loader but still implement the - interface to allow - for overriding when running in an - . -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Sets the - that this object runs in. - - -

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

-
-
- - - Thrown when a message cannot be resolved. - - Rod Johnson - Mark Pollack (.NET) - - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class with the - specified message. - - - 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. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for given culture. - - - The that was used - to search for the code. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for the current UI culture. - - - - - Convenience base class for - implementations, pre-implementing typical behavior. - - -

- The method will - check whether a or - can be opened; - will always return - ; - and - throw an exception; - and will - return the value of the - property. -

-
- Juergen Hoeller - Rick Evans (.NET) - Aleksandar Seovic (.NET) - -
- - - The central abstraction for Spring.NET's access to resources such as - s. - - -

- This interface encapsulates a resource descriptor that abstracts away - from the underlying type of resource; possible resource types include - files, memory streams, and databases (this list is not exhaustive). -

-

- A can definitely be opened and accessed - for every such resource; if the resource exists in a physical form (for - example, the resource is not an in-memory stream or one that has been - extracted from an assembly or ZIP file), a or - can also be accessed. The actual - behavior is implementation-specific. -

-

- This interface, when used in tandem with the - interface, forms the backbone of - Spring.NET's resource handling. Third party extensions or libraries - that want to integrate external resources with Spring.NET's IoC - container are encouraged expose such resources via this abstraction. -

-

- Interfaces cannot obviously mandate implementation, but derived classes - are strongly encouraged to expose a constructor that takes a - single as it's sole argument (see example). - Exposing such a constructor will make your custom - implementation integrate nicely - with the class. -

-
- Juergen Hoeller - Rick Evans (.NET) - - -
- - - Simple interface for objects that are sources for - s. - - -

- This is the base interface for the abstraction encapsulated by - Spring.NET's interface. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Return an for this resource. - - - - Clients of this interface must be aware that every access of this - property will create a fresh ; - it is the responsibility of the calling code to close any such - . - - - - An . - - - If the stream could not be opened. - - - - - Creates a resource relative to this resource. - - - The path (always resolved as relative to this resource). - - - The relative resource. - - - If the relative resource could not be created from the supplied - path. - - - If the resource does not support the notion of a relative path. - - - - - Does this resource represent a handle with an open stream? - - -

- If , the - cannot be read multiple times, and must be read and then closed to - avoid resource leaks. -

-

- Will be for all usual resource descriptors. -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - -
- - - Returns a handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available on a filesystem, or cannot be - exposed as a handle. - - - -
- - - Returns a description for this resource. - - -

- The description is typically used for diagnostics and other such - logging when working with the resource. -

-

- Implementations are also encouraged to return this value from their - method. -

-
- - A description for this resource. - -
- - - Does this resource actually exist in physical form? - - -

- An example of a resource that physically exists would be a - file on a local filesystem. An example of a resource that does not - physically exist would be an in-memory stream. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - The default special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - A string representation of the resource. - - - If the supplied is - or contains only whitespace character(s). - -
- - - Strips any protocol name from the supplied - . - - -

- If the supplied does not - have any protocol associated with it, then the supplied - will be returned as-is. -

-
- - - GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); - // returns www.mycompany.com/resource.txt - - - - The name of the resource. - - - The name of the resource without the protocol name. - -
- - - Resolves the supplied to its value - sans any leading protocol. - - - The name of the resource. - - - The name of the resource without the protocol name. - - - - - - Resolves the presence of the - value - in the supplied into a path. - - -

- The default implementation simply returns the supplied - as is. -

-
- - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - -
- - - This implementation returns the - of this resource. - - - - - - Determines whether the specified is - equal to the current . - - -

- This implementation compares values. -

-
- -
- - - Serves as a hash function for a particular type, suitable for use - in hashing algorithms and data structures like a hash table. - - -

- This implementation returns the hashcode of the - property. -

-
- -
- - - Factory Method. Create a new instance of the current resource type using the given resourceName - - - - - The ResourceLoader to be used for resolving relative resources - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Creates a new resource that is relative to this resource based on the - supplied . - - -

- This method can accept either a fully qualified resource name or a - relative resource name as it's parameter. -

-

- A fully qualified resource is one that has a protocol prefix and - all elements of the resource name. All other resources are treated - as relative to this resource, and the following rules are used to - locate a relative resource: -

- - - If the starts with '..', - the current resource path is navigated backwards before the - is concatenated to the current - of - this resource. - - - If the starts with '/', the - current resource path is ignored and a new resource name is - appended to the - of - this resource. - - - If the starts with '.' or a - letter, a new path is appended to the current - of - this resource. - - -
- - The name of the resource to create. - - The relative resource. - - If the process of resolving the relative resource yielded an - invalid URI. - - - If this resource does not support the resolution of relative - resources (as determined by the value of the - - property). - - -
- - - Calculates a new resource path based on the supplied - . - - - The relative path to evaluate. - - The newly calculated resource path. - - - - The special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
- -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the protocol associated with this resource (if any). - - -

- The value of this property may be if no - protocol is associated with the resource type (for example if the - resource is a memory stream). -

-
- - The protocol associated with this resource (if any). - -
- - - Does this resource represent a handle with an open stream? - - -

- This, the default implementation, always returns - . -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - -

- This, the default implementation, always throws a - , assuming that the - resource cannot be exposed as a . -

-
- - The handle for this resource. - - - This, the default implementation, always throws a - . - - -
- - - Returns a handle for this resource. - - -

- This, the default implementation, always throws a - , assuming that the - resource cannot be resolved to an absolute file path. -

-
- - The handle for this resource. - - - This implementation always throws a - . - - - -
- - - Does this resource actually exist in physical form? - - -

- This implementation checks whether a - can be opened, falling back to whether a - can be opened. -

-

- This will cover both directories and content resources. -

-

- This implementation will also return if - permission to the (file's) path is denied. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - Does this support relative - resource retrieval? - - -

- This property is generally to be consulted prior to attempting - to attempting to access a resource that is relative to this - resource (via a call to - ). -

-

- This, the default implementation, always returns - . -

-
- - if this - supports relative resource - retrieval. - -
- - - Gets the root location of the resource. - - -

- Where root resource can be taken to mean that part of the resource - descriptor that doesn't change when a relative resource is looked - up. Examples of such a root location would include a drive letter, - a web server name, an assembly name, etc. -

-
- - The root location of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets the current path of the resource. - - -

- An example value of this property would be the name of the - directory containing a filesystem based resource. -

-
- - The current path of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets those characters that are valid path separators for the - resource type. - - -

- An example value of this property would be the - and - values for a - filesystem based resource. -

-

- Any derived classes that override this method are expected to - return a new array for each access of this property. -

-
- - Those characters that are valid path separators for the resource - type. - - - This, the default implementation, always throws a - . - -
- - - An implementation for - resources stored within assemblies. - - -

- This implementation expects any resource name passed to the - constructor to adhere to the following format: -

-

- assembly://assemblyName/namespace/resourceName -

-
- Aleksandar Seovic (.NET) - Federico Spinazzi (.NET) -
- - - Creates a new instance of the - class. - - - The name of the assembly resource. - - - If the supplied did not conform - to the expected format. - - - If the assembly specified in the supplied - was loaded twice with two - different evidences. - - - If the assembly specified in the supplied - could not be found. - - - If the caller does not have the required permission to load - the assembly specified in the supplied - . - - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the caller does not have the required permission to load - the underlying assembly's manifest. - - - - - - - Does the embedded resource specified in the value passed to the - constructor exist? - - - if this resource actually exists in physical - form (for example on a filesystem). - - - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (the assembly name in this - case). - - - The root location of the resource. - - - - - - Gets the current path of the resource (the namespace in which the - target resource was embedded in this case). - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - - - - Used when retrieving information from the standard .NET configuration - files (App.config / Web.config). - - -

- If created with the name of a configuration section, then all methods - aside from the description return , - , or throw an exception. If created with an - , then the - property - will return a corresponding to parse. -

-
- Mark Pollack - Rick Evans -
- - - Creates new instance of the - class. - - - The actual XML configuration section. - - - If the supplied is . - - - - - Creates new instance of the - class. - - - The name of the configuration section. - - - If the supplied is - or contains only whitespace character(s). - - - - - Returns the handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a description for this resource (the name of the - configuration section in this case). - - - A description for this resource. - - - - - - Does this resource actually exist in physical form? - - -

- This implementation always returns . -

-
- - - - - -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Exposes the actual for the - configuration section. - - -

- Introduced to accomodate line info tracking during parsing. -

-
-
- - - Holder that combines with a specific encoding to be used for reading - from the resource - - Juergen Hoeller - Erich Eichinger (.NET) - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - the resource to read from. Must not be null - whether to autoDetect encoding from byte-order marks () - - - - Create an encoded resource using the specified encoding. - - the resource to read from. Must not be null - the encoding to use. If null, encoding will be autodetected. - whether to autoDetect encoding from byte-order marks () - - - - - - - - - - Determine whether equals this instance. - - - true if obj is an and both - , and are equal. - - - - - Calculate the unique hash code for this instance. - - - - - - Get a textual description of the resource. - - - - - Get the underlying resource - - - - - Get the encoding to use for reading, if any. May be null - - - - - whether to autoDetect encoding from byte-order marks () - - - - - A backed resource. - - -

- Supports resolution as both a and a - . -

-

- Also supports the use of the ~ character. If the ~ character - is the first character in a resource path (sans protocol), the ~ - character will be replaced with the value of the - System.AppDomain.CurrentDomain.BaseDirectory property (an example of - this can be seen in the examples below). -

-
- -

- Consider the example of an application that is running (has been launched - from) the C:\App\ directory. The following resource paths will map - to the following resources on the filesystem... -

- - strings.txt C:\App\strings.txt - ~/strings.txt C:\App\strings.txt - file://~/strings.txt C:\App\strings.txt - file://~/../strings.txt C:\strings.txt - ../strings.txt C:\strings.txt - ~/../strings.txt C:\strings.txt - - // note that only a leading ~ character is resolved to the executing directory... - stri~ngs.txt C:\App\stri~ngs.txt - -
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - If the supplied is - or contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - Supresses initialization of this instance. Used from derived classes. - - - If the supplied is - or contains only whitespace character(s). - - - - - Initializes this instance. - - - - - - Resolves the handle - for the supplied . - - - The name of the file system resource. - - - The handle for this resource. - - - - - Resolves the root location for the supplied . - - - The name of the file system resource. - - - The root location of the resource. - - - - - Resolves the path for the supplied . - - - The name of the file system resource. - - - The current path of the resource. - - - - - Resolves the presence of the - value - in the supplied into a path. - - - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the underlying handle for - this resource. - - - The handle for this resource. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (a drive or UNC file share - name in this case). - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the underlying file could not be found. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - adapter implementation for a - . - - -

- Should only be used if no other - implementation is applicable. -

-

- In contrast to other - implementations, this is an adapter for an already opened - resource - the - therefore always returns . Do not use this class - if you need to keep the resource descriptor somewhere, or if you need - to read a stream multiple times. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The input to use. - - - Where the input comes from. - - - If the supplied is - . - - - - - The input to use. - - - If the underlying has already - been read. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Custom type converter for instances. - - -

- A resource path may contain placeholder variables of the form ${...} - that will be expended to environment variables. -

-

- Currently only supports conversion from a - instance. -

-
- -

- On Win9x boxes, this resource path, ${userprofile}\objects.xml will - be expanded at runtime with the value of the 'userprofile' environment - variable substituted for the '${userprofile}' portion of the path. -

- - // assuming a user called Rick, running on a plain vanilla Windows XP setup... - // this resource path... - - ${userprofile}\objects.xml - - // will become (after expansion)... - - C:\Documents and Settings\Rick\objects.xml - -
- Mark Pollack - - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified resourceLoader. - - the underlying IResourceLoader to be used to resolve resources - - - - Returns whether this converter can convert an object of one - to a - - - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - - - - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An if successful. - - - If the resource name objectained form the supplied - is malformed. - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - Resolve the given path, replacing placeholder values with - corresponding property values if necessary. - - -

- This implementation resolves environment variables only. -

-
- The original resource path. - The resolved resource path. -
- - - Return the used to - resolve the string. - - - The used to resolve - the string. - - - - - Registry class that allows users to register and retrieve protocol handlers. - - - - Resource handler is an implementation of interface - that should be used to process resources with the specified protocol. - - - They are used throughout the framework to access resources from various - sources. For example, application context loads object definitions from the resources - that are processed using one of the registered resource handlers. - - Following resource handlers are registered by default: - - - Protocol - Handler Type - Description - - - config - - Resolves the resources by loading specified configuration section from the standard .NET config file. - - - file - - Resolves filesystem resources. - - - http - - Resolves remote web resources. - - - https - - Resolves remote web resources via HTTPS. - - - ftp - - Resolves ftp resources. - - - assembly - - Resolves resources that are embedded into an assembly. - - - web - Spring.Core.IO.WebResource, Spring.Web* - Resolves resources relative to the web application's virtual directory. - - - * only available in web applications. - - Users can create and register their own protocol handlers by implementing interface - and mapping custom protocol name to that implementation. See for details - on how to register custom protocol handler. - - - Aleksandar Seovic - - - - Name of the .Net config section that contains definitions - for custom resource handlers. - - - - - Registers standard and user-configured resource handlers. - - - - - Returns resource handler for the specified protocol name. - - - - This method returns object that should be used - to create an instance of the -derived type by passing - resource location as a parameter. - - - Name of the protocol to get the handler for. - Resource handler constructor for the specified protocol name. - If is null. - - - - Returns true if a handler is registered for the specified protocol, - false otherwise. - - Name of the protocol. - - true if a handler is registered for the specified protocol, false otherwise. - - If is null. - - - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The type name of the concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - A adapter implementation encapsulating a simple string. - - Erich Eichinger - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Get the to - for accessing this resource. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Gets the encoding used to create a byte stream of the string. - - - - - Gets the content encapsulated by this . - - - - - A backed resource - on top of - - -

- Obviously supports resolution as a , and also - as a in the case of the "file:" - protocol. -

-
- -

- Some examples of the strings that can be used to initialize a new - instance of the class - include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) - - - -
- - - Creates a new instance of the - class. - - -

- Some examples of the values that the - can typically be expected to hold include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- - A string representation of the resource. - -
- - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the instance - used for the resource resolution. - - - A instance. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - Returns a handle for this resource. - - - The handle for this resource. - - - If the resource is not available on a filesystem. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource. - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Converts string representation of a credential for Web client authentication - into an instance of . - - -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. -

- - - - - - -
- Bruno Baia -
- - - Can we convert from the sourcetype - to a instance ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A instance if successful. - - - - - A custom for any - primitive numeric type such as , - , , etc. - - -

- Can use a given for - (locale-specific) parsing and rendering. -

-

- This is not meant to be used as a system - but rather as a - locale-specific number converter within custom controller code, to - parse user-entered number strings into number properties of objects, - and render them in a UI form. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The primitive numeric to convert to. - - - The to use for - (locale-specific) parsing and rendering - - - Is an empty string allowed to be converted? If - , an empty string value will be converted to - numeric 0. - - Id the supplied is not a primitive - . - - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - -
- - - Converts the specified object (a string) to the required primitive - type. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - A primitive representation of the string value. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Custom implementation for - objects. - - -

- Handles conversion from an XML formatted string to a - object - (see below for an example of the expected XML format). -

-

- This converter must be registered before it will be available. Standard - converters in this namespace are automatically registered by the - class. -

-
- -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. Note that the name of the top level - (document) element is quite arbitrary... it is only the content that - matters (and which must be in the format - <add key="..." value="..."/>. For your continued sanity - though, you may wish to standardize on the top level name of - 'dictionary' (although you are of course free to not do so). -

- - - - - - -

- The following example uses a different top level (document) element - name, but is equivalent to the first example. -

- - - - - - -
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from an - XML formatted instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - - - - Converts string representation of a regular expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts string representation of the registry key - into instance. - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Generates partial registry key name. - - - Key elements. - - - Index of the last element to use. - - - Friendly key name containing key element from - 0 to , inclusive. - - - - - Returns for the specified - root hive name. - - - Root hive name. - - - Registry key for the specified name. - - - - - Converts a two part string, (resource name, assembly name) - to a ResourceManager instance. - - - - - This constant represents the name of the folder/assembly containing global resources. - - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - If the specified does not denote a valid resource - - - - Converter for from a comma separated - list of RBG values. - - -

- Please note that this class does not implement converting - to a comma separated list of RBG values from a - . -

-
- Federico Spinazzi -
- - - Returns whether this converter can convert an object of one - to a - . - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Converts the specified object (a string) a - instance. - - - A - that provides a format context. - - - The to use - as the current culture: currently ignored. - - - The value that is to be converted, in "R,G,B", "A,R,G,B", or - symbolic color name (). - - - A representation of the string value. - - - If the input string is not in a supported format, or is not one of the - predefined system colors (). - - - - - A custom for - runtime type references. - - -

- Currently only supports conversion to and from a - . -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to the - of this converter. - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Returns whether this converter can convert the object to the specified - . - - - A - that provides a format context. - - - A that represents the - you want to convert to. - - True if the conversion is possible. - - - - Converts the given value to the type of this converter. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An that represents the converted value. - - - - - Converts the given value object to the specified type, - using the specified context and culture information. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - The to convert the - parameter to. - - - An that represents the converted value. - - - - - Converter for to directly set a - property. - - Jurgen Hoeller - Mark Pollack (.NET) - - - - Create a new StreamConverter using the default - . - - - - - Create a new StreamConverter using the given - . - - - The to use. - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts a separated to a - array. - - -

- Defaults to using the , (comma) as the list separator. Note that the value - of the current is - not used. -

-

- If you want to provide your own list separator, you can set the value of the - - property to the value that you want. Please note that this value will be used - for all future conversions in preference to the default list separator. -

-

- Please note that the individual elements of a string will be passed - through as is (i.e. no conversion or trimming of surrounding - whitespace will be performed). -

-

- This should be - automatically registered with any - implementations. -

-
- - - public class StringArrayConverterExample - { - public static void Main() - { - StringArrayConverter converter = new StringArrayConverter(); - - string csvWords = "This,Is,It"; - string[] frankBoothWords = converter.ConvertFrom(csvWords); - // the 'frankBoothWords' array will have 3 elements, namely - // "This", "Is", "It". - - // please note that extraneous whitespace is NOT trimmed off - // in the current implementation... - string csv = " Cogito ,ergo ,sum "; - string[] descartesWords = converter.ConvertFrom(csv); - - // the 'descartesWords' array will have 3 elements, namely - // " Cogito ", "ergo ", "sum ". - // notice how the whitespace has NOT been trimmed. - } - } - - - -
- - - Can we convert from a the sourcetype to a array? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to a - array. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - The value that will be used as the list separator when performing - conversions. - - - A 'single' string character that will be used as the list separator - when performing conversions. - - - If the supplied value is not and is an empty - string, or has more than one character. - - - - - Nullable TimeSpan - - - Can be replaced with a TimeSpan? in .NET 2 - - - - - ctor without Value; - - - - - ctor with Value - - - - - - HasValue - - - - - Value if HasValue==true - - - - - Base parser for custom specifiers. - - - - - Convert int value to a Timespan based on the specifier - - - - - - - Check if the string contains the specifier and - - - - - - - Specifier - - - - - Recognize 10d as ten days - - - - - Parse value as days - - Timespan in days - - - - - Day specifier: d - - - - - Recognize 10h as ten hours - - - - - Parse value as hours - - Timespan in hours - - - - - Hour specifier: h - - - - - Recognize 10m as ten minutes - - - - - Parse value as minutes - - Timespan in minutes - - - - - Minute specifier: m - - - - - Recognize 10s as ten seconds - - - - - Parse value as seconds - - Timespan in seconds - - - - - Second specifier: s - - - - - Recognize 10ms as ten milliseconds - - - - - Parse value as milliseconds - - Timespan in milliseconds - - - - - Millisecond specifier: ms - - - - - Converter for instances. - - Bruno Baia - Roberto Paterlini - - - - Creates a new instance of the - class. - - - - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Utility methods that are used to convert objects from one type into another. - - Aleksandar Seovic - - - - Convert the value to the required (if necessary from a string). - - The proposed change value. - - The we must convert to. - - Property name, used for error reporting purposes... - - If there is an internal error. - - The new value, possibly the result of type conversion. - - - - Utility method to create a property change event. - - - The full name of the property that has changed. - - The property old value - The property new value - - A new . - - - - - Registry class that allows users to register and retrieve type converters. - - Aleksandar Seovic - - - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - Registers standard and configured type converters. - - - - - Returns for the specified type. - - Type to get the converter for. - a type converter for the specified type. - If is null. - - - - Registers for the specified type. - - Type to register the converter for. - Type converter to register. - If either of arguments is null. - - - - Registers for the specified type. - - - This is a convinience method that accepts the names of both - type to register converter for and the converter itself, - resolves them using , creates an - instance of type converter and calls overloaded - method. - - Type name of the type to register the converter for (can be a type alias). - Type name of the type converter to register (can be a type alias). - If either of arguments is null or empty string. - - If either of arguments fails to resolve to a valid . - - - If type converter does not derive from or if it cannot be instantiated. - - - - - Converts between instances of and their string representations. - - Erich Eichinger - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A that provides a format context. - - - A that represents the you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful, otherwise. - - The conversion cannot be performed. - - - - Returns whether this converter can convert the object to the specified type, using the specified context. - - An that provides a format context. - A that represents the type you want to convert to. - - true if this converter can perform the conversion; otherwise, false. - - - At the moment only conversion to string is supported. - - - - - Converts the given value object to the specified type, using the specified context and culture information. - - - - An that represents the converted value. - - - A . If null is passed, the current culture is assumed. - An that provides a format context. - The to convert the value parameter to. - The to convert. - The conversion cannot be performed. - The destinationType parameter is null. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Resolves (instantiates) a by it's (possibly - assembly qualified) name, and caches the - instance against the type name. - - Rick Evans - Bruno Baia - Erich Eichinger - - - - Resolves a by name. - - -

- The rationale behind the creation of this interface is to centralise - the resolution of type names to instances - beyond that offered by the plain vanilla - method call. -

-
- Rick Evans -
- - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - The cache, mapping type names ( instances) against - instances. - - - - - Creates a new instance of the class. - - - The that this instance will delegate - actual resolution to if a - cannot be found in this instance's cache. - - - If the supplied is . - - - - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holds data about a and it's - attendant . - - - - - The string that separates a name - from the name of it's attendant - in an assembly qualified type name. - - - - - Creates a new instance of the TypeAssemblyHolder class. - - - The unresolved name of a . - - - - - The (unresolved) type name portion of the original type name. - - - - - The (unresolved, possibly partial) name of the attandant assembly. - - - - - Is the type name being resolved assembly qualified? - - - - - Provides access to a central registry of aliased s. - - -

- Simplifies configuration by allowing aliases to be used instead of - fully qualified type names. -

-

- Comes 'pre-loaded' with a number of convenience alias' for the more - common types; an example would be the 'int' (or 'Integer' - for Visual Basic.NET developers) alias for the - type. -

-
- Aleksandar Seovic - -
- - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - The alias around the 'int' type. - - - - - The alias around the 'Integer' type (Visual Basic.NET style). - - - - - The alias around the 'int[]' array type. - - - - - The alias around the 'Integer()' array type (Visual Basic.NET style). - - - - - The alias around the 'decimal' type. - - - - - The alias around the 'Decimal' type (Visual Basic.NET style). - - - - - The alias around the 'decimal[]' array type. - - - - - The alias around the 'Decimal()' array type (Visual Basic.NET style). - - - - - The alias around the 'char' type. - - - - - The alias around the 'Char' type (Visual Basic.NET style). - - - - - The alias around the 'char[]' array type. - - - - - The alias around the 'Char()' array type (Visual Basic.NET style). - - - - - The alias around the 'long' type. - - - - - The alias around the 'Long' type (Visual Basic.NET style). - - - - - The alias around the 'long[]' array type. - - - - - The alias around the 'Long()' array type (Visual Basic.NET style). - - - - - The alias around the 'short' type. - - - - - The alias around the 'Short' type (Visual Basic.NET style). - - - - - The alias around the 'short[]' array type. - - - - - The alias around the 'Short()' array type (Visual Basic.NET style). - - - - - The alias around the 'unsigned int' type. - - - - - The alias around the 'unsigned long' type. - - - - - The alias around the 'ulong[]' array type. - - - - - The alias around the 'uint[]' array type. - - - - - The alias around the 'unsigned short' type. - - - - - The alias around the 'ushort[]' array type. - - - - - The alias around the 'double' type. - - - - - The alias around the 'Double' type (Visual Basic.NET style). - - - - - The alias around the 'double[]' array type. - - - - - The alias around the 'Double()' array type (Visual Basic.NET style). - - - - - The alias around the 'float' type. - - - - - The alias around the 'Single' type (Visual Basic.NET style). - - - - - The alias around the 'float[]' array type. - - - - - The alias around the 'Single()' array type (Visual Basic.NET style). - - - - - The alias around the 'DateTime' type. - - - - - The alias around the 'DateTime' type (C# style). - - - - - The alias around the 'DateTime' type (Visual Basic.NET style). - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime()' array type (Visual Basic.NET style). - - - - - The alias around the 'bool' type. - - - - - The alias around the 'Boolean' type (Visual Basic.NET style). - - - - - The alias around the 'bool[]' array type. - - - - - The alias around the 'Boolean()' array type (Visual Basic.NET style). - - - - - The alias around the 'string' type. - - - - - The alias around the 'string' type (Visual Basic.NET style). - - - - - The alias around the 'string[]' array type. - - - - - The alias around the 'string[]' array type (Visual Basic.NET style). - - - - - The alias around the 'object' type. - - - - - The alias around the 'object' type (Visual Basic.NET style). - - - - - The alias around the 'object[]' array type. - - - - - The alias around the 'object[]' array type (Visual Basic.NET style). - - - - - Registers standard and user-configured type aliases. - - - - - Registers an alias for the specified . - - -

- This overload does eager resolution of the - referred to by the parameter. It will throw a - if the referred - to by the parameter cannot be resolved. -

-
- - A string that will be used as an alias for the specified - . - - - The (possibly partially assembly qualified) name of the - to register the alias for. - - - If either of the supplied parameters is or - contains only whitespace character(s). - - - If the referred to by the supplied - cannot be loaded. - -
- - - Registers short type name as an alias for - the supplied . - - - The to register. - - - If the supplied is . - - - - - Registers an alias for the supplied . - - - The alias for the supplied . - - - The to register the supplied under. - - - If the supplied is ; or if - the supplied is or - contains only whitespace character(s). - - - - - Resolves the supplied to a . - - - The alias to resolve. - - - The the supplied was - associated with, or if no - was previously registered for the supplied . - - - If the supplied is or - contains only whitespace character(s). - - - - - Returns a flag specifying whether TypeRegistry contains - specified alias or not. - - - Alias to check. - - - true if the specified type alias is registered, - false otherwise. - - - - - Helper methods with regard to type resolution. - - -

- Not intended to be used directly by applications. -

-
- Bruno Baia -
- - - Creates a new instance of the class. - - -

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

-
-
- - - Resolves the supplied type name into a - instance. - - -

- If you require special resolution, do - not use this method, but rather instantiate - your own . -

-
- - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the type cannot be resolved. - -
- - - Resolves a string array of interface names to - a array. - - - An array of valid interface names. Each name must include the full - interface and assembly name. - - An array of interface s. - - If any of the interfaces can't be loaded. - - - If any of the s specified is not an interface. - - - If (or any of its elements ) is - . - - - - - Match a method against the given pattern. - - the pattern to match against. - the method to match. - - if the method matches the given pattern; otherwise . - - - If the supplied is invalid. - - - - - Resolves a by name. - - Rick Evans - Aleksandar Seovic - Bruno Baia - - - - Resolves the supplied to a - instance. - - - The unresolved (possibly partially assembly qualified) name - of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Uses - to load an and then the attendant - referred to by the - parameter. - - -

- is - deprecated in .NET 2.0, but is still used here (even when this class is - compiled for .NET 2.0); - will - still resolve (non-.NET Framework) local assemblies when given only the - display name of an assembly (the behaviour for .NET Framework assemblies - and strongly named assemblies is documented in the docs for the - method). -

-
- - The assembly and type to be loaded. - - - A , or . - - - - -
- - - Uses - to load the attendant referred to by - the parameter. - - - The type to be loaded. - - - A , or . - - - - - Creates a new instance - from the given - - - - - Creates a new instance - from the given with the given inner - - - - - Exception thrown when the ObjectFactory cannot load the specified type of a given object. - - Mark Pollack - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Initializes 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. - - - - - Initializes a new instance of the class. - - The resource description that the object definition came from. - Name of the object requested - Name of the object type. - The root cause. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Gets he name of the object we are trying to load. - - The name of the object. - - - - Gets the name of the object type we are trying to load. - - The name of the object type. - - - - Gets the resource description that the object definition came from - - The resource description. - - - - A implementation that represents - a composed collection of instances. - - - - - The criteria for an arbitrary filter. - - Rick Evans - - - - Does the supplied satisfy the criteria - encapsulated by this instance? - - - The datum to be checked by this criteria instance. - - - if the supplied - satisfies the criteria encapsulated by this instance; - if not, or the supplied - is . - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A user-defined (child) criteria that will be composed into this instance. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The data to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Adds the supplied into the criteria - composed within this instance. - - - The to be added. - - - - - The list of composing this - instance. - - - - - Factory class to conceal any default implementation. - - Rod Johnson - Simon White (.NET) - - - - Creates a new instance of the - implementation provided by this factory. - - - A new instance of the - implementation provided by this factory. - - - - - Interface to be implemented by objects that can return information about - the current call stack. - - -

- Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - The to look for. - - - if the caller is under the supplied . - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - - The to look for. - - The name of the method to look for. - - if the caller is under the supplied - and . - - - - - Does the current stack trace contain the supplied ? - - The token to match against. - - if the current stack trace contains the supplied - . - - - - - Creates a new instance of the - class. - - - - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - -

- Matches the whole method name. -

-
- -
- - - Does the current stack trace contain the supplied ? - - -

- This leaves it up to the caller to decide what matches, but is obviously less of - an abstraction because the caller must know the exact format of the underlying - stack trace. -

-
- -
- - - Provides methods to support various naming and other conventions used throughout the framework. - Mainly for internal use within the framework. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - Convert Strings in attribute name format (lowercase, hyphens separating words) - into property name format (camel-cased). For example, transaction-manager is - converted into transactionManager. - - - - - Convenience class that exposes a signature that matches the - delegate. - - -

- Useful when filtering members via the - mechanism. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - - - Returns true if the supplied instance - satisfies the supplied (which must be an - implementation). - - - The instance that will be checked to see if - it matches the supplied . - - - The criteria against which to filter the supplied - instance. - - - True if the supplied instance - satisfies the supplied (which must be an - implementation); false if not or the - supplied is not an - implementation or is null. - - - - - Interface that can be implemented by exceptions etc that are error coded. - - -

- The error code is a , rather than a number, so it can - be given user-readable values, such as "object.failureDescription". -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Return the error code associated with this failure. - - -

- The GUI can render this anyway it pleases, allowing for I18n etc. -

-
- - The error code associated with this failure, - or the empty string instance if not error-coded. - -
- - - Thrown in response to referring to an invalid property (most often via reflection). - - Rick Evans - - - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - - - Creates a new instance of the InvalidPropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The that is (or rather was) the source of the - offending property. - - - - - The name of the offending property. - - - - - Extension of the interface, expressing a 'priority' - ordering: Order values expressed by IPriorityOrdered objects always - apply before order values of 'plain' Ordered values. - - - This is primarily a special-purpose interface, used for objects - where it is particularly important to determine 'prioritized' - objects first, without even obtaining the remaining objects. - A typical example: Prioritized post-processors in a Spring - - - IPriorityOrdered post-processor objects are initialized in - a special phase, ahead of other post-processor objects. - - Juergen Hoeller - Mark Pollack (.NET) - - - - - - - Criteria that is satisfied if the of each of the - arguments matches each of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - -

- This implementation respects the inheritance chain of any parameter - s... i.e. methods that have a base type (or - interface) that is assignable to the in the - same corresponding index of the parameter types will satisfy this - criteria instance. -

-
- The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - -
- - - Thrown when a method (typically a property getter or setter invoked via reflection) - throws an exception, analogous to a . - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for exceptions related to a property access, such as a - mismatch or a target invocation exception. - - Rod Johnson - Mark Pollack (.NET) - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessException class. - - - - - Creates a new instance of the PropertyAccessException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Returns the PropertyChangeEventArgs that resulted in the problem. - - - - - The string error code used to classify the error. - - - - - Creates a new instance of the MethodInvocationException class. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Constructor to use when an exception results from a - . - - - The raised by the invoked property. - - - The that - resulted in an exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The error code string for this exception. - - - - - Criteria that is satisfied if the method Name of an - instance matches a - supplied string pattern. - - - - Supports the following simple pattern styles: - "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - - Bruno Baia - - - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to * (any method name). -

-
-
- - - Creates a new instance of the - class. - - The pattern that names - must match against in order to satisfy this criteria. - - If the supplied is null or resolve to an empty string. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is null or resolve to an empty string. - - - - - Helper class that encapsulates the specification of a method parameter, i.e. - a MethodInfo or ConstructorInfo plus a parameter index. - Useful as a specification object to pass along. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - Initializes a new instance of the class for the given - MethodInfo. - - The MethodInfo to specify a parameter for. - Index of the parameter. - - - - Initializes a new instance of the class. - - The ConstructorInfo to specify a parameter for. - Index of the parameter. - - - - Create a new MethodParameter for the given method or donstructor. - This is a convenience constructor for scenarios where a - Method or Constructor reference is treated in a generic fashion. - - The method or constructor to specify a parameter for. - Index of the parameter. - the corresponding MethodParameter instance - - - - Parameters the name of the method/constructor parameter. - - the parameter name. - - - - Gets the type of the method/constructor parameter. - - The type of the parameter. (never null) - - - - Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The MethodInfo, or null if none. - - - - Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The ConstructorInfo, or null if none - - - - Criteria that is satisfied if the number of parameters to a given - matches an arbitrary number. - - -

- This class supports checking the parameter count of both methods and - constructors. -

-

- Default parameters, etc need to taken into account. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Criteria that is satisfied if the of each of the - parameters of a given matches each - of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the return of a given - matches a given . - - Rick Evans - - - - The return to match against if no - is provided explictly. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Thrown in response to a failed attempt to read a property. - - -

- Typically thrown when attempting to read the value of a write-only - property via reflection. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - 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. - - - - - Thrown in response to a failed attempt to write a property. - - Mark Pollack (.NET) - - - - Creates a new instance of the NotWritablePropertyException class. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class - summarizing what property was not writable. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - - - Creates new NotWritablePropertyException with a root cause. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - The root cause indicating why the property was not writable. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to encountering a value - when traversing a nested path expression. - - - - - 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 of the object where the property was not found. - - The name of the property not found. - - - - Creates a new instance of the - class. - - - The of the object where the property was not found. - - The name of the property not found. - A message about the exception. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the offending property. - - - - - The of the class where the property was last looked for. - - - - - Comparator implementation for objects, sorting by - order value ascending (resp. by priority descending). - - -

- Non- objects are treated as greatest order values, - thus ending up at the end of a list, in arbitrary order (just like same order values of - objects). -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Compares two objects and returns a value indicating whether one is less than, - equal to or greater than the other. - - -

- Uses direct evaluation instead of - to avoid unnecessary boxing. -

-
- The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - -
- - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - Provides additional data for the PropertyChanged event. - - -

- Provides some additional properties over and above the name of the - property that has changed (which is inherited from the - base class). - This allows calling code to determine whether or not a property has - actually changed (i.e. a PropertyChanged event may have been - raised, but the value itself may be equivalent). -

-
- -
- - - Create a new instance of the - class. - - - The name of the property that was changed. - The old value of the property. - the new value of the property. - - - - Get the old value for the property. - - - - - - Get the new value of the property. - - - - - - A base class for all - implementations that are regular expression based. - - Rick Evans - - - - The default pattern... matches absolutely anything. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The regular expression pattern to be applied. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Convenience method that calls the - - on the supplied . - - The input to match against. - True if the matches. - - - - The regular expression pattern to be applied. - - - - - The regular expression options to be applied. - - - - - The regular expression to be applied. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default event name pattern... matches pretty much any event name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default method name pattern... matches pretty much any method name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Exception thrown on a mismatch when trying to set a property - or resolve an argument to a method invocation. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the TypeMismatchException class. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the TypeMismatchException class describing the - property and required type that could not used to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - - - - Creates a new instance of the TypeMismatchException class describing the - property, required type, and underlying exception that could not be used - to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - The underlying exception. - - - - Creates a new instance of the TypeMismatchException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The string error code used to classify the exception. - - - - - Abstract base class for implementations. - - Aleksandar Seovic - - - - An interface that defines the methods that have to be implemented by all data bindings. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - The name of the always filled error provider - - - - - Gets or sets a flag specifying whether this binding is valid. - - - true if this binding evaluated without errors; - false otherwise. - - - - - Marks this binding's state as invalid for this validationErrors collection. - Returns false if is null. - - - false, if validationErrors is null - - - - Initializes a new instance of the class. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets the unique ID of this binding instance. - - - - - Gets or sets the . - - The binding direction. - - - - Gets the error message. - - The error message. - - - - Gets the error providers. - - - - - Abstract base class for simple, one-to-one implementations. - - Aleksandar Seovic - - - - Initialize a new instance of without any - - - - - Initialize a new instance of with the - specified . - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation if source to target binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation of target to source binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets or sets the to use. - - The formatter to use. - - - - Base implementation of the . - - Aleksandar Seovic - - - - An interface that has to be implemented by all data binding containers. - - Aleksandar Seovic - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Gets a value indicating whether this data binding container - has bindings. - - - true if this data binding container has bindings; - false otherwise. - - - - - Creates a new instance of . - - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Implemented as a NOOP for containers. - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Gets a list of bindings for this container. - - - A list of bindings for this container. - - - - - Gets a value indicating whether this instance has bindings. - - - true if this instance has bindings; otherwise, false. - - - - - BaseBindingManager keeps track of all registered bindings and - represents an entry point for the binding and unbinding process. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Enumeration that defines possible values for data binding direction. - - Aleksandar Seovic - - - - Specifies that value from the control property should be bound to a data model. - - - - - Specifies that value from the data model should be bound to control property. - - - - - Specifies that binding is bidirectional. - - - - - Represents an ErrorMessage specific to a binding instance. - - Erich Eichinger - - - - Represents a single validation error message. - - Aleksandar Seovic - Goran Milosavljevic - - - - Default constructor. - - - - - Initializes a new instance of the class. - - Error message resource identifier. - Parameters that should be used for message resolution. - - - - Initializes a new instance of the class copying values from another instance. - - Another Error message instance to copy values from. - - - - This property is reserved, apply the - - to the class instead. - - - An - that describes the XML representation of the object that - is produced by the - - method and consumed by the - - method. - - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Resolves the message against specified . - - Message source to resolve this error message against. - Resolved error message. - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets or sets the resource identifier for this message. - - The resource identifier for this message. - - - - Gets or sets the message parameters. - - The message parameters. - - - - Initializes a new instance of the class. - - the id of the binding this error message is associated with - the message id - optional parameters to this message - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Get the ID of the binding this message instance relates to. - - - - - Interface that should be implemented by data bound objects, such as - web pages, user controls, windows forms, etc. - - Aleksandar Seovic - - - - Gets the binding manager. - - The binding manager. - - - - implementation that allows - data binding between collections that implement - interface. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Simple, expression-based implementation of that - binds source to target one-to-one. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - The formatter to use. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the source expression. - - The source expression. - - - - Gets the target expression. - - The target expression. - - - - Minimal AST node interface used by ANTLR AST generation and tree-walker. - - - - - Add a (rightmost) child to this node - - - - - - Get the first child of this node; null if no children - - - - - Get the next sibling in line after this one - - - - - Get the token text for this node - - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Set the first child of a node. - - - - - - Set the next sibling after this one. - - - - - - Set the token text for this node - - - - - - Set the token type for this node - - - - - - Get the token type for this node - - - - - Event type. - - - - Used for creating Token instances. - - - Used for caching lookahead characters. - - - - This method is executed by ANTLR internally when it detected an illegal - state that cannot be recovered from. - The previous implementation of this method called - and writes directly to , which is usually not - appropriate when a translator is embedded into a larger application. - - Error message. - - - - A creator of Token object instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of Token objects. - - - Since Lexers in ANTLR use a single Token type, each TokenCreator can - create one class of Token objects (that's why it's not called TokenFactory). - - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - The fully qualified name of the Token type to create. - - - - - Type object used as a template for creating tokens by reflection. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - This type was created in VisualAge. - - - - Report exception errors caught in nextToken() - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - - Represents a stream of characters fed to the lexer from that can be rewound - via mark()/rewind() methods. - - - - A dynamic array is used to buffer up all the input characters. Normally, - "k" characters are stored in the buffer. More characters may be stored - during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. - Consumption of characters is deferred. In other words, reading the next - character is not done by conume(), but deferred until needed by LA or LT. - - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "CharConsumed" event. - - Event source object - Event data object - - - - Handle the "CharLA" event. - - Event source object - Event data object - - - - Handle the "Mark" event. - - Event source object - Event data object - - - - Handle the "Rewind" event. - - Event source object - Event data object - - - charBufferConsume method comment. - - - - charBufferLA method comment. - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Specify an object with support code (shared by Parser and TreeParser. - Normally, the programmer does not play with this, using - instead. - - - - - - Specify the type of node to create during tree building. - - Fully qualified AST Node type name. - - - - Specify the type of node to create during tree building. - use now to be consistent with - Token Object Type accessor. - - Fully qualified AST Node type name. - - - - - - - - Get another token object from the token stream - - - - Return the token type of the ith token of lookahead where i=1 - is the current token being examined by the parser (i.e., it - has not been matched yet). - - - - Make sure current lookahead symbol matches token type t. - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Make sure current lookahead symbol matches the given set - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Parser error-reporting function can be overridden in subclass - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - User can override to do their own debugging - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Specifies the behaviour required (i.e. parser modifications) - specifically to support parse tree debugging and derivation. - - - - Override the standard matching and rule entry/exit routines - to build parse trees. This class is useful for 2.7.3 where - you can specify a superclass like - - - class TinyCParser extends Parser(ParseTreeDebugParser); - - - - - - Each new rule invocation must have it's own subtree. Tokens are - added to the current root so we must have a stack of subtree roots. - - - - - Track most recently created parse subtree so that when parsing - is finished, we can get to the root. - - - - - For every rule replacement with a production, we bump up count. - - - - - Adds LT(1) to the current parse subtree. - - - - Note that the match() routines add the node before checking for - correct match. This means that, upon mismatched token, there - will a token node in the tree corresponding to where that token - was expected. For no viable alternative errors, no node will - be in the tree as nothing was matched() (the lookahead failed - to predict an alternative). - - - - - - Create a rule node, add to current tree, and make it current root - - - - - - Pop current root; back to adding to old root - - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - AST Support code shared by TreeParser and Parser. - - - - We use delegation to share code (and have only one - bit of code to maintain) rather than subclassing - or superclassing (forces AST support code to be - loaded even when you don't want to do AST stuff). - - - Typically, is used to specify the - homogeneous type of node to create, but you can override - to make heterogeneous nodes etc... - - - - - - Constructs an ASTFactory with the default AST node type of - . - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - Name of default AST node type for this factory. - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - MetaType of default AST node type for this factory. - - - - - Stores the Type of the default AST node class to be used during tree construction. - - - - - Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass - and ASTNodeCreator. - - - - - Stores the mapping between AST node typenames and their token ID. - - - - - Specify an "override" for the type created for - the specified Token type. - - - This method is useful for situations that ANTLR cannot oridinarily deal - with (i.e., when you create a token based upon a nonliteral token symbol - like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token - type (and hence the AST) statically. - - Token type to override. - - Fully qualified AST typename (or null to specify - the factory's default AST type). - - - - - Register an AST Node Type for a given Token type ID. - - The Token type ID. - The AST Node Type to register. - - - - Register an ASTNodeCreator for a given Token type ID. - - The Token type ID. - The creater to register. - - - - Register an ASTNodeCreator to be used for creating node by default. - - The ASTNodeCreator. - - - - Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings - to the specified size. - This is primarily a convenience method that can be used to prevent - unnecessary and costly re-org of the mappings list. - - Maximum Token Type ID. - - - - Add a child to the current AST - - The AST to add a child to - The child AST to be added - - - - Creates a new uninitialized AST node. Since a specific AST Node Type - wasn't indicated, the new AST node is created using the current default - AST Node type - - - An uninitialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. Once created, - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - Fully qualified name of the Type to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. - - Token instance to be used to initialize the new AST Node. - - Fully qualified name of the Type to be used for creating the new AST Node. - - A newly created and initialized AST node object. - - Once created, the new AST node is initialized with the specified Token - instance. The used for creating this new AST - node is determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - - - - Creates and initializes a new AST node using the specified AST Node instance. - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by aNode. - The AST Node type must have a default/parameterless constructor. - - AST Node instance to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token instance. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token instance to be used to create new AST Node. - An initialized AST node object. - - - - Returns a copy of the specified AST Node instance. The copy is obtained by - using the method Clone(). - - AST Node to copy. - An AST Node (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node and all of it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Make a tree from a list of nodes. The first element in the - array is the root. If the root is null, then the tree is - a simple list not a tree. Handles null children nodes correctly. - For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) - yields tree (nil a b). - - List of Nodes. - AST Node tree. - - - - Make a tree from a list of nodes, where the nodes are contained - in an ASTArray object. - - List of Nodes. - AST Node tree. - - - - Make an AST the root of current AST. - - - - - - - Sets the global default AST Node Type for this ASTFactory instance. - This method also attempts to load the instance - for the specified typename. - - Fully qualified AST Node Type name. - - - - To change where error messages go, can subclass/override this method - and then setASTFactory in Parser and TreeParser. This method removes - a prior dependency on class antlr.Tool. - - - - - - A creator of AST node instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of AST node objects. - - - Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever - they need to create an AST node objeect. What this class does is to support - performant extensibility of the basic ASTFactory. The ASTFactory can now be - extnded as run-time to support more new AST node types without using needing - to use reflection. - - - - - - Constructs an instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Summary description for ASTVisitor. - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Small buffer used to avoid reading individual chars - - - - - Small buffer used to avoid reading individual chars - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - A token is minimally a token type. Subclasses can add the text matched - for the token and line info. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Summary description for DumpASTVisitor. - - Simple class to dump the contents of an AST to the output - - - - Append a char to the msg buffer. If special, then show escaped version - - Message buffer - Char to append - - - - Walk parse tree and return requested number of derivation steps. - If steps less-than 0, return node text. If steps equals 1, return derivation - string at step. - - derivation steps - - - - - Get derivation and return how many you did (less than requested for - subtree roots. - - string buffer - derivation steps - - - - - Do a step-first walk, building up a buffer of tokens until - you've reached a particular step and print out any rule subroots - insteads of descending. - - derivation buffer - derivation steps - - - - - This token stream tracks the *entire* token stream coming from - a lexer, but does not pass on the whitespace (or whatever else - you want to discard) to the parser. - - - - This class can then be asked for the ith token in the input stream. - Useful for dumping out the input stream exactly after doing some - augmentation or other manipulations. Tokens are index from 0..n-1 - - - You can insert stuff, replace, and delete chunks. Note that the - operations are done lazily--only if you convert the buffer to a - string. This is very efficient because you are not moving data around - all the time. As the buffer of tokens is converted to strings, the - toString() method(s) check to see if there is an operation at the - current index. If so, the operation is done and then normal string - rendering continues on the buffer. This is like having multiple Turing - machine instruction streams (programs) operating on a single input tape. :) - - - Since the operations are done lazily at toString-time, operations do not - screw up the token index values. That is, an insert operation at token - index i does not change the index values for tokens i+1..n-1. - - - Because operations never actually alter the buffer, you may always get - the original token stream back without undoing anything. Since - the instructions are queued up, you can easily simulate transactions and - roll back any changes if there is an error just by removing instructions. - For example, - - For example: - - TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); - JavaRecognizer parser = new JavaRecognizer(rewriteEngine); - ... - rewriteEngine.insertAfter("pass1", t, "foobar");} - rewriteEngine.insertAfter("pass2", u, "start");} - System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); - System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); - - - - You can also have multiple "instruction streams" and get multiple - rewrites from a single pass over the input. Just name the instruction - streams and use that name again when printing the buffer. This could be - useful for generating a C file and also its header file--all from the - same buffer. - - - If you don't use named rewrite streams, a "default" stream is used. - - - Terence Parr, parrt@cs.usfca.edu - University of San Francisco - February 2004 - - - - - - Track the incoming list of tokens - - - - - You may have multiple, named streams of rewrite operations. - I'm calling these things "programs." - Maps string (name) -> rewrite (List) - - - - - Map string (program name) -> Integer index - - - - - track index of tokens - - - - - Who do we suck tokens from? - - - - - Which (whitespace) token(s) to throw out - - - - - Rollback the instruction stream for a program so that - the indicated instruction (via instructionIndex) is no - longer in the stream. - - - UNTESTED! - - - - - - - Reset the program so that no instructions exist - - - - - - If op.index > lastRewriteTokenIndexes, just add to the end. - Otherwise, do linear - - - - - - Execute the rewrite operation by possibly adding to the buffer. - - rewrite buffer - The index of the next token to operate on. - - - - This token tracks it's own index 0..n-1 relative to the beginning - of the stream. It is designed to work with - in TokenStreamRewriteEngine.cs - - - - - Index into token array indicating position in input stream - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Implementation of the average aggregator. - - Aleksandar Seovic - - - - Defines an interface that should be implemented - by all collection processors and aggregators. - - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Returns the average of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The average of the numeric values in the source collection. - - - - - Converts all elements in the input list to a given target type. - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the count aggregator. - - Aleksandar Seovic - - - - Returns the number of items in the source collection. - - - The source collection to process. - - - Ignored. - - - The number of items in the source collection, - or zero if the collection is empty or null. - - - - - Converts a string literal to a instance. - - Erich Eichinger - - - - - Erich Eichinger - - - - Implementation of the distinct processor. - - Aleksandar Seovic - - - - Returns distinct items from the collection. - - - The source collection to process. - - - 0: boolean flag specifying whether to include null - in the results or not. Default is false, which means that - null values will not be included in the results. - - - A collection containing distinct source collection elements. - - - If there is more than one argument, or if the single optional argument - is not Boolean. - - - - - Implementation of the maximum aggregator. - - Aleksandar Seovic - - - - Returns the largest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The largest item in the source collection. - - - - - Implementation of the minimum aggregator. - - Aleksandar Seovic - - - - Returns the smallest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The smallest item in the source collection. - - - - - Implementation of the non-null processor. - - Aleksandar Seovic - - - - Returns non-null items from the collection. - - - The source collection to process. - - - Ignored. - - - A collection containing non-null source collection elements. - - - - - Implementation of the 'order by' processor. - - Aleksandar Seovic - Erich Eichinger - - - - Sorts the source collection using custom sort criteria. - - - Please note that your compare function needs to take care about - proper conversion of types to be comparable! - - - The source collection to sort. - - - Sort criteria to use. - - - A sorted array containing collection elements. - - - - - Reverts order of elements in the list - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the sort processor. - - Aleksandar Seovic - - - - Sorts the source collection. - - - Please not that this processor requires that collection elements - are of a uniform type and that they implement - interface. -

- If you want to perform custom sorting based on element properties - you should consider using instead. - - - The source collection to sort. - - - Ignored. - - - An array containing sorted collection elements. - - - If collection is not empty and it is - neither nor . - - - -

- Implementation of the sum aggregator. - - Aleksandar Seovic -
- - - Returns the sum of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The sum of the numeric values in the source collection. - - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Base type for nodes that accept arguments. - - Aleksandar Seovic - - - - Base type for all expression nodes. - - Aleksandar Seovic - - - - For internal purposes only. Use for expression node implementations. - - - This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST - unfortunately is not marked as [Serializable].
-
- Note:Since SpringAST implements , deriving classes - have to explicitely override if they need to persist additional - data during serialization. -
-
- - - The global SpringAST node factory - - - - - Create an instance - - - - - Create an instance from a token - - - - - initialize this instance from an AST - - - - - initialize this instance from an IToken - - - - - initialize this instance from a token type number and a text - - - - - sets the text of this node - - - - - gets the text of this node - - - - - Create a new instance from SerializationInfo - - - - - populate SerializationInfo from this instance - - - - - gets or sets the token type of this node - - - - - gets or sets the text of this node - - - - - Interface that all navigation expression nodes have to implement. - - Aleksandar Seovic - - - - Returns expression value. - - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Expression variables map. - Value of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - New value for the last node of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - Expression variables map. - New value for the last node of the expression. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value. - - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Expression variables map. - Node's value. - - - - Returns node's value for the given context. - - Node's value. - - - - Evaluates this node for the given context, switching local variables map to the ones specified in . - - - - - Sets node's value for the given context. - - Object to evaluate node against. - New value for this node. - - - - Sets node's value for the given context. - - Object to evaluate node against. - Expression variables map. - New value for this node. - - - - Sets node's value for the given context. - - -

- This is a default implementation of Set method, which - simply throws . -

-

- This was done in order to avoid redundant Set method implementations, - because most of the node types do not support value setting. -

-
-
- - - Returns a string representation of this node instance. - - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Holds the state during evaluating an expression. - - - - - Gets/Sets the root context of the current evaluation - - - - - Gets/Sets the current context of the current evaluation - - - - - Gets/Sets global variables of the current evaluation - - - - - Gets/Sets local variables of the current evaluation - - - - - Initializes a new EvaluationContext instance. - - The root context for this evaluation - dictionary of global variables used during this evaluation - - - - Switches current ThisContext. - - - - - Switches current LocalVariables. - - - - - Gets the type of the - - - - - Create a new instance - - - - - Create a new instance - - - - - Append an argument node to the list of child nodes - - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - - - - Asserts the argument count. - - The required count. - - - - Resolves the arguments. - - Current expression evaluation context. - An array of argument values - - - - Resolves the named arguments. - - Current expression evaluation context. - A dictionary of argument name to value mappings. - - - - Resolves the argument. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the argument without ensuring was called. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the named argument. - - Argument name. - Current expression evaluation context. - Resolved named argument value. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed assignment node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed attribute node in the navigation expression. - - Aleksandar Seovic - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Determines the type of object that should be instantiated. - - - The type name to resolve. - - - The type of object that should be instantiated. - - - If the type cannot be resolved. - - - - - Initializes this node by caching necessary constructor and property info. - - - - - - - Sets the named arguments (properties). - - Instance to set property values on. - Argument (property) name to value mappings. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Tries to determine attribute type based on the specified - attribute type name. - - - Attribute type name to resolve. - - - Resolved attribute type. - - - If type cannot be resolved. - - - - - Base class for binary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance with the supplied operands - - - - - - - Create a new instance from SerializationInfo - - - - - Evaluate the left operand - - - - - Evaluate the left operand - - - - - Gets the left operand. - - The left operand. - - - - Gets the right operand. - - The right operand. - - - - Represents parsed boolean literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the boolean literal node. - - - This is the entrypoint into evaluating this expression. - - Node's value. - - - - Represents parsed default node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns left operand if it is not null, or the right operand if it is. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Container object for the parsed expression. - - -

- Preparing this object once and reusing it many times for expression - evaluation can result in significant performance improvements, as - expression parsing and reflection lookups are only performed once. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of the class - by parsing specified expression string. - - Expression to parse. - - - - Registers lambda expression under the specified . - - Function name to register expression as. - Lambda expression to register. - Variables dictionary that the function will be registered in. - - - - Initializes a new instance of the class - by parsing specified primary expression string. - - Primary expression to parse. - - - - Initializes a new instance of the class - by parsing specified property expression string. - - Property expression to parse. - - - - Initializes a new instance of the class. - - - - - Create a new instance from SerializationInfo - - - - - Evaluates this expression for the specified root object and returns - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value of the last node. - - - - Evaluates this expression for the specified root object and sets - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value to set last node to. - If navigation expression is empty. - - - - Evaluates this expression for the specified root object and returns - of the last node, if possible. - - Context to evaluate expression against. - Expression variables map. - Value of the last node. - - - - Contains a list of reserved variable names. - You must not use any variable names with the reserved prefix! - - - - - Variable Names using this prefix are reserved for internal framework use - - - - - variable name of the currently processed object factory, if any - - - - - Converts string representation of expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Utility class that enables easy expression evaluation. - - -

- This class allows users to get or set properties, execute methods, and evaluate - logical and arithmetic expressions. -

-

- Methods in this class parse expression on every invocation. - If you plan to reuse the same expression many times, you should prepare - the expression once using the static method, - and then call to evaluate it. -

-

- This can result in significant performance improvements as it avoids expression - parsing and node resolution every time it is called. -

-

-

-
- Aleksandar Seovic -
- - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Value of the last node in the expression. - - - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Expression variables map. - Value of the last node in the expression. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Value to set last node to. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Expression variables map. - Value to set last node to. - - - - Represents parsed expression list node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a result of the last expression in a list. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the last expression in a list - - - - Represents parsed function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed hexadecimal integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the hexadecimal integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed indexer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - - Context to resolve property against. - Expression variables map. - PropertyInfo for this node. - - - - Represents parsed integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents lambda expression. - - Aleksandar Seovic - - - - caches argumentNames of this instance - - - - - caches body expression of this lambda function - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Gets argument names for this lambda expression. - - - - - Represents parsed list initializer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the list defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents local function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Represents parsed map entry node. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map entry defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed map initializer node in the navigation expression. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Static constructor. Initializes a map of special collection processor methods. - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Gets the best method given the name, argument values, for a given type. - - The type on which to search for the method. - Name of the method. - The binding flags. - The arg values. - Best matching method or null if none found. - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed null literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the null literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic addition operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic addition operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents AND operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical BETWEEN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents arithmetic division operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic division operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical equality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical equality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical IN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical IS operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IS operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical "less than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "less than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents VB-style logical LIKE operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical LIKE operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents logical MATCHES operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical MATCHES operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents arithmetic modulus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic modulus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic multiplication operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic multiplication operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents NOT operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Base class for unary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Gets the operand. - - The operand. - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical NOT operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical inequality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical inequality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents OR operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical OR operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic exponent operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic exponent operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic subtraction operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic subtraction operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary minus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary plus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - - Erich Eichinger - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed projection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of projection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents node that navigates to object's property or public field. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - The parent. - - - - Attempts to resolve property or field. - - - Type to search for a property or a field. - - - Property or field name. - - - Binding flags to use. - - - Resolved property or field accessor, or null - if specified cannot be resolved. - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Retrieves property or field value. - - Context to evaluate expressions against. - Current expression evaluation context. - Property or field value. - - - - Sets property value, doing any type conversions that are necessary along the way. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Sets property or field value using either dynamic or standard reflection. - - Object to evaluate node against. - New value for this node, converted to appropriate type. - - - - In the case of read only collections or custom collections that are not assignable from - IList, try to add to the collection. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - true if was able add to IList, IDictionary, or ISet - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... - - Context to resolve property against. - PropertyInfo for this node. - - - - Gets a value indicating whether this node represents a property. - - - true if this node is a property; otherwise, false. - - - - - Gets a value indicating whether this node represents a field. - - - true if this node is a field; otherwise, false. - - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified identifier. - - - Fully qualified identifier as a string. - - - - - Represents parsed real literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the real literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents a reference to a Spring-managed object. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the first context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the last context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of selection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed string literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Exception thrown when detecting invalid SpEL syntax - - Erich Eichinger - - - - TODO - - - - - TODO - - - - - - - - - - - - - - - - - - - - Gets a message that provides details on the syntax error. - - - - - The expression that caused the error - - - - - Represents ternary expression node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed type node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified typename. - - - Fully qualified typename as a string. - - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Implementation of that can be used to - format and parse boolean values. - - Erich Eichinger - - - - Interface that should be implemented by all formatters. - - - - Formatters assume that source value is a string, and make no assumptions - about the target value's type, which means that Parse method can return - object of any type. - - - Aleksandar Seovic - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Initializes a new instance of the class - using default values - - - - - Initializes a new instance of the class - - - - - Formats the specified boolean value. - - The value to format. - Formatted boolean value. - If is null. - If is not of type . - - - - Parses the specified boolean value according to settings of and - - The boolean value to parse. - Parsed boolean value as a . - If does not match or . - - - - Set/Get value to control casesensitivity of - - - Defaults to true - - - - - Set/Get value to recognize as boolean "true" value - - - Defaults to - - - - - Set/Get value to recognize as boolean "false" value - - - Defaults to - - - - - Implementation of that can be used to - format and parse currency values. - - - - CurrencyFormatter uses currency related properties of the - to format and parse currency values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of CurrencyFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the CurrencyFormatter in order - to override some of the default currency formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - currency values are formatted. - - - - - Formats the specified currency value. - - The value to format. - Formatted currency . - If is null. - If is not a number. - - - - Parses the specified currency value. - - The currency value to parse. - Parsed currency value as a . - - - - Gets or sets the currency decimal digits. - - The currency decimal digits. - - - - - Gets or sets the currency decimal separator. - - The currency decimal separator. - - - - - Gets or sets the currency group sizes. - - The currency group sizes. - - - - - Gets or sets the currency group separator. - - The currency group separator. - - - - - Gets or sets the currency symbol. - - The currency symbol. - - - - - Gets or sets the currency negative pattern. - - The currency negative pattern. - - - - - Gets or sets the currency positive pattern. - - The currency positive pattern. - - - - - Implementation of that can be used to - format and parse values. - - - - DateTimeFormatter uses properties of the - to format and parse values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of DateTimeFormatter, default DateTimeFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the DateTimeFormatter in order - to override some of the default formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - Date/time format string. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture. - - - - Formats the specified value. - - The value to format. - Formatted value. - If is null. - If is not an instance of . - - - - Parses the specified value. - - The string to parse. - Parsed value. - - - - Provides base functionality for filtering values before they actually get parsed/formatted. - - Erich Eichinger - - - - Creates a new instance of this FilteringFormatter. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Allows to rewrite a value before it gets parsed by the underlying formatter - - - - - Allows to change a value before it gets formatted by the underlying formatter - - - - - Implementation of that can be used to - format and parse floating point numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign, decimal point, exponent). - - - Aleksandar Seovic - - - - Default format string. - - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and current thread's culture. - - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and specified culture. - - The culture. - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - The culture name. - - - - Initializes a new instance of the class, - using specified format string and culture. - - The format string. - The culture. - - - - Formats the specified float value. - - The value to format. - Formatted floating point number. - If is null. - If is not a number. - - - - Parses the specified float value. - - The float value to parse. - Parsed float value as a . - - - - Replaces input strings with a given default value, - if they are null or contain whitespaces only, - - Erich Eichinger - - - - Creates a new instance of this HasTextFilteringFormatter using null as default value. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Creates a new instance of this HasTextFilteringFormatter. - - the default value to be returned, if input text doesn't contain text - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - If value contains no text, it will be replaced by a defaultValue. - - - - - Implementation of that can be used to - format and parse integer numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign). - - - Aleksandar Seovic - - - - Initializes a new instance of the class, - using default format string of '{0:D}'. - - - - - Initializes a new instance of the class, - using specified format string. - - - - - Formats the specified integer value. - - The value to format. - Formatted integer number. - If is null. - If is not an integer number. - - - - Parses the specified integer value. - - The integer value to parse. - Parsed number value as a . - - - - Implementation of that simply calls . - - - This formatter is a no-operation implementation. - - Erich Eichinger - - - - Initializes a new instance of the class. - - - - - Converts the passed value to a string by calling . - - The value to convert. - to string converted value. - - - - Returns the passed string "as is". - - The value to return. - The value passed into this method. - - - - Implementation of that can be used to - format and parse numbers. - - - - NumberFormatter uses number-related properties of the - to format and parse numbers. - - - This formatter works with both integer and decimal numbers and allows - you to format and parse numbers that conform to - number style (leading and trailing white space and/or sign, thousands separator, - decimal point) - - - If you use one of the constructors that accept culture as a parameter - to create an instance of NumberFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the NumberFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified number value. - - The value to format. - Formatted number . - If is null. - If is not a number. - - - - Parses the specified number value. - - The number value to parse. - Parsed number value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the number group sizes. - - The number group sizes. - - - - - Gets or sets the number group separator. - - The number group separator. - - - - - Gets or sets the negative pattern. - - The number negative pattern. - - - - - Implementation of that can be used to - format and parse numbers. - - - - PercentFormatter uses percent-related properties of the - to format and parse percentages. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of PercentFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the PercentFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified percentage value. - - The value to format. - Formatted percentage. - If is null. - If is not a number. - - - - Parses the specified percentage value. - - The percentage value to parse. - Parsed percentage value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the percent group sizes. - - The percent group sizes. - - - - - Gets or sets the percent group separator. - - The percent group separator. - - - - - Gets or sets the negative pattern. - - The percent negative pattern. - - - - - Gets or sets the positive pattern. - - The percent positive pattern. - - - - - Gets or sets the percent symbol. - - The percent symbol. - - - - - Gets or sets the per mille symbol. - - The per mille symbol. - - - - - Loads a list of resources that should be applied from the .NET . - - -

- This implementation will iterate over all resource managers - within the message source and return a list of all the resources whose name starts with '$this'. -

-

- All other resources will be ignored, but you can retrieve them by calling one of - GetMessage methods on the message source directly. -

-
- Aleksandar Seovic -
- - - Abstract base class that all localizers should extend - - -

- This class contains the bulk of the localizer logic, including implementation - of the ApplyResources methods that are defined in - interface. -

-

- All specific localizers need to do is inherit this class and implement - GetResources method that will return a list of - objects that should be applied to a specified target. -

-

- Custom implementations can use whatever type of resource storage they want, - such as standard .NET resource sets, custom XML files, database, etc. -

-
- Aleksandar Seovic -
- - - Defines an interface that localizers have to implement. - - -

- Localizers are used to automatically apply resources to object's members - using reflection. -

-
- Aleksandar Seovic -
- - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's culture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's uiCulture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Returns a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - implementation - that simply returns the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . - - Aleksandar Seovic - - - - Strategy interface for - resolution. - - Aleksandar Seovic - - - - Resolves the - from some context. - - -

- The 'context' is determined by the appropriate implementation class. - An example of such a context might be a thread local bound - , or a - sourced from an HTTP - session. -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - -

- This is an optional operation and does not need to be implemented - such that it actually does anything useful (i.e. it can be a no-op). -

-
- - The new or - to clear the current . - -
- - - Returns the default . - - -

- It tries to get the - from the value of the - - property and falls back to the of the - current thread if the - - is . -

-
- - The default - -
- - - Resolves the - from some context. - - -

- The 'context' in this implementation is the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - - The new or - to clear the current . - - - - - - - The default . - - - The default . - - - - - Abstract base class that all resource cache implementations should extend. - - Aleksandar Seovic - - - - Defines an interface that resource cache adapters have to implement. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Gets the list of resources from the cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Crates resource cache key for the specified target object and culture. - - Target object to apply resources to. - Resource culture to use for resource lookup. - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Resource cache implementation that doesn't cache resources. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - Always returns null. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - - - - Holds mapping between control property and it's value - as read from the resource file. - - Aleksandar Seovic - - - - Creates instance of resource mapper. - - Target property. - Resource value. - - - - Gets parsed target property expression. See - for more information on object navigation expressions. - - - - - Value of the resource that target property should be set to. - - - - - Utility class to aid in the manipulation of events and delegates. - - Griffin Caprio - - - - Returns a new instance of the requested . - - -

- Often used to wire subscribers to event publishers. -

-
- - The of delegate to create. - - - The target subscriber object that contains the delegate implementation. - - - referencing the delegate method on the subscriber. - - - A delegate handler that can be added to an events list of handlers, or called directly. - -
- - - Queries the input type for a signature matching the input - signature. - - - Typically used to query a potential subscriber to see if they implement an event handler. - - to match against - to query - - matching input - signature, or if there is no match. - - - - - Creates a new instance of the EventManipulationUtilities class. - - -

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

-
-
- - - Default implementation of the - interface. - - Griffin Caprio - - - - Creates a new instance of the EventRegistry class. - - - - - Adds the input object to the list of publishers. - - - This publishes all events of the source object to any object - wishing to subscribe - - The source object to publish. - - - - Subscribes to all events published, if the subscriber implements - compatible handler methods. - - The subscriber to use. - - - - Subscribes to published events of all objects of a given type, if the - subscriber implements compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - The target to unsubscribe from - - - - The list of event publishers. - - The list of event publishers. - - - - To be implemented by any object that wishes to receive a reference to - an . - - -

- This interface only applies to objects that have been instantiated - within the context of an - . This interface does - not typically need to be implemented by application code, but is rather - used by classes internal to Spring.NET. -

-
- Mark Pollack - Rick Evans -
- - - Set the - associated with the - that created this - object. - - -

- This property will be set by the relevant - after all of this - object's dependencies have been resolved. This object can use the - supplied - immediately to publish or subscribe to one or more events. -

-
-
- - - Marks a property as being 'required': that is, the setter property - must be configured to be dependency-injected with a value. - - Consult the SDK documentation for , - which, by default, checks for the presence of this annotation. - - Rob Harrop - Mark Pollack - - - - A implementation that enforces required properties to have been configured. - Required properties are detected through an attribute, by default, Spring's - attribute. - - - The motivation for the existence of this IObjectPostProcessor is to allow - developers to annotate the setter properties of their own classes with an - arbitrary attribute to indicate that the container must check - for the configuration of a dependency injected value. This neatly pushes - responsibility for such checking onto the container (where it arguably belongs), - and obviates the need (in part) for a developer to code a method that - simply checks that all required properties have actually been set. - - Please note that an 'init' method may still need to implemented (and may - still be desirable), because all that this class does is enforce that a - 'required' property has actually been configured with a value. It does - not check anything else... In particular, it does not check that a - configured value is not null. - - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Adapter that implements all methods on - as no-ops, which will not change normal processing of each object instantiated - by the container. Subclasses may override merely those methods that they are - actually interested in. - - - Note that this base class is only recommendable if you actually require - functionality. If all you need - is plain functionality, prefer a straight - implementation of that (simpler) interface. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Extension of the interface, - adding a callback for predicting the eventual type of a processed object. - - This interface is a special purpose interface, mainly for - internal use within the framework. In general, application-provided - post-processors should simply implement the plain - interface or derive from the - class. New methods might be added to this interface even in point releases. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Subinterface of - - that adds a before-instantiation callback and a callback after instantiation but before - explicit properties are set or autowiring occurs. - - - - Typically used to suppress default instantiation for specific target objects, - for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, - lazily initializing targets, etc), or to implement additional injection strategies such as field - injection. - - - This interface is a special purpose interface, mainly for internal use within the framework. - It is recommended to implement the plain interface as far as - possible, or to derive from in order to be shielded - from extension to this interface. - - - Juergen Hoeller - Rick Evans (.NET) - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Predicts the type of the object to be eventually returned from this - processors callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Predicts the type of the object to be eventually returned from this - processors PostProcessBeforeInstantiation callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Cache for validated object names, skipping re-validation for the same object - - - - - Post-process the given property values before the factory applies them - to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. - - The property values that the factory is about to apply (never null). - The 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances or null to skip property population. - - If a required property value has not been specified - in the configuration metadata. - - - - Determines whether the supplied property is required to have a value, that is to be dependency injected. - - - This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that - the property has a setter method. - - The target PropertyInfo - - true if the supplied property has been marked as being required;; otherwise, false if - not or if the supplied property does not have a setter method - - - - - Builds an exception message for the given list of invalid properties. - - The list of names of invalid properties. - Name of the object. - The exception message - - - - Sets the type of the required attribute, to be used on a property setter - - - The default required attribute type is the Spring-provided attribute. - This setter property exists so that developers can provide their own - (non-Spring-specific) annotation type to indicate that a property value is required. - - The type of the required attribute. - - - - Base class that provides common functionality needed for several IObjectFactoryPostProcessor - implementations - - Mark Pollack - - - - Allows for custom modification of an application context's object - definitions, adapting the object property values of the context's - underlying object factory. - - -

- Application contexts can auto-detect - IObjectFactoryPostProcessor objects in their object definitions and - apply them before any other objects get created. -

-

- Useful for custom config files targeted at system administrators that - override object properties configured in the application context. -

-

- See PropertyResourceConfigurer and its concrete implementations for - out-of-the-box solutions that address such configuration needs. -

-
- Juergen Hoeller - Rick Evans (.Net) -
- - - Modify the application context's internal object factory after its - standard initialization. - - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - The object factory used by the application context. - - - In case of errors. - -
- - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Resolves the supplied into a - instance. - - The object that is to be resolved into a - instance. - The error context source. - The error context string. - A resolved . - -

- This (default) implementation supports resolving - s and s. - Only override this method if you want to key your type alias - on something other than s - and s. -

-
- - If the supplied is , - or the supplied cannot be resolved. - -
- - - Return the order value of this object, with a higher value meaning - greater in terms of sorting. - - The order value. - - - - - Simple template superclass for - implementations that allows for the creation of a singleton or a prototype - instance (depending on a flag). - - - If the value of the - - property is (this is the default), this class - will create a single instance of it's object upon initialization and - subsequently return the singleton instance; else, this class will - create a new instance each time (prototype mode). Subclasses must - implement the - - template method to actually create objects. - - Juergen Hoeller - Keith Donald - Simon White (.NET) - - - - Interface to be implemented by objects used within an - that are themselves - factories. - - -

- If an object implements this interface, it is used as a factory, - not directly as an object. s - can support singletons and prototypes - ()... - please note that an - itself can only ever be a singleton. It is a logic error to configure an - itself to be a prototype. -

- - An object that implements this interface cannot be used as a normal object. - -
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - - If this method is being called in the context of an enclosing IoC container and - returns , the IoC container will consider this factory - object as not being fully initialized and throw a corresponding (and most - probably fatal) exception. - - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - 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? - - - - - Invoked by an - after it has injected all of an object's dependencies. - - - In the event of misconfiguration (such as the failure to set a - required property) or if initialization fails. - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - Template method that subclasses must override to construct - the object returned by this factory. - - - Invoked once immediately after the initialization of this - in the case of - a singleton; else, on each call to the - - method. - - - If an exception occured during object creation. - - - A distinct instance of the object created by this factory. - - - - - Performs cleanup on any cached singleton object. - - -

- Only makes sense in the context of a singleton object. -

-
- - -
- - - Is the object managed by this factory a singleton or a prototype? - - -

- Please note that changing the value of this property after - this factory object instance has been created by an enclosing - Spring.NET IoC container really is a programming error. This - property should really only be set once, prior to the invocation - of the - - callback method. -

-
- -
- - - Return the of object that this - creates, or - if not known in advance. - - - - - - The various autowiring modes. - - Rick Evans - - - - Do not autowire. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Implementation of that - resolves variable name against command line arguments. - - Aleksandar Seovic - - - - Defines contract that different variable sources have to implement. - - -

- The "variable sources" are objects containing name-value pairs - that allow a variable value to be retrieved for the given name.

-

- Out of the box, Spring.NET supports a number of variable sources, - that allow users to obtain variable values from .NET config files, - Java-style property files, environment, registry, etc.

-

- Users can always write their own variable sources implementations, - that will allow them to load variable values from the database or - other proprietary data source.

-
- - - - - - - Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Default constructor. - Initializes command line arguments from the environment. - - - - - Constructor that allows arguments to be passed externally. - Useful for testing. - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes command line arguments dictionary. - - - - - Gets or sets a prefix that should be used to - identify arguments to extract values from. - - - A prefix that should be used to identify arguments - to extract values from. Defaults to slash ("/"). - - - - - Gets or sets a character that should be used to - separate argument name from its value. - - - A character that should be used to separate argument - name from its value. Defaults to colon (":"). - - - - - Implementation of that - resolves variable name against name-value sections in - the standard .NET configuration file. - - Aleksandar Seovic - - - - Initializes a new instance of - - - - - Initializes a new instance of from the given - - - - - Initializes a new instance of from the given - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets a list of section names variables should be loaded from. - - - All sections specified need to be handled by the - in order to be processed successfully. - - - A list of section names variables should be loaded from. - - - - - Convinience property. Gets or sets a single section - to read properties from. - - - The section specified needs to be handled by the - in order to be processed successfully. - - - A section to read properties from. - - - - - Implementation of that - resolves variable name against provided variables. - - - Variable name resolution is case insensitive. - - Bruno Baia - - - - Initializes a new instance of . - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets variables. - - - - - Various utility methods for .NET style .config files. - - -

- Currently supports reading custom configuration sections and returning them as - objects. -

-
- Simon White - Mark Pollack -
- - - Initializes the type members - - - - - Reads the specified configuration section into a - . - - The resource to read. - The section name. - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - The populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Read from the specified configuration from the supplied XML - into a - . - - - - Does not support section grouping. The supplied XML - must already be loaded. - - - - The to read from. - - - The configuration section name to read. - - - A newly populated - . - - - If any errors are encountered while reading (this only applies to - v1.1 and greater of the .NET Framework). - - - If any errors are encountered while reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Returns the section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Reads the specified configuration section from the given - - - - - - - - Reads the specified configuration section from the given - - - - - - - - - Determine the configuration section handler type - - - - - Populates the supplied with values from - a .NET application configuration file. - - - The - to add any key-value pairs to. - - - The configuration section name in the a .NET application configuration - file. - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - if the supplied - was found. - - - - - Creates a new instance of the ConfigurationReader class. - - -

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

-
-
- - - Holder for constructor argument values for an object. - - -

- Supports values for a specific index or parameter name (case - insensitive) in the constructor argument list, and generic matches by - . -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Can be used as an argument filler for the - - overload when one is not looking for an argument by index. - - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Add argument value for the given index in the constructor argument list. - - - The index in the constructor argument list. - - - The argument value. - - - - - Add argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - The argument value. - - The of the argument - . - - - - - Add argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - The argument value. - - If the supplied is - or is composed wholly of whitespace. - - - - - Get argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - - The required of the argument. - - - The - - for the argument, or if none set. - - - - - Get argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - - The - - for the argument, or if none set. - - - - - Does this set of constructor arguments contain a named argument matching the - supplied name? - - - - The comparison is performed in a case-insensitive fashion. - - - The named argument to look up. - - if this set of constructor arguments - contains a named argument matching the supplied - name. - - - - - Add generic argument value to be matched by type. - - - The argument value. - - - - - Add generic argument value to be matched by type. - - The argument value. - - The of the argument - . - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - The - - for the argument, or if none set. - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list, or to the named argument, or - generically matches by . - - - The index of the argument in the constructor argument list. May be - negative, to denote the fact that we are not looking for an - argument by index (see - . - - - The name of the argument in the constructor argument list. May be - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Return the map of indexed argument values. - - - An with - indices as keys and - s - as values. - - - - - Return the map of named argument values. - - - An with - named arguments as keys and - s - as values. - - - - - Return the set of generic argument values. - - - A of - s. - - - - - Return the number of arguments held in this instance. - - - - - Returns true if this holder does not contain any argument values, - neither indexed ones nor generic ones. - - - - - Holder for a constructor argument value, with an optional - attribute indicating the target - of the actual constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - The of the argument - . Can also be one of the common - aliases (int, bool, - float, etc). - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Gets and sets the value for the constructor argument. - - -

- Only necessary for manipulating a registered value, for example in - s. -

-
-
- - - Return the of the constructor - argument. - - - - - - implementation that allows for convenient registration of custom - s. - - - - The use of this class is typically not required; the .NET - mechanism of associating a - with a - via the use of the - is the - recommended (and standard) way. This class primarily exists to cover - those cases where third party classes to which one does not have the - source need to be exposed to the type conversion mechanism. - -

- Because the - - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever type conversion is required. If - one is using a - - object definition within the scope of an - , no such automatic - pickup of the - - is performed (custom converters will have to be added manually using the - - method). For most application scenarios, one will get better - mileage using the - abstraction. -

-
- -

- The following examples all assume XML based configuration, and use - inner object definitions to define the custom - objects (nominally to - avoid polluting the object name space, but also because the - configuration simply reads better that way). -

- - - - - - - - - - - - - - - - -

- The following example illustrates a complete (albeit naieve) use case - for this class, including a custom - implementation, said - converters domain class, and the XML configuration that hooks the - converter in place and makes it available to a Spring.NET container for - use during object resolution. -

-

- The domain class is a simple data-only object that contains the data - required to send an email message (such as the host and user account - name). A developer would prefer to use a string of the form - UserName=administrator,Password=r1l0k1l3y,Host=localhost to - configure the mail settings and just let the container take care of the - conversion. -

- - namespace ExampleNamespace - { - public sealed class MailSettings - { - private string _userName; - private string _password; - private string _host; - - public string Host - { - get { return _host; } - set { _host = value; } - } - - public string UserName - { - get { return _userName; } - set { _userName = value; } - } - - public string Password - { - get { return _password; } - set { _password = value; } - } - } - - public sealed class MailSettingsConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (typeof (string) == sourceType) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - string text = value as string; - if(text != null) - { - MailSettings mailSettings = new MailSettings(); - string[] tokens = text.Split(','); - for (int i = 0; i < tokens.Length; ++i) - { - string token = tokens[i]; - string[] settings = token.Split('='); - typeof(MailSettings).GetProperty(settings[0]) - .SetValue(mailSettings, settings[1], null); - } - return mailSettings; - } - return base.ConvertFrom(context, culture, value); - } - } - - // a very naieve class that uses the MailSettings class... - public sealed class ExceptionLogger - { - private MailSettings _mailSettings; - - public MailSettings MailSettings { - { - set { _mailSettings = value; } - } - - public void Log(object value) - { - Exception ex = value as Exception; - if(ex != null) - { - // use _mailSettings instance... - } - } - } - } - -

- The attendant XML configuration for the above classes would be... -

- - - - - - - - - - - - - - - - Juergen Hoeller - Simon White (.NET) - - - - - - - Registers any custom converters with the supplied - . - - - The object factory to register the converters with. - - - In case of errors. - - - - - Resolves the supplied into a - instance. - - - The object that is to be resolved into a - instance. - - - A resolved instance. - - - If the supplied is , - or the supplied cannot be resolved. - - - - - The custom converters to register. - - -

- The uses the type name - of the class that requires conversion as the key, and an - instance of the - that will effect - the conversion. Alternatively, the actual - of the class that requires conversion - can be used as the key. -

-
- -

- - IDictionary converters = new Hashtable(); - converters.Add( "System.Date", new MyCustomDateConverter() ); - // a System.Type instance can also be used as the key... - converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); - -

-
-
- - - implementation that - creates delegates. - - -

- Supports the creation of s for both - instance and methods. -

-
- Rick Evans -
- - - Callback method called once all factory properties have been set. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Creates the delegate. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - The of - created by this factory. - - -

- Returns the - if accessed prior to the method - being called. -

-
-
- - - The of the - created by this factory. - - - - - The name of the method that is to be invoked by the created - delegate. - - - - - The target if the - refers to a method. - - - - - The target object if the - refers to an instance method. - - - - - A generic implementation of an , that delegates post processing to a passed delegate - - - This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. - - - The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on - the context instance: - - IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); - ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => - { - of.RegisterSingleton("someObject", someObject); - })); - - - Erich Eichinger - - - - Get or Set the handler to delegate configuration to - - - - - Descriptor for a specific dependency that is about to be injected. - Wraps a constructor parameter, a method parameter or a field, - allowing unified access to their metadata. - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for a method or constructor parameter. - Considers the dependency as 'eager' - - The MethodParameter to wrap. - if set to true if the dependency is required. - - - - Initializes a new instance of the class for a method or a constructor parameter. - - The MethodParameter to wrap. - if set to true the dependency is required. - if set to true the dependency is 'eager' in the sense of - eagerly resolving potential target objects for type matching. - - - - Gets a value indicating whether this dependency is required. - - true if required; otherwise, false. - - - - Determine the declared (non-generic) type of the wrapped parameter/field. - - The type of the dependency (never null - - - - Gets a value indicating whether this is eager in the sense of - eagerly resolving potential target beans for type matching. - - true if eager; otherwise, false. - - - - Gets the wrapped MethodParameter, if any. - - The method parameter. - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
- - If the value is . - - - If the value is an . - - - If the value is an interface. - -
- - - The of objects created by this factory. - - - Always returns the . - - - - - A very simple, hashtable-based implementation of - - Erich Eichinger - - - - Creates a new, empty variable source - - - - - Creates a new, empty and case-insensitive variable source - - - - - Create a new variable source from a list of paired string values. - - - - The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: - - new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) - - - - the argument list containing pairs, or null - - - - Initializes a new instance of the DictionaryVariableSource class. - - - - - Creates a new variable source, reading values from another dictionary - and converting them to strings if necessary - - - - - Adds a key/value pair - - this dictionary. allows for fluent config - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Performs a variable name lookup - - - - - Specifies how instances of the - - class must apply environment variables when replacing values. - - Mark Pollack - - - - Never replace environment variables. - - - - - If properties are not specified via a resource, - then resolve using environment variables. - - - - - Apply environment variables first before applying properties from a - resource. - - - - - Implementation of that - resolves variable name against environment variables. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Holder for event handler values for an object. - - Rick Evans (.NET) - - - - The empty array of s. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Adds the supplied handler to the collection of event handlers. - - The handler to be added. - - - - The mapping of event names to an - of - s. - - - - - Gets the of events - that have handlers associated with them. - - - - - Gets the of - s for the supplied - event name. - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to a Spring that should be evaluated at runtime. - - Aleksandar Seovic - - - - Creates a new instance of the - - class. - - The expression to resolve. - - - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Gets or sets the expression string. Setting the expression string will cause - the expression to be parsed. - - The expression string. - - - - Return the expression. - - - - - Properties for this expression node. - - - - - implementation that - retrieves a static or non-static public field value. - - -

- Typically used for retrieving public constants. -

-
- -

- The following example retrieves the field value... -

- - - - - - -

- The previous example could also have been written using the convenience - - property, like so... -

- - - - - -

- This class also implements the - interface - (). - If the id (or name) of one's - - object definition is set to the - of the field to be retrieved, then the id (or - name) of one's object definition will be used for the name of the - field lookup. See below for an example of this - concise style of definition. -

- - - - - - -

- The usage for retrieving instance fields is similar. No example is shown - because public instance fields are generally bad practice; but if - you have some legacy code that exposes public instance fields, or if you - just really like coding public instance fields, then you can use this - implementation to - retrieve such field values. -

- - Juergen Hoeller - Rick Evans (.NET) - - - - Interface to be implemented by objects that wish to be aware of their object - name in an . - - -

- Note that most objects will choose to receive references to collaborating - objects via respective properties. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. -

-
-
- - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - -

- This method allows the object instance to perform initialization only - possible when all object properties have been set and to throw an - exception in the event of misconfiguration. -

-
- - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The of the - field to be retrieved. - - - - - Set the name of the object in the object factory that created this object. - - - The name of the object in the factory. - - -

- In the context of the - - class, the - - value will be interepreted as the value of the - - property if no value has been explicitly assigned to the - - property. This allows for concise object definitions with just an id or name; - see the class documentation for - - for an example of this style of usage. -

-
-
- - - The name of the field the value of which is to be retrieved. - - -

- If the - - has been set (and is not ), then the value of this property - refers to an instance field name; it otherwise refers to a - field name. -

-
-
- - - The object instance on which the field is defined. - - - - - The on which the field is defined. - - - - - The of object that this - creates, or - if not known in advance. - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - Extension of the - interface to be implemented by object factories that are capable of - autowiring and expose this functionality for existing object instances. - - Juergen Hoeller - Rick Evans (.NET) - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - the resolved object, or null if none found - if dependency resolution failed - - - - Extension of the interface - that injects dependencies into the object managed by the factory. - - Bruno Baia - - - - Gets the template object definition that should be used - to configure the instance of the object managed by this factory. - - - - - SPI interface to be implemented by most if not all listable object factories. - - -

- Allows for framework-internal plug'n'play, e.g. in - . -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Configuration interface to be implemented by most if not all object - factories. - - -

- Provides the means to configure an object factory in addition to the - object factory client methods in the - interface. -

-

- Allows for framework-internal plug'n'play even when needing access to object - factory configuration methods. -

-

- When disposed, it will destroy all cached singletons in this factory. Call - when you want to shutdown - the factory. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Interface that defines a registry for shared object instances. - - - Can be implemented by - implementations in order to expose their singleton management facility - in a uniform manner. - - The interface extends this interface. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Registers the given existing object as singleton in the object registry, - under the given object name. - - - - The given instance is supposed to be fully initialized; the registry - will not perform any initialization callbacks (in particular, it won't - call IInitializingObject's AfterPropertiesSet method). - The given instance will not receive any destruction callbacks - (like IDisposable's Dispose method) either. - - - If running within a full IObjectFactory: Register an object definition - instead of an existing instance if your object is supposed to receive - initialization and/or destruction callbacks. - - - Typically invoked during registry configuration, but can also be used - for runtime registration of singletons. As a consequence, a registry - implementation should synchronize singleton access; it will have to do - this anyway if it supports a BeanFactory's lazy initialization of singletons. - - - Name of the object. - The singleton object. - - - - - - Return the (raw) singleton object registered under the given name. - - - - Only checks already instantiated singletons; does not return an Object - for singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to access manually registered singletons - . Can also be used to access a singleton - defined by an object definition that already been created, in a raw fashion. - - - Name of the object to look for. - the registered singleton object, or null if none found - - - - - Check if this registry contains a singleton instance with the given name. - - - - Only checks already instantiated singletons; does not return true - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check whether a - singleton defined by an object definition has already been created. - - - To check whether an object factory contains an object definition with a given name, - use ListableBeanFactory's ContainsObjectDefinition. Calling both - ContainsObjectDefinition and ContainsSingleton answers - whether a specific object factory contains an own object with the given name. - - - Use IObjectFactory's ContainsObject for general checks whether the - factory knows about an object with a given name (whether manually registered singleton - instance or created by bean definition), also checking ancestor factories. - - - Name of the object to look for. - - true if this bean factory contains a singleton instance with the given name; otherwise, false. - - - - - - - - Gets the names of singleton objects registered in this registry. - - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - The list of names as String array (never null). - - - - - - - Gets the number of singleton beans registered in this registry. - - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - The number of singleton objects. - - - - - - - Ignore the given dependency type for autowiring. - - -

- To be invoked during factory configuration. -

-

- This will typically be used for dependencies that are resolved - in other ways, like - through . -

-
- - The to be ignored. - -
- - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - -

- To be invoked during factory configuration. -

-
- - The - to register. - -
- - - Given an object name, create an alias. - - -

- This is typically used to support names that are illegal within - XML ids (which are used for object names). -

-

- Typically invoked during factory configuration, but can also be - used for runtime registration of aliases. Therefore, a factory - implementation should synchronize alias access. -

-
- The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - -
- - - Register the given custom - for all properties of the given . - - -

- To be invoked during factory configuration. -

-
- - The required of the property. - - - The to register. - -
- - - Set the parent of this object factory. - - -

- Note that the parent shouldn't be changed: it should only be set outside - a constructor if it isn't available when an object of this class is - created. -

-
-
- - - Returns the current number of registered - s. - - - The current number of registered - s. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - -

- Typically invoked at the end of factory setup, if desired. -

-

- As this is a startup method, it should destroy already created singletons if - it fails, to avoid dangling resources. In other words, after invocation - of that method, either all or no singletons at all should be - instantiated. -

-
- - If one of the singleton objects could not be created. - -
- - - Register a special dependency type with corresponding autowired value. - - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the BeanFactory interface itself. - - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - May be used to store custom value references in object definition properties. - - - Erich Eichinger - - - - - - the object factory holding the given object definition - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Subinterface of - that adds - a before-destruction callback. - - - The typical usage will be to invoke custom destruction callbacks on - specific object types, matching corresponding initialization callbacks. - - Juergen Hoeller - Simon White (.NET) - - - - Apply this - to the - given new object instance before its destruction. Can invoke custom - destruction callbacks. - - The new object instance. - The name of the object. - - In case of errors. - - - - - Denotes a special placeholder collection that may contain - s or - other placeholder objects that will need to be resolved. - - -

- 'A special placeholder collection' means that the elements of this - collection can be placeholders for objects that will be resolved later by - a Spring.NET IoC container, i.e. the elements themselves will be - resolved at runtime by the enclosing IoC container. -

-

- The core Spring.NET library already provides three implementations of this interface - straight out of the box; they are... -

- - - - . - - - - - . - - - - - . - - - -

- If you have a custom collection class (i.e. a class that either implements the - directly or derives from a class that does) - that you would like to expose as a special placeholder collection (i.e. one that can - have s as elements - that will be resolved at runtime by an appropriate Spring.NET IoC container, just - implement this interface. -

-
- -

- Lets say one has a Bag class (i.e. a collection that supports bag style semantics). -

- - using System; - - using Spring.Objects.Factory.Support; - - namespace MyNamespace - { - public sealed class Bag : ICollection - { - // ICollection implementation elided for clarity... - - public void Add(object o) - { - // implementation elided for clarity... - } - } - - public class ManagedBag : Bag, IManagedCollection - { - public ICollection Resolve( - string objectName, RootObjectDefinition definition, - string propertyName, ManagedCollectionElementResolver resolver) - { - Bag newBag = new Bag(); - string elementName = propertyName + "[bag-element]"; - foreach(object element in this) - { - object resolvedElement = resolver(objectName, definition, elementName, element); - newBag.Add(resolvedElement); - } - return newBag; - } - } - } - -
- Rick Evans -
- - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Resolves a single element value of a managed collection. - - -

- If the does not need to be resolved or - converted to an appropriate , the - will be returned as-is. -

-
- - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - That element of a managed collection that may need to be resolved - to a concrete value. - - A fully resolved element. -
- - - Describes an object instance, which has property values, constructor - argument values, and further information supplied by concrete implementations. - - -

- This is just a minimal interface: the main intention is to allow - - (like PropertyPlaceholderConfigurer) to access and modify property values. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - Return the event handlers for any events exposed by this object. - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The name of the parent definition of this object definition, if any. - - - - - The target scope for this object. - - - - - Get the role hint for this object definition - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition. - - Note that this does not have to be the actual type name used at runtime, - in case of a child definition overrding/inheriting the the type name from its - parent. It can be modifed during object factory post-processing, typically - replacing the original class name with a parsed variant of it. - Hence, do not consider this to be the definitive bean type at runtime - but rather only use it for parsing purposes at the individual object - definition level. - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - implementation that - creates instances of the class. - - -

- Typically used for retrieving shared - instances for common topics (such as the 'DAL', 'BLL', etc). The - - property determines the name of the - Common.Logging logger. -

-
- Rick Evans - -
- - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The name of the instance served up by - this factory. - - - If the supplied is - or contains only whitespace character(s). - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object - managed by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The name of the instance served up by - this factory. - - - The name of the instance served up by - this factory. - - - If the supplied to the setter is - or contains only whitespace character(s). - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Tag subclass used to hold a dictionary of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Interface representing an object whose value set can be merged with that of a parent object. - - Rob Harrop - Mark Pollack (.NET) - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. - - - - - Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. - - The approximate number of elements that the object can initially contain. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the keys of this managed dictionary. - - The unresolved name for the type of the keys of this managed dictionary. - - - - Gets or sets the unresolved name for the - of the values of this managed dictionary. - - The unresolved name for the type of the values of this managed dictionary. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a list of managed elements. - - Rod Johnson - Rick Evans (.NET) - - - - Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. - - - - - Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. - - The number of elements that the new list can initially store. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed list. - - The unresolved name for the type of the elements of this managed list. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag class which represent a Spring-managed instance that - supports merging of parent/child definitions. - - - - - Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - - - - Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - The initial number of entries that the can contain. is less than zero. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a set of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed set. - - The unresolved name for the type of the elements of this managed set. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - An that returns a value - that is the result of a or instance method invocation. - - -

- Note that this class generally is expected to be used for accessing factory methods, - and as such defaults to operating in singleton mode. The first request to - - by the owning object factory will cause a method invocation, the return - value of which will be cached for all subsequent requests. The - property may be set to - , to cause this factory to invoke the target method each - time it is asked for an object. -

-

- A target method may be specified by setting the - property to a string representing - the method name, with specifying - the that the method is defined on. - Alternatively, a target instance method may be specified, by setting the - property as the target object, and - the property as the name of the - method to call on that target object. Arguments for the method invocation may be - specified by setting the property. -

-

- Another (esoteric) use case for this factory object is when one needs to call a method - that doesn't return any value (for example, a class method to - force some sort of initialization to happen)... this use case is not supported by - factory-methods, since a return value is needed to become the object. -

-

- - This class depends on the - - method being called after all properties have been set, as per the - contract. If you are - using this class outside of a Spring.NET IoC container, you must call one of either - or - yourself to ready the object's internal - state, or you will get a nasty . - -

-
- -

- The following example uses an instance of this class to call a - factory method... -

- - - - - - - - 1st - 2nd - and 3rd arguments - - - - -

- The following example is similar to the preceding example; the only pertinent difference is the fact that - a number of different objects are passed as arguments, demonstrating that not only simple value types - are valid as elements of the argument list... -

- - - - - - - - - - - 1st - - - - - - - http://www.springframework.net/ - - - - - -

- Named parameters are also supported... this next example yields the same results as - the preceding example (that did not use named arguments). -

- - - - - - - - - - 1st - and 3rd arguments - 2nd - - - - -

- Similarly, the following example uses an instance of this class to call an instance method... -

- - - - - - - - - -

- The above example could also have been written using an anonymous inner object definition... if the - object on which the method is to be invoked is not going to be used outside of the factory object - definition, then this is the preferred idiom because it limits the scope of the object on which the - method is to be invoked to the surrounding factory object. -

- - - - - - - - - - Colin Sampaleanu - Juergen Hoeller - Rick Evans (.NET) - Simon White (.NET) - - - - - - Specialisation of the class that tries - to convert the given arguments for the actual target method via an - appropriate implementation. - - Juergen Hoeller - Rick Evans - - - - - Helper class allowing one to declaratively specify a method call for later invocation. - - -

- Typically not used directly but via its subclasses such as - . -

-

- Usage: specify either the and - or the - and - properties respectively, and - (optionally) any arguments to the method. Then call the - method to prepare the invoker. - Once prepared, the invoker can be invoked any number of times. -

-
- -

- The following example uses the class to invoke the - ToString() method on the Foo class using a mixture of both named and unnamed - arguments. -

- - public class Foo - { - public string ToString(string name, int age, string address) - { - return string.Format("{0}, {1} years old, {2}", name, age, address); - } - - public static void Main() - { - Foo foo = new Foo(); - MethodInvoker invoker = new MethodInvoker(); - invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; - invoker.AddNamedArgument("age", 29); - invoker.Prepare(); - // at this point, the arguments that will be passed to the method invocation - // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} - string details = (string) invoker.Invoke(); - Console.WriteLine (details); - // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' - } - } - -
- Colin Sampaleanu - Juergen Hoeller - Simon White (.NET) -
- - - The used to search for - the method to be invoked. - - - - - The value returned from the invocation of a method that returns void. - - - - - The method that will be invoked. - - - - - Creates a new instance of the class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set, or a matching argument could not be found - for a named argument (typically down to a typo). - - - If the specified method could not be found. - -
- - - Searches for and returns the method that is to be invoked. - - - The return value of this method call will subsequently be returned from the - . - - The method that is to be invoked. - - If no method could be found. - - - If more than one method was found. - - - - - Adds the named argument to this instances mapping of argument names to argument values. - - - The name of an argument on the method that is to be invoked. - - - The value of the named argument on the method that is to be invoked. - - - - - Returns the prepared object that - will be invoked. - - -

- A possible use case is to determine the return of the method. -

-
- - The prepared object that - will be invoked. - -
- - - Invoke the specified method. - - -

- The invoker needs to have been prepared beforehand (via a call to the - method). -

-
- - The object returned by the method invocation, or - if the method returns void. - - - If at least one of the arguments passed to this - was incompatible with the signature of the invoked method. - -
- - - The target on which to call the target method. - - -

- Only necessary when the target method is ; - else, a target object needs to be specified. -

-
-
- - - The target object on which to call the target method. - - -

- Only necessary when the target method is not ; - else, a target class is sufficient. -

-
-
- - - The name of the method to be invoked. - - -

- Refers to either a method - or a non- method, depending on - whether or not a target object has been set. -

-
- -
- - - Arguments for the method invocation. - - -

- Ordering is significant... the order of the arguments in this - property must match the ordering of the various parameters on the target - method. There does however exist a small possibility for confusion when - the arguments in this property are supplied in addition to one or more named - arguments. In this case, each named argument is slotted into the index position - corresponding to the named argument... once once all named arguments have been - resolved, the arguments in this property are slotted into any remaining (empty) - slots in the method parameter list (see the example in the overview of the - class if this is not clear). -

-

- If this property is not set, or the value passed to the setter invocation - is or a zero-length array, a method with no (un-named) arguments is assumed. -

-
- -
- - - The resolved arguments for the method invocation. - - - - This property is not set until the target method has been resolved via a call to the - method). It is a combination of the - named and plain vanilla arguments properties, and it is this object array that - will actually be passed to the invocation of the target method. - -

- Setting the value of this property to results in basically clearing out any - previously prepared arguments... another call to the - method will then be required to prepare the arguments again (or the prepared arguments - can be set explicitly if so desired). -

-
- - -
- - - Named arguments for the method invocation. - - -

- The keys of this dictionary are the () names of the - method arguments, and the () values are the actual - argument values themselves. -

-

- If this property is not set, or the value passed to the setter invocation - is a reference, a method with no named arguments is assumed. -

-
- -
- - - Creates a new instance of the - class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set. - - - If the specified method could not be found. - -
- - - Register the given custom - for all properties of the given . - - - The of property. - - - The to register. - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - -

- Returns the return value of the method that is to be invoked. -

-

- Will return the same value each time if the - - property value is . -

-
- - An instance (possibly shared or independent) of the object managed by - this factory. - - -
- - - Prepares this method invoker. - - - If all required properties are not set. - - - If the specified method could not be found. - - - - - - If a singleton should be created, or a new object on each request. - Defaults to . - - - - - Return the return value of the method - that this factory invokes, or if not - known in advance. - - -

- If the return value of the method that this factory is to invoke is - , then the - will be returned (in accordance with the - contract that - treats a value as a configuration error). -

-
- -
- - - Holder for an with - name and aliases. - - -

- Recognized by - - for inner object definitions. Registered by - , - which also uses it as general holder for a parsed object definition. -

-

- Can also be used for programmatic registration of inner object - definitions. If you don't care about the functionality offered by the - interface and the like, - registering - or is good enough. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - - The name of the object definition. - - - - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - The name of the object. - - Any aliases for the supplied - - - - - The held by this - instance. - - - - - The name of the object definition. - - - - - Any aliases for the object definition. - - -

- Guaranteed to never return ; if the associated - - does not have any aliases associated with it, then an empty - array will be returned. -

-
-
- - - Visitor class for traversing objects, in particular - the property values and constructor arguments contained in them resolving - object metadata values. - - - Used by and - to parse all string values contained in a ObjectDefinition, resolving any placeholders found. - - Mark Pollack - - - - Initializes a new instance of the class. - - The handler to be called for resolving variables contained in a string. - - - - Initializes a new instance of the class - for subclassing - - Subclasses should override the ResolveStringValue method - - - - Traverse the given ObjectDefinition object and the MutablePropertyValues - and ConstructorArgumentValues contained in them. - - The object definition to traverse. - - - - Visits the ObjectDefinition property ObjectTypeName, replacing string values using - the specified IVariableSource. - - The object definition. - - - - Visits the property values of the ObjectDefinition, replacing string values - using the specified IVariableSource. - - The object definition. - - - - Visits the indexed constructor argument values, replacing string values using the - specified IVariableSource. - - The indexed argument values. - - - - Visits the named constructor argument values, replacing string values using the - specified IVariableSource. - - The named argument values. - - - - Visits the generic constructor argument values, replacing string values using - the specified IVariableSource. - - The genreic argument values. - - - - Configures the constructor argument ValueHolder. - - The vconstructor alue holder. - - - - Resolves the given value taken from an object definition according to its type - - the value to resolve - the resolved value - - - - Visits the ManagedList property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet properties KeyTypeName and ValueTypeName and - calls for dictionary's value element. - - - - - Visits the elements of a NameValueCollection and calls - for value of each element. - - - - - calls the to resolve any variables contained in the raw string. - - the raw string value containing variable placeholders to be resolved - If no has been configured. - the resolved string, having variables being replaced, if any - - - - Returns a value that is an - that - returns an object from an - . - - -

- The primary motivation of this class is to avoid having a client object - directly calling the - - method to get a prototype object out of an - , which would be a - violation of the inversion of control principle. With the use of this - class, the client object can be fed an - as a property - that directly returns one target prototype object. -

-

- The object referred to by the value of the - - property does not have to be a prototype object, but there is little - to no point in using this class in conjunction with a singleton object. -

-
- -

- The following XML configuration snippet illustrates the use of this - class... -

- - - - - - - - - - - - - - - - Colin Sampaleanu - Simon White (.NET) - - - - Interface to be implemented by objects that wish to be aware of their owning - . - - -

- For example, objects can look up collaborating objects via the factory. -

-

- Note that most objects will choose to receive references to collaborating - objects via respective properties and / or an appropriate constructor. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - 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. - -
- - - Returns an instance of the object factory. - - The object factory. - - - - Invoked by an - after it has set all supplied object properties. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Sets the name of the target object. - - - - - 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 of object created by this factory. - - - - - Interface defining a factory which can return an object instance - (possibly shared or independent) when invoked. - - - This interface is typically used to encapsulate a generic factory - which returns a new instance (prototype) on each invocation. - It is similar to the , but - implementations of the aforementioned interface are normally meant to be defined - as instances by the user in an , - while implementations of this class are normally meant to be fed as a property to - other objects; as such, the - method - has different exception handling behavior. - - Colin Sampaleanu - Simon White (.NET) - - - - Return an instance (possibly shared or independent) - of the object managed by this factory. - - - An instance of the object (should never be ). - - - - - Creates a new instance of the GenericObjectFactory class. - - - The enclosing - . - - - - - Returns the object created by the enclosed object factory. - - The created object. - - - - An implementation - that exposes an arbitrary target object under a different name. - - -

- Usually, the target object will reside in a different object - definition file, using this - to link it in - and expose it under a different name. Effectively, this corresponds - to an alias for the target object. -

- - For XML based object definition files, a <alias> - tag is available that effectively achieves the same. - -
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Initialize a new default instance - - - - - Initialize this instance with the predefined and . - - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The name of the target object. - - -

- The target object may potentially be defined in a different object - definition file. -

-
- The name of the target object. -
- - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Callback that supplies the owning factory to an object instance. - - - The owning - (may not be ). The object can immediately - call methods on the factory. - - - In case of initialization errors. - - - - - - - Erich Eichinger - - - - Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. - - - - - Role hint indicating that a is a supporting - part of some larger configuration, typically an outer ComponentDefinition - SUPPORT objects are considered important enough to be aware - of when looking more closely at a particular ComponentDefinition, - but not when looking at the overall configuration of an application. - - - - - Role hint indicating that a is providing an - entirely background role and has no relevance to the end-user. This hint is - used when registering objects that are completely part of the internal workings - of a ComponentDefinition. - - - - - Implementation of that - resolves variable name against Java-style property file. - - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets the locations of the property files - to read properties from. - - - The locations of the property files - to read properties from. - - - - - Convinience property. Gets or sets a single location - to read properties from. - - - A location to read properties from. - - - - - Sets a value indicating whether to ignore resource locations that do not exist. This will call - the Exists property. - - - true if one should ignore missing resources; otherwise, false. - - - - - Overrides default values in one or more object definitions. - - -

- Instances of this class override already existing values, and is - thus best suited to replacing defaults. If you need to replace - placeholder values, consider using the - - class instead. -

-

- In contrast to the - - class, the original object definition can have default - values or no values at all for such object properties. If an overriding - configuration file does not have an entry for a certain object property, - the default object value is left as is. Also note that it is not - immediately obvious to discern which object definitions will be mutated by - one or more - s - simply by looking at the object configuration. -

-

- Each line in a referenced configuration file is expected to take the - following form... -

- - - -

- The name.property key refers to the object name and the - property that is to be overridden; and the value is the overridding - value that will be inserted into the appropriate object definition's - named property. -

-

- Please note that in the case of multiple - s - that define different values for the same object definition value, the - last overridden value will win (due to the fact that the values - supplied by previous - s - will be overridden). -

-
- -

- The following XML context definition defines an object that has a number - of properties, all of which have default values... -

- - - - - - - - -

- What follows is a .NET config file snippet for the above example (assuming - the need to override one of the default values)... -

- - - - - - -
- Juergen Hoeller - Simon White (.NET) - - - -
- - - Allows for the configuration of individual object property values from - a .NET .config file. - - -

- Useful for custom .NET .config files targetted at system administrators - that override object properties configured in the application context. -

-

- Two concrete implementations are provided in the Spring.NET core library: - - - - - for <add key="placeholderKey" value="..."/> style - overriding (pushing values from a .NET .config file into object - definitions). - - - - - - for replacing "${...}" placeholders (pulling values from a .NET .config - file into object definitions). - - - -

-

- Please refer to the API documentation for the concrete implementations - listed above for example usage. -

-
- Juergen Hoeller - Simon White (.NET) - - -
- - - The default configuration section name to use if none is explictly supplied. - - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Modify the application context's internal object factory after its - standard initialization. - - - The object factory used by the application context. - - - In case of errors. - - - - - - Loads properties from the configuration sections - specified in into . - - The instance to be filled with properties. - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Validates the supplied . - - -

- Basically, if external locations are specified, ensure that either - one or a like number of config sections are also specified. -

-
- - The to be validated. - -
- - - Simply initializes the supplied - collection with this instances default - (if any). - - - The collection to be so initialized. - - - - - The policy for resolving conflicting property overrides from - several resources. - - -

- When merging conflicting property overrides from several resources, - should append an override with the same key be appended to the - current value, or should the property override from the last resource - processed override previous values? -

-

- The default value is ; i.e. a property - override from the last resource to be processed overrides previous - values. -

-
- - if the property override from the last resource - processed overrides previous values. - -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - The default properties to be applied. - - -

- These are to be considered defaults, to be overridden by values - loaded from other resources. -

-
-
- - - The location of the .NET .config file that contains the property - overrides that are to be applied. - - - - - The locations of the .NET .config files containing the property - overrides that are to be applied. - - - - - The configuration sections to look for within the .config files. - - - - - - - Should a failure to find a .config file be ignored? - - -

- is only appropriate if the .config file is - completely optional. The default is . -

-
- - if a failure to find a .config file is to be - ignored. - -
- - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Process the given key as 'name.property' entry. - - - The object factory containing the object definitions that are to be - processed. - - The key. - The value. - - If an error occurs. - - - If the property was not well formed (i.e. not in the format "name.property"). - - - - - implementation that - evaluates a property path on a given target object. - - -

- The target object can be specified directly or via an object name (see - example below). -

-

- Please note that the - is an implementation, and as such has - to comply with the contract of the - interface; more specifically, this means that the end result of the property lookup path - evaluation cannot be ( - implementations are not permitted to return ). If the resut of a - property lookup path evaluates to , an exception will be thrown. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Juergen Hoeller - Rick Evans (.NET) - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The target object that the property path lookup is to be applied to. - - -

- This would most likely be an inner object, but can of course be - any object reference. -

-
- - The target object that the property path lookup is to be applied to. - - -
- - - The (object) name of the target object that the property path lookup - is to be applied to. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this name prior to resolution. The implication of this is that - one cannot use the - class in conjunction with object names that start or end with whitespace. -

-
- - The (object) name of the target object that the property path lookup - is to be applied to. - - -
- - - The property (lookup) path to be applied to the target object. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this path prior to resolution. Whitespace is not a valid - identifier for property names (in part or whole) in CLS-based languages, - so this is a not unreasonable action. Please also note that whitespace - that is embedded within the property path will be left as-is (which may - or may not result in an error being thrown, depending on the context of - the whitespace). -

-
- -

- Examples of such property lookup paths can be seen below; note that - property lookup paths can be nested to an arbitrary level. -

- - name.length - accountManager.account['the key'].name - accounts[0].name - -
- - The property (lookup) path to be applied to the target object. - -
- - - The 'expected' of the result from evaluating the - property path. - - -

- This is not necessary for directly specified target objects, or - singleton target objects, where the can - be determined via reflection. Just specify this in case of a - prototype target, provided that you need matching by type (for - example, for autowiring). -

-

- It is permissable to set the value of this property to - (which in any case is the default value). -

-
- - The 'expected' of the result from evaluating the - property path. - -
- - - 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? - - - - - - Set the name of the object in the object factory that created this object. - - -

- The object name of this - - will be interpreted as "objectName.property" pattern, if neither the - - - have been supplied (set). -

-

- This allows for concise object definitions with just an id or name. -

-
- - The name of the object in the factory. - -
- - - 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. - - - - - Resolves placeholder values in one or more object definitions. - - -

- The default placeholder syntax follows the NAnt style: ${...}. - Instances of this class can be configured in the same way as any other - object in a Spring.NET container, and so custom placeholder prefix - and suffix values can be set via the - and properties. -

- -

- The following example XML context definition defines an object that has - a number of placeholders. The placeholders can easily be distinguished - by the presence of the ${} characters. -

- - - - - - - - -

- The associated XML configuration file for the above example containing the - values for the placeholders would contain a snippet such as .. -

- - - - - - - - -

- The preceding XML snippet listing the various property keys and their - associated values needs to be inserted into the .NET config file of - your application (or Web.config file for your ASP.NET web application, - as the case may be), like so... -

- - - - - - - - -
-

- - checks simple property values, lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. -

- - - - - - - - -

- In contrast to the - - class, this configurer only permits the replacement of explicit - placeholders in object definitions. Therefore, the original definition - cannot specify any default values for its object properties, and the - placeholder configuration file is expected to contain an entry for each - defined placeholder. That is, if an object definition contains a - placeholder ${foo}, there should be an associated - <add key="foo" value="..."/> entry in the - referenced placeholder configuration file. Default property values - can be defined via the inherited - - collection to overcome any perceived limitation of this feature. -

-

- If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. If you want to resolve properties from multiple configuration - resources, simply specify multiple resources via the - - property. Finally, please note that you can also define multiple - - instances, each with their own custom placeholder syntax. -

-
- Juergen Hoeller - Simon White (.NET) - - - -
- - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Initializes the new instance - - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Parse values recursively to be able to resolve cross-references between - placeholder values. - - - The map of constructor arguments / property values. - - The string to be resolved. - The placeholders that have already been visited - during the current resolution attempt (used to detect circular references - between placeholders). Only non-null if we're parsing a nested placeholder. - - If an error occurs. - - The resolved string. - - - - Resolve the given placeholder using the given name value collection, - performing an environment variables check according to the given mode. - - -

- The default implementation delegates to - - before/afer the environment variable check. Subclasses can override - this for custom resolution strategies, including customized points - for the environment properties check. -

-
- The placeholder to resolve - - The merged name value collection of this configurer. - - The environment variable mode. - - The resolved value or if none. - - -
- - - Resolve the given placeholder using the given name value collection. - - -

- This (the default) implementation simply looks up the value of the - supplied key. -

-

- Subclasses can override this for customized placeholder-to-key - mappings or custom resolution strategies, possibly just using the - given name value collection as fallback. -

-
- The placeholder to resolve. - - The merged name value collection of this configurer. - - The resolved value. -
- - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Controls how environment variables will be used to - replace property placeholders. - - -

- See the overview of the - - enumeration for the available options. -

-
-
- - - implementation that - retrieves a or non-static public property value. - - -

- Typically used for retrieving public property values. -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - Template method that subclasses must override to construct the object - returned by this factory. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - The of the static property - to be retrieved. - - - - - Arguments for the property invocation. - - -

- If this property is not set, or the value passed to the setter invocation - is a null or zero-length array, a property with no arguments is assumed. -

-
-
- - - The name of the property the value of which is to be retrieved. - - -

- Refers to either a property or a non-static property, - depending on a target object being set. -

-
-
- - - The object instance on which the property is defined. - - - - - The on which the property is defined. - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - Implementation of that - resolves variable name against registry key. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, - strings are concatenated to a comma-separated list following - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets the registry key to obtain variable values from. - - - The registry key to obtain variable values from. - - - - - - implementation that allows for convenient registration of custom - IResource implementations. - - -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of IResources is required. -

-
- Mark Pollack - - -
- - - Registers custom IResource implementations. The supplied - is not used since IResourse implementations - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The IResource implementations, i.e. resource handlers, to register. - - -

- The has the - contains the resource protocol name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - The value can be the fully qualified name of the IResource - implementation, a string, or - an actual of the IResource class - -

-
-
- - - A convenience class to create a - given the resource base - name and assembly name. - - -

- This is currently the preferred way of injecting resources into view - tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). - A GUI component (typically a Windows Form) is injected with - an instance, and can - then proceed to use the various GetXxx() methods on the - to retrieve images, - strings, custom resources, etc. -

-
- Mark Pollack - - - -
- - - Creates a . - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The root name of the resources. - - -

- For example, the root name for the resource file named - "MyResource.en-US.resources" is "MyResource". -

- - The namespace is also prefixed before the resource file name. - -
-
- - - The string representation of the assembly that contains the resource. - - - - - The . - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to another object in this factory to be resolved at runtime. - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - -

- This does not mark this object as being a reference to - another object in any parent factory. -

-
- The name of the target object. -
- - - Creates a new instance of the - - class. - - -

- This variant constructor allows a client to specifiy whether or not - this object is a reference to another object in a parent factory. -

-
- The name of the target object. - - Whether this object is an explicit reference to an object in a - parent factory. - -
- - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Return the target object name. - - - - - Is this is an explicit reference to an object in the parent - factory? - - - if this is an explicit reference to an - object in the parent factory. - - - - - Simple factory object for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target set. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - Configure all ISharedStateAware objects, delegating concrete handling to the list of . - - - - - Creates a new empty instance. - - - - - Creates a new preconfigured instance. - - - priority value affecting order of invocation of this processor. See interface. - - - - Iterates over configured list of s until - the first provider is found that
- a) true == provider.CanProvideState( instance, name )
- b) null != provider.GetSharedState( instance, name )
-
-
- - - A NoOp for this processor - - - The new object instance. - - - The name of the object. - - - the original . - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Get/Set the (already ordererd!) list of instances. - - - If this list is not set, the containing object factory will automatically - be scanned for instances. - - - - - Implementation of that - resolves variable name against special folders (as defined by - enumeration). - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves specified special folder to its full path. - - - The name of the special folder to resolve. Should be one of the values - defined by the enumeration. - - - The folder path if able to resolve, null otherwise. - - - - - - implementation that allows for convenient registration of custom - type aliases. - - - Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of type aliases is required. -

-
- Mark Pollack - - -
- - - Registers any type aliases. The supplied - is not used since type aliases - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The type aliases to register. - - -

- The has the - contains the alias name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - the value can be the fully qualified name of the type as a string or - an actual of the class that - being aliased. -

-
-
- - - Holder for a typed value. - - -

- Can be added to object definitions to explicitly specify - a target type for a value, - for example for collection - elements. -

-

- This holder just stores the value and the target - . The actual conversion will be performed by - the surrounding object factory. -

-
- Juergen Hoeller - Rick Evans (.NET) - Bruno Baia (.NET) -
- - - Creates a new instance of the - - class. - - - - - Initializes a new instance of the class. - - The value. - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The to convert to. - - - If the supplied is - . - - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The unresolved type to convert to. - - - If the supplied is a - or an empty string. - - - - - Determine the type to convert to, resolving it from a specified type name if necessary. - - The resolved type to convert to. - - - - The value that is to be converted. - - -

- Obviously if the - - is the , no conversion - will actually be performed. -

-
-
- - - The to convert to. - - - If the setter is supplied with a value. - - - - - The unresolved type to convert to. - - - If the setter is supplied with a value or an empty string. - - - - - Gets a value indicating whether this instance has target type. - - - true if this instance has target type; otherwise, false. - - - - - Provides methods for type-safe accessing s. - - Erich Eichinger - - - - Initialize a new instance of an - - The underlying to read values from. - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - An of 's type that contains the value of the specified variable - or , if returns null. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - An of 's type that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns or . - - A that contains the value of the specified variable - or , if returns null. - - - - - Resolves placeholder values in one or more object definitions - - - The placeholder syntax follows the NAnt style: ${...}. - Placeholders values are resolved against a list of - s. In case of multiple definitions - for the same property placeholder name, the first one in the - list is used. - Variable substitution is performed on simple property values, - lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. - - - - - - - - - - If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. - - Mark Pollack - - - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Create a new instance without any variable sources - - - - - Create a new instance and initialize with the given variable source - - - - - - Create a new instance and initialize with the given list of variable sources - - - - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Apply the property replacement using the specified s for all - object in the supplied - . - - - The - used by the application context. - - - If an error occured. - - - - - Sets the list of s that will be used to resolve placeholder names. - - A list of s. - - - - Sets that will be used to resolve placeholder names. - - A instance. - - - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - Context that gets passed along an object definition reading process, - encapsulating all relevant configuraiton as well as state. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The resource. - - - - Gets the resource. - - The resource. - - - - Abstract superclass - that implements default object creation. - - -

- Provides object creation, initialization and wiring, supporting - autowiring and constructor resolution. Handles runtime object - references, managed collections, and object destruction. -

-

- The main template method to be implemented by subclasses is - , - used for autowiring by type. Note that this class does not implement object - definition registry capabilities - ( - does). -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Abstract superclass for - implementations. - - -

- This class provides singleton / prototype determination, singleton caching, - object definition aliasing, - handling, and object definition merging for child object definitions. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Marker object to be temporarily registered in the singleton cache, - while instantiating an object (in order to be able to detect circular references). - - - - - Used as value in hashtable that keeps track of singleton names currently in the - process of being created. Would not be necessary if we created a case insensitive implementation of - ISet. - - - - - The instance for this class. - - - - - Cache of singleton objects created by s: FactoryObject name -> product - - - - - Creates a new instance of the - class. - - -

- This constructor implicitly creates an - - that treats the names of objects in this factory in a case-sensitive fashion. -

-

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - -
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - - - Any parent object factory; may be . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - In case of errors. - -
- - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - In case of errors. - -
- - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Create instance only - suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself, - nor throw an exception. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Does this object factory contain an object definition with the - supplied ? - - -

- Does not consider any hierarchy this factory may participate in. - Invoked by - - when no cached singleton instance is found. -

-
- - The name of the object to look for. - - - if this object factory contains an object - definition with the supplied . - -
- - - Adds the supplied (object) to this factory's - singleton cache. - - -

- To be called for eager registration of singletons, e.g. to be able to - resolve circular references. -

- - If a singleton has already been registered under the same name as - the supplied , then the old singleton will - be replaced. - -
- The name of the object. - The singleton object. - - If the argument is - or consists wholly of whitespace characters; or if the - is . - -
- - - Return the object name, stripping out the factory dereference prefix if - necessary, and resolving aliases to canonical names. - - - The transformed name of the object. - - - - - Ensures, that the given name is prefixed with - if it incidentially already starts with this prefix. This avoids troubles when dereferencing - the object name during - - - - - Determines whether the specified name is defined as an alias as opposed - to the name of an actual object definition. - - The object name to check. - - true if the specified name is alias; otherwise, false. - - - - - Return a , - even by traversing parent if the parameter is a child definition. - - - The name of the object. - - - Are ancestors to be included in the merge? - - -

- Will ask the parent object factory if not found in this instance. -

-
- - A merged - with overridden properties. - -
- - - Return a , - even by traversing parent if the parameter is a child definition. - - - A merged - with overridden properties. - - - - - Creates the root object definition. - - The template definition to base root definition on. - Root object definition. - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Gets the type for the given FactoryObject. - - The factory object instance to check. - the FactoryObject's object type - - - - Gets the object type for the given FactoryObject definition, as far as possible. - Only called if there is no singleton instance registered for the target object already. - - - The default implementation creates the FactoryObject via GetObject - to call its ObjectType property. Subclasses are encouraged to optimize - this, typically by just instantiating the FactoryObject but not populating it yet, - trying whether its ObjectType property already returns a type. - If no type found, a full FactoryObject creation as performed by this implementation - should be used as fallback. - - Name of the object. - The merged object definition for the object. - The type for the object if determinable, or null otherwise - - - - Predict the eventual object type (of the processed object instance) for the - specified object. - - - Does not need to handle FactoryObjects specifically, since it is only - supposed to operate on the raw object type. - This implementation is simplistic in that it is not able to - handle factory methods and InstantiationAwareBeanPostProcessors. - It only predicts the object type correctly for a standard object. - To be overridden in subclasses, applying more sophisticated type detection. - - Name of the object. - The merged object definition to determine the type for. May be null - The type of the object, or null if not predictable - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - - The name that may include the factory dereference prefix. - - The object instance. - - The singleton instance of the object. - - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - The object instance. - - The name that may include the factory dereference prefix (=the requested name). - - - The canonical object name - - the merged object definition - - The singleton instance of the object. - - - - - Obtain an object to expose from the given IFactoryObject. - - The IFactoryObject instance. - Name of the object. - The merged object definition. - The object obtained from the IFactoryObject - If IFactoryObject object creation failed. - - - - Post-process the given object that has been obtained from the FactoryObject. - The resulting object will be exposed for object references. - - The default implementation simply returns the given object - as-is. Subclasses may override this, for example, to apply - post-processors. - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Convenience method to pull an - from this factory. - - - The name of the factory object to be retrieved. If this name is not a valid - name, it will be converted - into one. - - - The associated with the - supplied . - - - - - Is the supplied a factory object dereference? - - - - - Determines whether the type of the given object definition matches the - specified target type. - - Allows for lazy load of the actual object type, provided that the - type match can be determined otherwise. - The default implementation simply delegates to the standard - ResolveObjectType method. Subclasses may override this to use - a differnt strategy. - - Name of the object (for error handling purposes). - The merged object definition to determine the type for. - Type to match against (never null). - - true if object definition matches tye specified target type; otherwise, false. - - if we failed to load the type." - - - - Resolves the type of the object for the specified object definition resolving - an object type name to a Type (if necessary) and storing the resolved Type - in the object definition for further use. - - The merged object definition to dertermine the type for. - Name of the object (for error handling purposes). - - - - - Is the object (definition) with the supplied an - ? - - The name of the object to be checked. - - the object (definition) with the supplied - an ? - - - - - Remove the object identified by the supplied - from this factory's singleton cache. - - - The name of the object that is to be removed from the singleton - cache. - - - If the argument is or - consists wholly of whitespace characters. - - - - - Return the names of objects in the singleton cache that match the given - object type (including subclasses). - - - The class or interface to match, or for all object names. - - -

- Will not consider s - as the type of their created objects is not known before instantiation. -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of objects in the singleton cache that match the given - object type (including subclasses), or an empty array if none. - -
- - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determines the of the object with the - supplied . - - -

- More specifically, checks the of object that - would return. - For an , returns the - of object that the - creates. -

-

- Please note that (prototype) objects created via a factory method or - objects are handled - slightly differently, in that we don't want to needlessly create - instances of such objects just to determine the - of object that they create. -

-
- The name of the object to query. - - The of the object or - if not determinable. - -
- - - Determines the of the object defined - by the supplied object . - - -

- This, the default, implementation returns - to indicate that the type cannot be determined. Subclasses are - encouraged to try to determine the actual return - here, matching their strategy of resolving - factory methods in the - Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject - implementation. -

-
- - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - -
- - - Returns the names of the objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The names of the objects in the singleton cache. -
- - - Returns the number of objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The number of objects in the singleton cache. -
- - - Destroys the named singleton object. - - -

- Delegates to - - if a corresponding singleton instance is found. -

-
- - The name of the singleton object that is to be destroyed. - - -
- - - Check the supplied merged object definition for any possible - validation errors. - - - The object definition to be checked for validation errors. - - - The name of the object associated with the supplied object definition. - - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - - In the case of object validation errors. - - - - - Parent object factory, for object inheritance support - - - - - Dependency types to ignore on dependency check and autowire, as Set of - Type objects: for example, string. Default is none. - - - - - ObjectPostProcessors to apply in CreateObject - - - - - Indicates whether any IInstantiationAwareBeanPostProcessors have been registered - - - - - Indicates whether any IDestructionAwareBeanPostProcessors have been registered - - - - - Set of registered singletons, containing the bean names in registration order - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Is this object a singleton? - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Does this object factory or one of its parent factories contain an object with the given name? - - - This method scans the object factory hierarchy starting with the current factory instance upwards. - Use if you want to explicitely check just this object factory instance. - - . - - - - Return the aliases for the given object name, if defined. - - . - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Return an instance (possibly shared or independent) of the given object name. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name, - optionally injecting dependencies. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - whether to inject dependencies or not. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - - Checks, if the passed instance is of the required type. - - the name of the object - the actual instance - the type contract the given instance must adhere. - the object instance passed in via (for more fluent usage) - - if is null or not assignable to . - - - - - Creates a singleton instance for the specified object name and definition. - - - The object name (will be used as the key in the singleton cache key). - - The object definition. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The created object instance. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - - - - Destroy all cached singletons in this factory. - - - - - Ignore the given dependency type for autowiring - - . - - - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - - The - to register. - - . - - - - Given an object name, create an alias. - - . - - - - Register the given custom - for all properties of the given . - - . - - - - Register the given existing object as singleton in the object factory, - under the given object name. - - . - - - - Does this object factory contains a singleton instance with the - supplied ? - - - - - - Tries to find a cached object for the specified name. - - Teh object name to look for. - The cached object if found, otherwise. - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - Name of the object to check. - - true if is object name in use; otherwise, false. - - - - - Gets the singleton lock for a given object name. - - Name of the object. - lock object - - - - Returns, whether this factory treats object names case sensitive or not. - - - - - Gets the of - s - that will be applied to objects created by this factory. - - - - - Gets the set of classes that will be ignored for autowiring. - - -

- The elements of this are - s. -

-
-
- - - Returns, whether this object factory instance contains objects. - - - - - Returns, whether this object factory instance contains objects. - - - - - Gets the temporary object that is placed - into the singleton cache during object resolution. - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - The parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Returns the current number of registered - s. - - - The current number of registered - s. - - . - - - - Gets the names of singleton objects registered in this registry. - - The list of names as String array (never null). - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - - - - - - - Gets the number of singleton beans registered in this registry. - - The number of singleton objects. - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - - - - - - - Makes a distinction between sort order and object identity. - This is important when used with , since most - implementations assume Order == Identity - - - - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - The used during the invocation and - searching for of methods. - - - - - The instance for this class. - - - - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. -
- - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. - The parent object factory, or if none. -
- - - Predict the eventual object type (of the processed object instance) for the - specified object. - - Name of the object. - The merged object definition to determine the type for. May be null - - The type of the object, or null if not predictable - - - - - Determines the of the object defined - by the supplied object . - - - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - - - Apply any - s. - - -

- The returned instance may be a wrapper around the original. -

-
- - The of the object that is to be - instantiated. - - - The name of the object that is to be instantiated. - - - An instance to use in place of the original instance. - - - In case of errors. - -
- - - Apply the given property values, resolving any runtime references - to other objects in this object factory. - - - The object name passed for better exception information. - - - The definition of the named object. - - - The wrapping the target object. - - - The new property values. - - -

- Must use deep copy, so that we don't permanently modify this property. -

-
-
- - - Create the value resolver strategy to use for resolving raw property values - - - - - Return an array of object-type property names that are unsatisfied. - - -

- These are probably unsatisfied references to other objects in the - factory. Does not include simple properties like primitives or - s. -

-
- - An array of object-type property names that are unsatisfied. - - - The definition of the named object. - - - The wrapping the target object. - -
- - - Destroy all cached singletons in this factory. - - -

- To be called on shutdown of a factory. -

-
-
- - - Populate the object instance in the given - with the property values from the - object definition. - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Wires up any exposed events in the object instance in the given - with any event handler - values from the . - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Fills in any missing property values with references to - other objects in this factory if autowire is set to - . - - - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - - - - - Defines "autowire by type" (object properties by type) behavior. - - -

- This is like PicoContainer default, in which there must be exactly one object - of the property type in the object factory. This makes object factories simple - to configure for small namespaces, but doesn't work as well as standard Spring - behavior for bigger applications. -

-
- - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - -
- - - Ignore the given dependency type for autowiring - - - This will typically be used by application contexts to register - dependencies that are resolved in other ways, like IOjbectFactory through - IObjectFactoryAware or IApplicationContext through IApplicationContextAware. - By default, IObjectFactoryAware and IObjectName interfaces are ignored. - For further types to ignore, invoke this method for each type. - - . - - - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Add the created, but yet unpopulated singleton to the singleton cache - to be able to resolve circular references - - the name of the object to add to the cache. - the definition used to create and populated the object. - the raw object instance. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Remove the specified singleton from the singleton cache that has - been added before by a call to - - the name of the object to remove from the cache. - the definition used to create and populated the object. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Creates an instance from the passed in - using constructor - - The name of the object to create - used for error messages. - The describing the object to be created. - optional arguments to pass to the constructor - An wrapping the already instantiated object - - - - Instantiates the given object using its default constructor - - Name of the object. - The definition. - IObjectWrapper for the new instance - - - - Determines candidate constructors to use for the given object, checking all registered - - - Raw type of the object. - Name of the object. - the candidate constructors, or null if none specified - In case of errors - - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - "autowire constructor" (with constructor arguments by type) behaviour. - - The name of the object to autowire by type. - The object definition to update through autowiring. - The chosen candidate constructors. - The argument values passed in programmatically via the GetObject method, - or null if none (-> use constructor argument values from object definition) - - An for the new instance. - - - - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: in this mode, a Spring.NET - object factory is able to host components that expect constructor-based - dependency resolution. - - - - - - Perform a dependency check that all properties exposed have been set, if desired. - - -

- Dependency checks can be objects (collaborating objects), simple (primitives - and ), or all (both). -

-
- - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - The property values to be checked. - - - If all of the checked dependencies were not satisfied. - -
- - - Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding - ignored dependency types. - - The object wrapper the object was created with. - The filtered PropertyInfos - - - - Determine whether the given bean property is excluded from dependency checks. - This implementation excludes properties whose type matches an ignored dependency type - or which are defined by an ignored dependency interface. - - - - the of the object property - whether the object property is excluded - - - - Give an object a chance to react now all its properties are set, - and a chance to know about its owning object factory (this object). - - -

- This means checking whether the object implements - and / or - , and invoking the - necessary callback(s) if it does. -

-

- Custom init methods are resolved in a case-insensitive manner. -

-
- - The new object instance we may need to initialise. - - - The name the object has in the factory. Used for logging output. - - - The definition of the target object instance. - -
- - - Invoke the specified custom destroy method on the given object. - - -

- This implementation invokes a no-arg method if found, else checking - for a method with a single boolean argument (passing in "true", - assuming a "force" parameter), else logging an error. -

-

- Can be overridden in subclasses for custom resolution of destroy - methods with arguments. -

-

- Custom destroy methods are resolved in a case-insensitive manner. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself. - Should not throw any exceptions. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Destroys all of the objects registered as dependant on the - object (definition) identified by the supplied . - - - The name of the root object (definition) that is itself being destroyed. - - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - Find object instances that match the required . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The of the objects to look up. - - - An of object names and object - instances that match the required , or - if none are found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - Called by DestroyObject, to be able to destroy depending objects first. - - - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Configures object instance by injecting dependencies, satisfying Spring lifecycle - interfaces and applying object post-processors. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - A wrapped object instance that is to be so configured. - - - - - - Applies the PostProcessAfterInitialization callback of all - registered IObjectPostProcessors, giving them a chance to post-process - the object obtained from IFactoryObjects (for example, to auto-proxy them) - - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - If the supplied is not one of the - or - - values. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Cache of filtered PropertyInfos: object Type -> PropertyInfo array - - - - - Dependency interfaces to ignore on dependency check and autowire, as Set of - Class objects. By default, only the IObjectFactoryAware and IObjectNameAware - interfaces are ignored. - - - - - The - implementation to be used to instantiate managed objects. - - - - - An - implementation that provides some convenience support for - derived classes. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Permits the (re)implementation of an arbitrary method on a Spring.NET - IoC container managed object. - - -

- Encapsulates the notion of the Method-Injection form of Dependency - Injection. -

-

- Methods that are dependency injected with implementations of this - interface may be (but need not be) , in which - case the container will create a concrete subclass of the - class prior to instantiation. -

-

- Do not use this mechanism as a means of AOP. See the reference - manual for examples of appropriate usages of this interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Reimplement the supplied . - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the (re)implementation of the method call. - - - - - Creates a new instance of the - - class. - - -

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

-
- - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - -
- - - Is ; derived classes must supply an implementation. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - The result of the object lookup. - - - - Helper method for subclasses to retrieve the appropriate - for the - supplied . - - - The to use to retrieve - the appropriate - . - - - The appropriate - . - - - - - Helper method for subclasses to lookup an object from an enclosing - IoC container. - - - The name of the object that is to be looked up. - - - The named object. - - - - - Common base class for object definitions, factoring out common - functionality from - and - . - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Describes a configurable object instance, which has property values, - constructor argument values, and further information supplied by concrete - implementations. - - Rick Evans - - - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - The method overrides (if any) for this object. - - - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - - - - - Return the event handlers for any events exposed by this object. - - - - - Get or set the role hint for this object definition - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition (if any). - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The dependency check code. - - - - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The object definition used to initialise the member fields of this - instance. - - -

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

-
-
- - - Resolves the type of the object, resolving it from a specified - object type name if necessary. - - - A resolved instance. - - - If the type cannot be resolved. - - - - - Validate this object definition. - - - In the case of a validation failure. - - - - - Validates all - - - - - Validate the supplied . - - - The - to be validated. - - - - - Override settings in this object definition from the supplied - object definition. - - - The object definition used to override the member fields of this instance. - - - - - Returns a that represents the current - . - - - A that represents the current - . - - - - - The name of the parent definition of this object definition, if any. - - - - - The property values that are to be applied to the object - upon creation. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The property values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - Does this definition have any - ? - - - if this definition has at least one - . - - - - - The constructor argument values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The constructor argument values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The event handler values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The event handler values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The method overrides (if any) for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The name of the target scope for the object. - Defaults to "singleton", ootb alternative is "prototype". Extended object factories - might support further scopes. - - - - - Get or set the role hint for this object definition - - - - - Is this definition a singleton, with - a single, shared instance returned on all calls to an enclosing - container (typically an - or - ). - - -

- If , an object factory will apply the - prototype design pattern, with each caller requesting an - instance getting an independent instance. How this is defined - will depend on the object factory implementation. singletons - are the commoner type. -

-
- -
- - - Gets a value indicating whether this instance is prototype, with an independent instance - returned for each call. - - - true if this instance is prototype; otherwise, false. - - - - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup - by object factories that perform eager initialization of - singletons. -

-
-
- - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be - instantiated itself but rather just serving as a parent for concrete - child object definitions. - - - if this object definition is "abstract". - - - - - The of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - - Is the of the object definition a resolved - ? - - - - - Returns the of the - of the object definition (if any). - - - - - A description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. The default is - , - which means that no autowiring will be performed. -

-
-
- - - Gets the resolved autowire mode. - - -

- This resolves - - to one of - - or - . -

-
-
- - - The dependency checking mode. - - -

- The default is - . -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before this object definition. -

- - Dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - The name of the initializer method. - - -

- The default value is the constant, - in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default value is the constant, - in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The - method will be invoked on the specified - . -

-
-
- - - The name of the factory object to use (if any). - - - - - Does this object definition have any constructor argument values? - - - if his object definition has at least one - element in it's - - property. - - - - - Abstract base class for object definition readers. - - -

- Provides common properties like the object registry to work on. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Simple interface for object definition readers. - - Juergen Hoeller - Rick Evans - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The against which any class names - will be resolved into instances. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - Gets the resource loader to use for resource locations. - - There is also a method - available for loading object definitions from a resource location. This is - a convenience to avoid explicit ResourceLoader handling. - The resource loader. - - - - The instance for this class (and derived classes). - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - The against which any class names - will be resolved into instances. - - -

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

-
-
- - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - - The against which any class names - will be resolved into instances. - - - - - Gets or sets the resource loader to use for resource locations. - - The resource loader. - - - - Utility class that contains various methods useful for the implementation of - autowire-capable object factories. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the AutowireUtils class. - - -

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

-
-
- - - Gets those s - that are applicable for autowiring the supplied . - - - The - (definition) that is being autowired by constructor. - - - The absolute minimum number of arguments that any returned constructor - must have. If this parameter is equal to zero (0), then all constructors - are valid (regardless of their argument count), including any default - constructor. - - - Those s - that are applicable for autowiring the supplied . - - - - - Determine a weight that represents the class hierarchy difference between types and - arguments. - - -

- A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase - the result - all direct matches means weight zero (0). A match between the argument type - and a MyInteger instance argument would increase the weight by - 1, due to the superclass () being one (1) steps up in the - class hierarchy being the last one that still matches the required type. -

-

- Therefore, with an argument of type , a - constructor taking a argument would be - preferred to a constructor taking an argument - which would be preferred to a constructor taking an - argument which would in turn be preferred - to a constructor taking an argument. -

-

- All argument weights get accumulated. -

-
- - The argument s to match. - - The arguments to match. - The accumulated weight for all arguments. -
- - - Algorithm that judges the match between the declared parameter types of a candidate method - and a specific list of arguments that this method is supposed to be invoked with. - - - Determines a weight that represents the class hierarchy difference between types and - arguments. The following a an example based on the Java class hierarchy for Integer. - A direct match, i.e. type Integer -> arg of class Integer, does not increase - the result - all direct matches means weight 0. A match between type Object and arg of - class Integer would increase the weight by 2, due to the superclass 2 steps up in the - hierarchy (i.e. Object) being the last one that still matches the required type Object. - Type Number and class Integer would increase the weight by 1 accordingly, due to the - superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. - Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a - constructor (Number) which would in turn be preferred to a constructor (Object). - All argument weights get accumulated. - - The param types. - The args. - - - - - Determines whether the given object property is excluded from dependency checks. - - The PropertyInfo of the object property. - - true if is excluded from dependency check; otherwise, false. - - - - - Sorts the supplied , preferring - public constructors and "greedy" ones (that have lots of arguments). - - -

- The result will contain public constructors first, with a decreasing number - of arguments, then non-public constructors, again with a decreasing number - of arguments. -

-
- - The array to be sorted. - -
- - - Determines whether the setter property is defined in any of the given interfaces. - - The PropertyInfo of the object property - The ISet of interfaces. - - true if setter property is defined in interface; otherwise, false. - - - - - Creates the autowire candidate resolver. - - A SimpleAutowireCandidateResolver - - - - Returns the list of that are not satisfied by . - - the filtered list. Is never null - - - - Object definition for definitions that inherit settings from their - parent (object definition). - - -

- Will use the - of the parent object definition if none is specified, but can also - override it. In the latter case, the child's - - must be compatible with the parent, i.e. accept the parent's property values - and constructor argument values (if any). -

-

- A will - inherit all of the , - , and - from it's parent - object definition, with the option to add new values. If the - , - , - and / or - - properties are specified, they will override the corresponding parent settings. -

-

- The remaining settings will always be taken from the child definition: - , - , - , - , - and - -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - - class. - - - The name of the parent object. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The class of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The of the object to - instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Validate this object definition. - - -

- A common cause of validation failures is a missing value for the - - property; by - their very nature require that the - - be set. -

-
- - In the case of a validation failure. - -
- - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Helper class for resolving constructors and factory methods. - Performs constructor resolution through argument matching. - - - Operates on a and an . - Used by . - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for the given factory - and instantiation strategy. - - The object factory to work with. - The object factory as IAutowireCapableObjectFactory. - The instantiation strategy for creating objects. - the resolver to resolve property value placeholders if any - - - - "autowire constructor" (with constructor arguments by type) behavior. - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: In this mode, a Spring - object factory is able to host components that expect constructor-based - dependency resolution. - - Name of the object. - The merged object definition for the object. - The chosen chosen candidate constructors (or null if none). - The explicit argument values passed in programmatically via the getBean method, - or null if none (-> use constructor argument values from object definition) - An IObjectWrapper for the new instance - - - - Gets the constructor instantiation info given the object definition. - - Name of the object. - The RootObjectDefinition - The explicitly chosen ctors. - The explicit chose ctor args. - A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or - one based on type matching. - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - Create an array of arguments to invoke a constructor or static factory method, - given the resolved constructor arguments values. - - When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain - information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using - exceptions for flow control as in the original implementation. - - - - Resolves the - of the supplied . - - The name of the object that is being resolved by this factory. - The rod. - The wrapper. - The cargs. - Where the resolved constructor arguments will be placed. - - The minimum number of arguments that any constructor for the supplied - must have. - - -

- 'Resolve' can be taken to mean that all of the s - constructor arguments is resolved into a concrete object that can be plugged - into one of the s constructors. Runtime object - references to other objects in this (or a parent) factory are resolved, - type conversion is performed, etc. -

-

- These resolved values are plugged into the supplied - object, because we wouldn't want to touch - the s constructor arguments in case it (or any of - its constructor arguments) is a prototype object definition. -

-

- This method is also used for handling invocations of static factory methods. -

-
-
- - - Returns an array of all of those - methods exposed on the - that match the supplied criteria. - - - Methods that have this name (can be in the form of a regular expression). - - - Methods that have exactly this many arguments. - - - Methods that are static / instance. - - - The on which the methods (if any) are to be found. - - - An array of all of those - methods exposed on the - that match the supplied criteria. - - - - - Concrete implementation of the - and - - interfaces. - - -

- This class is a full-fledged object factory based on object definitions - that is usable straight out of the box. -

-

- Can be used as an object factory in and of itself, or as a superclass - for custom object factory implementations. Note that readers for - specific object definition formats are typically implemented separately - rather than as object factory subclasses. -

-

- For an alternative implementation of the - interface, - have a look at the - - class, which manages existing object instances rather than creating new - ones based on object definitions. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - - - - Creates a new instance of the - class. - - The parent object factory. - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory. - - - - Find object instances that match the . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The type of the objects to look up. - - - An of object names and object - instances that match the , or - if none is found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - - -

- Called by the - - so that dependant objects are able to be disposed of first. -

-
- - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - -
- - - Check whether the specified object matches the supplied . - - The name of the object to check. - - The to check for. - - - if the object matches the supplied , - or if the supplied is . - - - - - The instance for this class. - - - - - Whether to allow re-registration of a different definition with the - same name. - - - - - The mapping of object definition objects, keyed by object name. - - - - - List of object definition names, in registration order. - - - - - Resolver to use for checking if an object definition is an autowire candidate - - - - - IDictionary from dependency type to corresponding autowired value - - - - - Check if this registry contains a object definition with the given - name. - - - The name of the object to look for. - - - if this object factory contains an object - definition with the given name. - - - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - - If one of the singleton objects could not be created. - - - - - - Register a special dependency type with corresponding autowired value. - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the IObjectFactory interface itself. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Check whether the specified bean would need to be eagerly initialized - in order to determine its type. - - a factory-bean reference that the bean definition defines a factory method for - whether eager initialization is necessary - - - - Check whether the given bean is defined as a . - - the name of the object - the corresponding object definition - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Raises the no such object definition exception for an unresolvable dependency - - The type. - The dependency description. - The descriptor. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - Determine whether the specified object definition qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - - Name of the object definition to check. - The merged object definiton to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - - - - Should object definitions registered under the same name as an - existing object definition be allowed? - - -

- If , then the new object definition will - replace (override) the existing object definition. If - , an exception will be thrown when - an attempt is made to register an object definition under the same - name as an already existing object definition. -

-

- The default is . -

-
- - is the registration of an object definition - under the same name as an existing object definition is allowed. - -
- - - Get or set custom autowire candidate resolver for this IObjectFactory to use - when deciding whether a bean definition should be considered as a - candidate for autowiring. Never null - - - - - Return the number of objects defined in this registry. - - - The number of objects defined in this registry. - - - - - - Default implementation of the - - interface. - - -

- Does not support per - loading. -

-
- Aleksandar Seovic -
- - - Central interface for factories that can create - - instances. - - -

- Allows for replaceable object definition factories using the Strategy - pattern. -

-
- Aleksandar Seovic -
- - - Factory style method for getting concrete - - instances. - - - The FullName of the of the defined object. - - The name of the parent object definition (if any). - - The against which any class names - will be resolved into instances. It can be null to register the - object class just by name. - - - An - - instance. - - - - - Factory style method for getting concrete - - instances. - - /// If no parent is specified, a RootObjectDefinition is created, otherwise a - ChildObjectDefinition. - The of the defined object. - The name of the parent object definition (if any). - The against which any class names - will be resolved into instances. - - An - - instance. - - - - - Default implementation of the interface, deleagting to - 's GenerateObjectName. - - Note that this implementation is only able to handle - subclasses such as - and - - Juergen Hoeller - Mark Pollack (.NET) - - - - Strategy interface for generating object names for object definitions - - Juergen Hoeller - Mark Pollack (.NET) - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - An - implementation that delegates to an - that is - obtained as the result of a lookup in an associated IoC container. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by delegating to - another - looked up in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the delegated call to the looked up - . - - - - - The various modes of dependency checking. - - Rick Evans (.NET) - - - - DO not do any dependency checking. - - - - - Check object references. - - - - - Just check primitive (string, int, etc) values. - - - - - Check everything. - - - - - GenericObjectDefinition is a one-stop shop for standard object definition purposes. - Like any object definition, it allows for specifying a class plus optionally - constructor argument values and property values. Additionally, deriving from a - parent bean definition can be flexibly configured through the "parentName" property. - - In general, use this class for the purpose of - registering user-visible object definitions (which a post-processor might operate on, - potentially even reconfiguring the parent name). - Use / - where parent/child relationships happen to be pre-determined. - - - - Juergen Hoeller - Erich Eichinger - - - - Creates a new to be configured through its - object properties and configuration methods. - - - - - Creates a new as deep copy of the given - object definition. - - the original object definition to copy from - - - - Returns a representation of this - for debugging purposes. - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Strategy interface for determining whether a specific object definition - qualifies as an autowire candidate for a specific dependency. - - Mark Fisher - Juergen hoeller - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Responsible for creating instances corresponding to a - . - - Rod Johnson - Rick Evans (.NET) - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Represents an override of a method that looks up an object in the same IoC context. - - -

- Methods eligible for lookup override must not have arguments. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Represents the override of a method on a managed object by the IoC container. - - -

- Note that the override mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - -

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

-
- - The name of the method that is to be overridden. - - - If the supplied is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - -

- By 'match' one means does this particular - - instance apply to the supplied ? -

-

- This allows for argument list checking as well as method name checking. -

-
- The method to be checked. - - if this override matches the supplied - . - -
- - - The name of the method that is to be overridden. - - - - - Is the method that is ot be injected - () - to be considered as overloaded? - - -

- If (the default), then argument type matching - will be performed (because one would not want to override the wrong - method). -

-

- Setting the value of this property to can be used - to optimize runtime performance (ever so slightly). -

-
-
- - - Creates a new instance of the - class. - - -

- Methods eligible for lookup override must not have arguments. -

-
- - The name of the method that is to be overridden. - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - If either of the supplied arguments is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - - - An - implementation that simply returns the result of a lookup in an - associated IoC container. - - -

- This class is Spring.NET's implementation of Dependency Lookup via - Method Injection. -

-

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by returning the - result of an object lookup in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the object lookup. - - - - - An - implementation that supports method injection. - - -

- Classes that want to take advantage of method injection must meet some - stringent criteria. Every method that is to be method injected - must be defined as either or - . An - will be thrown if these criteria are not met. -

-
- Rick Evans -
- - - Simple object instantiation strategy for use in - implementations. - - -

- Does not support method injection, although it provides hooks for subclasses - to override to add method injection support, for example by overriding methods. -

-
- Rod Johnson - Rick Evans (.NET) - -
- - - The shared instance for this class (and derived classes). - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type does not have a zero-arg constructor. - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use a no-arg constructor. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be a - or zero length string if we're autowiring an object that - doesn't belong to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - -
- - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use the supplied - and attendant . -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - -
- - - The name of the dynamic assembly that holds dynamically created code - - - - - A cache of generated instances, keyed on - the object name for which the was generated. - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- This method dynamically generates a subclass that supports method - injection for the supplied . It then - instantiates an new instance of said type using the constructor - identified by the supplied , - passing the supplied to said - constructor. It then manually injects (generic) method replacement - and method lookup instances (of - ) into - the new instance: those methods that are 'method-injected' will - then delegate to the approriate - - instance to effect the actual method injection. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The parameter s to use to find the - appropriate constructor to invoke. - - - The aguments that are to be passed to the appropriate constructor - when the object is being instantiated. - - - A new instance of the defined by the - supplied . - -
- - - A factory that generates subclasses of those - classes that have been configured for the Method-Injection form of - Dependency Injection. - - -

- This class is designed as for one-shot usage; i.e. it must - be used to generate exactly one method injected subclass and - then discarded (it maintains state in instance fields). -

-
-
- - - The name of the generated - property (for method replacement). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - The name of the generated - property (for method lookup). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - Creates a new instance of the - class. - - - The in which - the generated is to be defined. - - - The object definition that is the target of the method injection. - - - If either of the supplied arguments is . - - - - - Builds a suitable for Method-Injection. - - - A suitable for Method-Injection. - - - - - Defines overrides for those methods that are configured with an appropriate - . - - - The overarching that is defining - the generated . - - - - - Override the supplied with the logic - encapsulated by the - - defined by the supplied . - - - The builder for the subclass that is being generated. - - - The method on the superclass that is to be overridden. - - - The field defining the - - that the overridden method will delegate to to do the 'actual' - method injection logic. - - - - - Generates the MSIL for actually returning a return value if the - supplied is not - . - - - The definition of the return value; if , it - means that no return value is to required (a void - return type). - - - The to emit - the MSIL to. - - - - - Generates the MSIL for a return value if the supplied - returns a value. - - - The method to be checked. - - - The to emit - the MSIL to. - - - The return value, or if the method does not - return a value (has a void return type). - - - - - Pushes (sets up) the arguments for a call to the - - method of an appropriate - . - - - The parameters to the original method (will be bundled - up into a generic object[] and passed as the third - argument to the - - invocation. - - - The to emit - the MSIL to. - - - - - Simply generates the IL for a write only property for the - . - - - The in which the property is defined. - - - The name of the (to be) generated property. - - - The (instance) field that the property is to 'set'. - - - - - A collection (with set semantics) of method overrides, determining which, if any, - methods on a managed object the Spring.NET IoC container will override at runtime. - - Rod Johnson - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- Deep copy constructoe. -

-
- - The instance supplying initial overrides for this new instance. - -
- - - Copy all given method overrides into this object. - - - The overrides to be copied into this object. - - - - - Adds the supplied to the overrides contained - within this instance. - - - The to be - added. - - - - - Adds the supplied to the overloaded method names - contained within this instance. - - - The overloaded method name to be added. - - - - - Returns true if the supplied is present within - the overloaded method names contained within this instance. - - - The overloaded method name to be checked. - - - True if the supplied is present within - the overloaded method names contained within this instance. - - - - - Return the override for the given method, if any. - - - The method to check for overrides for. - - - the override for the given method, if any. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - The collection of method overrides. - - - - - Returns true if this instance contains no overrides. - - - - - Programmatic means of constructing a using the builder pattern. Intended primarily - for use when implementing custom namespace parsers. - - Set methods are used instead of properties, so that chaining of methods can be used to create - 'one-liner'definitions that set multiple properties at one. - Rod Johnson - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class, private - to force use of factory methods. - - - - - Creates a new used to construct a . - - - - - Creates a new used to construct a . - - the of the object that the definition is being created for - - - - Creates a new used to construct a . - - the name of the of the object that the definition is being created for - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - The type name of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Name of the object type. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a child object definition.. - - The object definition factory. - Name of the parent object. - - - - - Adds the property value under the given name. - - The name. - The value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the specified object name under the property specified. - - The name. - Name of the object. - The current ObjectDefinitionBuilder. - - - - Adds an index constructor arg value. The current index is tracked internally and all addtions are - at the present point - - The constructor arg value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the named object as a constructor argument. - - Name of the object. - - - - - Sets the name of the factory method to use for this definition. - - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the factory object to use for this definition. - - The factory object. - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets whether or not this definition describes a singleton object. - - if set to true [singleton]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects or not this definition is abstract. - - if set to true [flag]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects for this definition should be lazily initialized or not. - - if set to true [lazy]. - The current ObjectDefinitionBuilder. - - - - Sets the autowire mode for this definition. - - The autowire mode. - The current ObjectDefinitionBuilder. - - - - Sets the dependency check mode for this definition. - - The dependency check. - The current ObjectDefinitionBuilder. - - - - Sets the name of the destroy method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the init method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the resource description for this definition. - - The resource description. - The current ObjectDefinitionBuilder. - - - - Adds the specified object name to the list of objects that this definition depends on. - - Name of the object. - The current ObjectDefinitionBuilder. - - - - Gets the current object definition in its raw (unvalidated) form. - - The raw object definition. - - - - Validate and gets the object definition. - - The object definition. - - - - Utility methods that are useful for - - implementations. - - Juergen Hoeller - Rick Evans (.NET) - - - - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Registers the supplied with the - supplied . - - -

- This is a convenience method that registers the - - of the supplied under the - - property value of said . If the - supplied has any - , - then those aliases will also be registered with the supplied - . -

-
- - The object definition holder containing the - that - is to be registered. - - - The registry that the supplied - is to be registered with. - - - If either of the supplied arguments is . - - - If the could not be registered - with the . - -
- - - Generates an object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied . - - The - that requires a generated name. - The - - that the supplied is to be - registered with (needed so that the uniqueness of any generated - name can be guaranteed). - if set to true if the given object - definition will be registed as an inner object or as a top level objener objects - verses top level objects. - - An object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied and - never . - - - If either of the or - arguments is . - - - If a unique name cannot be generated. - - - - - Generates the name of the object for a top-level object definition unique within the given object factory. - - The object definition to generate an object name for. - The registry to check for existing names. - The generated object name - if no unique name can be generated for the given - object definition - - - - Factory method for getting concrete - instances. - - - The name of the event handler method. This may be straight text, a regular - expression, , or empty. - - - The name of the event being wired. This too may be straight text, a regular - expression, , or empty. - - - A concrete - instance. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Thrown when the validation of an object definition failed. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - The detail message. - - - - Creates a new instance of the - - class. - - - The detail message. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Helper class for use in object factory implementations, - resolving values contained in object definition objects - into the actual values applied to the target object instance. - - - Used by . - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The object factory. - - - - Given a property value, return a value, resolving any references to other - objects in the factory if necessary. - - -

- The value could be : - - -

- An , - which leads to the creation of a corresponding new object instance. - Singleton flags and names of such "inner objects" are always ignored: inner objects - are anonymous prototypes. -

- - -

- A , which must - be resolved. -

-
- -

- An . This is a - special placeholder collection that may contain - s or - collections that will need to be resolved. -

-
- -

- An ordinary object or , in which case it's left alone. -

-
- -

-
- - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - -
- - - TODO - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Resolve the target type of the passed . - - The who's target type is to be resolved - The resolved target type, if any. otherwise. - - - - Resolves an inner object definition. - - - The name of the object that surrounds this inner object definition. - - - The name of the inner object definition... note: this is a synthetic - name assigned by the factory (since it makes no sense for inner object - definitions to have names). - - - The name of the property the value of which is being resolved. - - - The definition of the inner object that is to be resolved. - - - if the owner of the property is a singleton. - - - The resolved object as defined by the inner object definition. - - - - - Checks the given bean name whether it is unique. If not already unique, - a counter is added, increasing the counter until the name is unique. - - Original Name of the inner object. - The Adapted name for the inner object - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - The possible object scope values. - - Aleksandar Seovic - - - - - - - - - Application scope. - - - - - Session scope. - - - - - Request scope. - - - - - - - - - - Default scope (currently - ). - - - - - - Object definition reader for a simple properties format. - - - Provides object definition registration methods for - and - instances. Typically applied to a - . - - Rod Johnson - Juergen Hoeller - Simon White (.NET) - - - - Value of a T/F attribute that represents true. - Anything else represents false. Case seNsItive. - - - - - Separator between object name and property name. - - - - - Prefix for the class property of a root object definition. - - - - - Special string added to distinguish if the object will be - a singleton. - - -

- Default is true. -

-
- -

- owner.(singleton)=true -

-
-
- - - Special string added to distinguish if the object will be - lazily initialised. - - -

- Default is false. -

-
- -

- owner.(lazy-init)=true -

-
-
- - - Reserved "property" to indicate the parent of a child object definition. - - - - - Property suffix for references to other objects in the current - : e.g. - owner.dog(ref)=fido. - - -

- Whether this is a reference to a singleton or a prototype - will depend on the definition of the target object. -

-
-
- - - Prefix before values referencing other objects. - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the specified properties file. - - - The resource descriptor for the properties file. - - - The match or filter for object definition names, e.g. 'objects.' - - in case of loading or parsing errors - the number of object definitions found - - - - Register object definitions contained in a - , using all property keys (i.e. - not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Similar syntax as for an . - This method is useful to enable standard .NET internationalization support. -

-
- - The containing object definitions. - - - The match or filter for object definition names, e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions registered. -
- - - Register object definitions contained in an - , using all property keys - (i.e. not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Registers object definitions contained in an - using all property keys ( i.e. not filtering by prefix ) - - The containing - object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Get all property values, given a prefix (which will be stripped) - and add the object they define to the factory with the given name - - The name of the object to define. - - The containing string pairs. - - The prefix of each entry, which will be stripped. - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - - - - Name of default parent object - - - - - Gets or sets object definition factory to use. - - - - - A plain-vanilla object definition. - - -

- This is the most common type of object definition; - instances - do not derive from a parent - , and usually - (but not always - see below) have an - - and (optionally) some - and - . -

-

- Note that - instances do not have to specify an - : - This can be useful for deriving - instances - from such definitions, each with it's own - , - inheriting common property values and other settings from the parent. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - - The of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - Whether to perform a dependency check for objects (not - applicable to autowiring a constructor, thus ignored there) - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - -

- Takes an object class name to avoid eager loading of the object class. -

-
- - The assembly qualified of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - The - to be applied to a new instance of the object. - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. -

-
- - The definition that is to be copied. - -
- - - Validate this object definition. - - - In the case of a validation failure. - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Is always null for a . - - - It is safe to request this property's value. Setting any other value than null will - raise an . - - Raised on any attempt to set a non-null value on this property. - - - - A implementation to use that checks - the object definitions only (no attributes) - - Mark Fisher - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Static factory that permits the registration of existing singleton instances. - - -

- Does not have support for prototype objects, aliases, and post startup object - configuration. -

-

- Serves as a simple example implementation of the - interface, that manages existing object instances as opposed to creating new ones - based on object definitions. -

-

- The - method is not supported by this class; this class deals exclusively with - existing singleton instances, thus the methods mentioned previously make little sense in this context. -

-
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Map from object name to object instance. - - - - - This method is not supported by . - - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - is not currently supported. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - True if an object with the given name is defined. - - - - Is this object a singleton? - - -

- That is, will - or - always return the same object? -

-
- The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Determine the type of the object with the given name. - - -

- More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. -

-
- The name of the object to query. - - The of the object or if - not determinable. - -
- - - Determines whether the object with the given name matches the specified type. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Not supported. - - The name of the object. - - The registered - . - - - Always, as object definitions are not supported by this - implementation. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Will not consider s, - as the type of their created objects is not known before instantiation. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Since this implementation of the - - interface does not support the notion of ptototype objects, the - parameter is ignored. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). Ignored. - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - -
- - - Tests whether this object factory contains an object definition for the - specified object name. - - The object name to query. - - True if an object defintion is contained within this object factory. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Add a new singleton object. - - - The name to be associated with the object name. - - The singleton object. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - This feature is not currently supported. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Defines a method to release allocated unmanaged resources. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - - - - Abstract implementation providing - a number of convenience methods and a - template method - that subclasses must override to provide the actual parsing logic. - - - Use this implementation when you want - to parse some arbitrarily complex XML into one or more - ObjectDefinitions. If you just want to parse some - XML into a single IObjectDefinition, you may wish to consider - the simpler convenience extensions of this class, namely - and - - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Interface used to handle custom, top-level tags. - - Implementations are free to turn the metadata in the custom tag into as - many as required. - - Rob Harrop - Mark Pollack (.NET) - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - -

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

-
- - The element to be parsed. - - - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - - - The primary object definition. - -
- - - Constant for the ID attribute - - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Resolves the ID for the supplied . - - - When using generation, a name is generated automatically. - Otherwise, the ID is extracted from the "id" attribute, potentially with a - fallback to a generated id. - - The element that the object definition has been built from. - The object definition to be registered. - The the object encapsulating the current state of the parsing process; - provides access to a - the resolved id - - if no unique name could be generated for the given object definition - - - - - Registers the supplied with the supplied - . - - Subclasses can override this method to control whether or not the supplied - is actually even registered, or to - register even more objects. - - The default implementation registers the supplied - with the supplied only if the IsNested - parameter is false, because one typically does not want inner objects - to be registered as top level objects. - - - - The object definition to be registered. - The registry that the bean is to be registered with. - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - Gets a value indicating whether an ID should be generated instead of read - from the passed in XmlElement. - - Note that this flag is about always generating an ID; the parser - won't even check for an "id" attribute in this case. - - true if should generate id; otherwise, false. - - - - Gets a value indicating whether an ID should be generated instead if the - passed in XmlElement does not specify an "id" attribute explicitly. - - Disabled by default; subclasses can override this to enable ID generation - as fallback: The parser will first check for an "id" attribute in this case, - only falling back to a generated ID if no value was specified. - - true if should generate id if no value was specified; otherwise, false. - - - - - Convenient base class for when there exists a one-to-one mapping - between attribute names on the element that is to be parsed and - the property names on the Type being configured. - - - - Mark Pollack - - - - Base Type for those implementations that - need to parse and define just a single IObjectDefinition. - - - Extend this parser Type when you want to create a single object definition - from an arbitrarily complex XML element. You may wish to consider extending - the when you want to create a - single Object definition from a relatively simple custom XML element. - The resulting ObjectDefinition will be automatically registered - with the ObjectDefinitionRegistry. Your job simply is to parse the - custom XML element into a single ObjectDefinition - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - - Determine the name for the parent of the currently parsed object, - in case of the current object being defined as a child object. - The default implementation returns null - indicating a root object definition. - - - the name of the parent object for the currently parsed object. - - - - Gets the type of the object corresponding to the supplied XmlElement. - - Note that, for application classes, it is generally preferable to override - GetObjectTypeName instad, in order to avoid a direct - dependence on the object implementation class. The ObjectDefinitionParser - and its IXmlObjectDefinitionParser (namespace parser) can be used within an - IDE add-in then, even if the application classses are not available in the add-ins - AppDomain. - - The element. - The Type of the class that is being defined via parsing the supplied - Element. - - - - Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. - - The element. - The type name of the object that is being defined via parsing the supplied - XmlElement. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation delegates to the DoParse version without - ParameterContext argument. - The element. - The parser context. - The builder used to define the IObjectDefinition. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation does nothing. - The element. - The builder used to define the IObjectDefinition. - - - - Default implementation of the interface. - Resolves namespace URIs to implementation types based on mappings. - - Erich Eichinger - - - - - - Used by to locate - implementations for a particular namespace URI. - - TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now - Erich Eichinger - - - - - - - Lookup a for the given namespace URI. - - the namespace URI - the located namespace handler or null - - - - Resolve the namespace URI and return the corresponding - implementation. - - the namespace URI to get the matching parser for. - the matching parser or null - - - - XML resource reader. - - -

- Navigates through an XML resource and invokes parsers registered - with the . -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - SPI for parsing an XML document that contains Spring object definitions. - Used by for actually parsing a DOM - document. - - Instantiated per document to parse: Implementations can hold state in - instance variables during the execution of the RegisterObjectDefinitions - method, for example global settings that are defined for all object definitions - in the document. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the DefaultObjectDefinitionDocumentReader class. - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - Parses object definitions starting at the given - using the passed . - - The root element to start parsing from. - The instance to use. - - in case an error happens during parsing and registering object definitions - - - - - Process an alias element. - - - - - Process the object element - - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - - If the resource could not be imported. - - - - - Parses the given alias element, registering the alias with the registry. - - The alias element. - The registry. - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The helper. - - - - - - Allow the XML to be extensible by processing any custom element types last, - after we finished processing the objct definitions. This method is a natural - extension point for any other custom post-processing of the XML. - - The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. - - - The root. - - - - Allow the XML to be extensible by processing any custom element types first, - before we start to process the object definitions. - - This method is a natural - extension point for any other custom pre-processing of the XML. -

The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. -

-
- The root element of the XML document. -
- - - Creates an instance for the given and element. - - the to create the - the root to start reading from - a new instance - - - - Gets the reader context. - - The reader context. - - - - Simple class that holds the defaults specified at the <objects> - level in a standard Spring XML object definition document: - default-lazy-init, default-autowire, etc. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Gets or sets the autowire setting for the document that's currently parsed. - - The autowire. - - - - Gets or sets the dependency-check setting for the document that's currently parsed - - The dependency check. - - - - Gets or sets the lazy-init flag for the document that's currently parsed. - - The lazy init. - - - - Gets or sets the merge setting for the document that's currently parsed. - - The merge. - - - - Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. - - -

- Used by - for actually parsing a DOM document or - fragment. -

-
- Juergen Hoeller - Rick Evans (.NET) - Sandu Turcan (.NET) -
- - - Invoked by after construction but before any - elements have been parsed. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Attribute that should be used to specify the default namespace - and schema location for a custom namespace parser. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Gets or sets the default namespace for the configuration parser. - - - The default namespace for the configuration parser. - - - - - Gets or sets the default schema location for the configuration parser. - - - The default schema location for the configuration parser. - - - If the property is set, the will always resolve to an assembly-resource - and the set will be interpreted relative to this assembly. - - - - - Gets or sets a type from the assembly containing the schema - - - If this property is set, the will always resolve to an assembly-resource - and the will be interpreted relative to this assembly. - - - - - Provides a resolution mechanism for configuration parsers. - - -

- The uses this registry - class to find the parser handling a specific namespace. -

-
- Aleksandar Seovic -
- - - Name of the .Net config section that contains definitions - for custom config parsers. - - - - - Creates a new instance of the NamespaceParserRegistry class. - - - - - Reset the list of registered parsers to "factory"-setting - - use for unit tests only - - - - Registers the type for wellknown namespaces - - true if the parser could be registered, false otherwise - - - - Constructs a "assembly://..." qualified schemaLocation url using the given type - to obtain the assembly name. - - - - - Returns a parser for the given namespace. - - - The namespace for which to lookup the parser implementation. - - - A parser for a given , or - if no parser was found. - - - - - Returns a schema collection containing validation schemas for all registered parsers. - - - A schema collection containing validation schemas for all registered parsers. - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The of the parser that will be activated - when an element in its default namespace is encountered. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The of the parser that will be activated - when the attendant is - encountered. - - - The namespace with which to associate instance of the parser. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If the is not a - that implements the - interface. - - - If is . - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The parser instance. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The namespace with which to associate instance of the parser. - - - The parser instance. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If is , or if - is not specified and parser class - does not have default value defined using . - - - - - Register a schema as well-known - - - - - - - Returns default values for the parser namespace and schema location as - defined by the . - - - A type of the parser. - - - A instance containing - default values for the parser namsepace and schema location - - - - - Resolves xml entities by using the infrastructure. - - - - - Adapts the interface to . - Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 - - - - - Support class for implementing custom namespace parsers. - - Parsing of individual elements is done via a ObjectDefintionParser. - Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser - to handle a specific element. - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Invoked by after construction but before any - elements have been parsed. - - - - - Parses an element under the root node, typically - an object definition or import statement. - - - The element to be parsed. - - - The parser context. - - - The number of object defintions created from this element. - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Register the specified for the given - - - - - Constants defining the structure and values associated with the - Spring.NET XML object definition format. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Value of a boolean attribute that represents - . - - -

- Anything else represents . -

-
-
- - - Signifies that a default value is to be applied. - - - - - Defines an external XML object definition resource. - - - - - Specifies the relative path to an external XML object definition - resource. - - - - - Defines an alias for an object definition. - - - - - Specifies the alias of an object definition. - - - - - Specifies the default lazy initialization mode. - - - - - Specifies the default dependency checking mode. - - - - - Specifies the default autowire mode. - - - - - Specifies the default collection merge mode. - - - - - Defines a single named object. - - - - - Element containing informative text describing the purpose of the - enclosing element. - - -

- Always optional. -

-

- Used primarily for user documentation of XML object definition - documents. -

-
-
- - - Specifies a . - - -

- Does not have to be fully assembly qualified, but it is recommended - that the names of one's objects are - specified explicitly. -

-
-
- - - The name or alias of the parent object definition that a child - object definition inherits from. - - - - - Objects can be identified by an id, to enable reference checking. - - -

- There are constraints on a valid XML id: if you want to reference - your object in .NET code using a name that's illegal as an XML id, - use the optional "name" attribute - (). - If neither given, the objects name is - used as id. -

-
-
- - - Can be used to create one or more aliases illegal in an id. - - -

- Multiple aliases can be separated by any number of spaces, - semicolons, or commas - (). -

-

- Always optional. -

-
-
- - - Is this object a "singleton" (one shared instance, which will - be returned by all calls to - with the id), or a - "prototype" (independent instance resulting from each call to - ). - - -

- Singletons are most commonly used, and are ideal for multi-threaded - service objects. -

-
- -
- - - Controls object scope. Only applicable to ASP.NET web applications. - - -

- Scope can be defined as either application, session or request. It - defines when "singleton" instances are initialized, but has no - effect on prototype definitions. -

-
-
- - - The names of the objects that this object depends on being - initialized. - - -

- The object factory will guarantee that these objects - get initialized before this object definition. -

- - Dependencies are normally expressed through object properties or - constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Optional attribute for the name of the custom initialization method - to invoke after setting object properties. - - -

- The method must have no arguments. -

-
-
- - - Optional attribute for the name of the custom destroy method to - invoke on object factory shutdown. - - -

- Valid destroy methods have either of the following signatures... - - void MethodName() - void MethodName(bool force) - -

- - Only invoked on singleton objects! - -
-
- - - A constructor argument : the constructor-arg tag can have an - optional type attribute, to specify the exact type of the - constructor argument - - -

- Only needed to avoid ambiguities, e.g. in case of 2 single - argument constructors that can both be converted from a - . -

-
-
- - - The constructor-arg tag can have an optional index attribute, - to specify the exact index in the constructor argument list. - - -

- Only needed to avoid ambiguities, e.g. in case of 2 arguments of - the same type. -

-
-
- - - The constructor-arg tag can have an optional named parameter - attribute, to specify a named parameter in the constructor - argument list. - - - - - Is this object "abstract", i.e. not meant to be instantiated itself - but rather just serving as parent for concrete child object - definitions? - - -

- Default is . Specify - to tell the object factory to not try to instantiate that - particular object in any case. -

-
-
- - - A property definition : object definitions can have zero or more - properties. - - -

- Spring.NET supports primitives, references to other objects in the - same or related factories, lists, dictionaries, and name value - collections. -

-
-
- - - A reference to another managed object or static - . - - - - - ID refs must specify a name of the target object. - - - - - A reference to the name of another managed object in the same - context. - - - - - A reference to the name of another managed object in the same - context. - - -

- Local references, using the "local" attribute, have to use object - ids; they can be checked by a parser, thus should be preferred for - references within the same object factory XML file. -

-
-
- - - Alternative to type attribute for factory-method usage. - - -

- If this is specified, no type attribute should be used. This should - be set to the name of an object in the current or ancestor - factories that contains the relevant factory method. This allows - the factory itself to be configured using Dependency Injection, and - an instance (rather than static) method to be used. -

-
-
- - - Optional attribute specifying the name of a factory method to use - to create this object. - - -

- Use constructor-arg elements to specify arguments to the factory - method, if it takes arguments. Autowiring does not apply to - factory methods. -

-

- If the "type" attribute is present, the factory method will be a - static method on the type specified by the "type" attribute on - this object definition. Often this will be the same type as that - of the constructed object - for example, when the factory method - is used as an alternative to a constructor. However, it may be on - a different type. In that case, the created object will *not* be - of the type specified in the "type" attribute. This is analogous - to behaviour. -

-

- If the "factory-object" attribute is present, the "type" attribute - is not used, and the factory method will be an instance method on - the object returned from a - - call with the specified object name. The factory object may be - defined as a singleton or a prototype. -

-

- The factory method can have any number of arguments. Use indexed - constructor-arg elements in conjunction with the factory-method - attribute. -

-

- Setter Injection can be used in conjunction with a factory method. - Method Injection cannot, as the factory method returns an instance, - which will be used when the container creates the object. -

-
-
- - - A list can contain multiple inner object, ref, collection, or - value elements. - - -

- Lists are untyped, pending generics support, although references - will be strongly typed. -

-

- A list can also map to an array type. The necessary conversion is - automatically performed by the - . -

-
-
- - - A set can contain multiple inner object, ref, collection, or value - elements. - - -

- Sets are untyped, pending generics support, although references - will be strongly typed. -

-
-
- - - A Spring.NET map is a mapping from a string key to object (a .NET - ). - - -

- Dictionaries may be empty. -

-
-
- - - A lookup key (for a dictionary or name / value collection). - - - - - A lookup key (for a dictionary or name / value collection). - - - - - Contains a string representation of a value. - - -

- This is used by name-value, ctor argument, and property elements. -

-
-
- - - Contains delimiters that should be used to split delimited string values. - - -

- This is used by name-value element. -

-
-
- - - A reference to another objects. - - -

- Used as a convenience shortcut on property and constructor-arg - elements to refer to other objects. -

-
-
- - - Contains a string representation of an expression. - - -

- This is used by ctor argument and property elements. -

-
-
- - - A map entry can be an inner object, ref, collection, or value. - - -

- The name of the property is given by the "key" attribute. -

-
-
- - - Contains a string representation of a property value. - - -

- The property may be a string, or may be converted to the - required using the - - machinery. This makes it possible for application developers to - write custom - implementations that can convert strings to objects. -

- - This is recommended for simple objects only. Configure more complex - objects by setting properties to references to other objects. - -
-
- - - Contains a string representation of an expression. - - - - - Denotes value. - - -

- Necessary because an empty "value" tag will resolve to an empty - , which will not be resolved to - value unless a special - does so. -

-
-
- - - 'name-values' elements differ from dictionary elements in that - values must be strings. - - -

- May be empty. -

-
-
- - - Element content is the string value of the property. - - -

- The "key" attribute is the name of the property. -

-
-
- - - The lazy initialization mode for an individual object definition. - - - - - The dependency checking mode for an individual object definition. - - - - - Defines a subscription to one or more events published by one or - more event sources. - - - - - The name of an event handling method. - - -

- Defaults to On${event}. - Note : this default will probably change before the first 1.0 - release. -

-
-
- - - The name of an event. - - - - - The autowiring mode for an individual object definition. - - - - - Shortcut alternative to specifying a key element in a - dictionary entry element with <ref object="..."/>. - - - - - Shortcut alternative to specifying a value element in a - dictionary entry element with <ref object="..."/>. - - - - - Specify if the collection values should be merged with the parent. - - - - - The string of characters that delimit object names. - - - - - A lookup method causes the IoC container to override a given method and return - the object with the name given in the attendant object attribute. - - -

- This is a form of Method Injection. -

-

- It's particularly useful as an alternative to implementing the - interface, - in order to be able to make - - calls for non-singleton instances at runtime. In this case, Method Injection - is a less invasive alternative. -

-
-
- - - The name of a lookup method. This method must take no arguments. - - - - - The name of the object in the IoC container that the lookup method - must resolve to. - - -

- Often this object will be a prototype, in which case the lookup method - will return a distinct instance on every invocation. This is useful - for single-threaded objects. -

-
-
- - - A replaced method causes the IoC container to override a given method - with an (arbitrary) implementation at runtime. - - -

- This (again) is a form of Method Injection. -

-
-
- - - Name of the method whose implementation should be replaced by the - IoC container. - - -

- If this method is not overloaded, there's no need to use arg-type - subelements. -

-

- If this method is overloaded, arg-type subelements must be - used for all override definitions for the method. -

-
-
- - - The object name of an implementation of the - interface. - - -

- This may be a singleton or prototype. If it's a prototype, a new - instance will be used for each method replacement. Singleton usage - is the norm. -

-
-
- - - Subelement of replaced-method identifying an argument for a - replaced method in the event of method overloading. - - - - - - Specification of the of an overloaded method - argument as a . - - -

- For convenience, this may be a substring of the FQN. E.g. all the following would match - : -

-

- - - System.String - - - string - - - str - - -

-
- -
- - - Check everything. - - - - - Just check primitive (string, int, etc) values. - - - - - Check object references. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Stateful class used to parse XML object definitions. - - Not all parsing code has been refactored into this class. See - BeanDefinitionParserDelegate in Java for how this class should evolve. - Rob Harrop - Juergen Hoeller - Rod Johnson - Mark Pollack (.NET) - - - - The shared instance for this class (and derived classes). - - - - - Initializes a new instance of the class. - - The reader context. - - - - Initializes a new instance of the class. - - The reader context. - The root element of the definition document to parse - - - - Initialize the default lazy-init, dependency check, and autowire settings. - - The root element - - - - Determines whether the Spring object namespace is equal to the the specified namespace URI. - - The namespace URI. - - true if is the default Spring namespace; otherwise, false. - - - - - Decorates the object definition if required. - - The element. - The holder. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The containing object definition if is a nested element. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Create an instance from the given and . - - - This method may be used as a last resort to post-process an object definition before it gets added to the registry. - - - - - Allows deriving classes to post process the name and aliases for the current element. By default - does nothing and returns the unmodified . - - - The list passed in may be modified by an implementation of this method to reflect special needs. - - the object name obtained by the default algorithm from 'id' and 'name' attributes so far. - the object aliases obtained by the default algorithm from 'name' attribute so far. - the currently processed element. - the containing object definition, may be null - the new object name to be used. - - - - Validate that the specified object name and aliases have not been used already. - - - - - Parses an element in a custom namespace. - - - the parsed object definition or null if not supported by the corresponding parser. - - - - Parses an element in a custom namespace. - - - if a nested element, the containing object definition - the parsed object definition or null if not supported by the corresponding parser. - - - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Determines whether the string represents a 'true' boolean value. - - The value. - - true if is 'true' string value; otherwise, false. - - - - - Convenience method to create a builder for a root object definition. - - Name of the object type. - A builder for a root object definition. - - - - Convenience method to create a builder for a root object definition. - - Type of the object. - a builder for a root object definition - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Report a parser error. - - - - - Gets the defaults definition object, or null if the - default have not yet been initialized. - - The defaults. - - - - Gets the reader context. - - The reader context. - - - - Creates an instance - populated with the object definitions supplied in the configuration - section. - - -

- Applications will typically want to use an - , and instantiate it - via the use of the - class (which is similar in functionality to this class). This class is - provided for those times when only an - is required. -

- Creates an instance of the class XmlObjectFactory -
- -

- -

-
- Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a - instance populated with the object definitions supplied in the - configuration section. - - - The configuration settings in a corresponding parent configuration - section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - A instance - populated with the object definitions supplied in the configuration - section. - - - - - Default implementation of the - interface. - - -

- Parses object definitions according to the standard Spring.NET schema. -

-

- This schema is typically located at - http://www.springframework.net/xsd/spring-objects.xsd. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The namespace URI for the standard Spring.NET object definition schema. - - - - - The shared instance for this class (and derived classes). - - - - - Invoked by after construction but before any - elements have been parsed. - - This is a NoOp - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - The parser context. - - If the resource could not be imported. - - - - Parses an event listener definition. - - The name associated with the object that the event handler is being defined on. - - The events being populated. - - The element containing the event listener definition. - - - The namespace-aware parser. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The parser context. - if set to true if we are processing an inner - object definition. - - The object (definition) wrapped within an - - instance. - - -

- Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. -

-

- If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. -

-
-
- - - Calculates an id for an object definition. - - -

- Called when an object definition has not been explicitly defined - with an id. -

-
- - The element containing the object definition. - - - The list of names defined for the object; may be - or even empty. - - - A calculated object definition id. - -
- - - Parse a standard object definition. - - The element containing the object definition. - The id of the object definition. - parsing state holder - The object (definition). - - - - Parse method override argument subelements of the given object element. - - - - - Parse element and add parsed element to - - - - - Parse element and add parsed element to - - - - - Parse constructor argument subelements of the given object element. - - - - - Parse event handler subelements of the given object element. - - - - - Parse property value subelements of the given object element. - - - The name of the object (definition) associated with the property element (s) - - - The element containing the top level object definition. - - - The namespace-aware parser. - - - The property (s) associated with the object (definition). - - - - - Parse a constructor-arg element. - - - The name of the object (definition) associated with the ctor arg. - - - The list of constructor args associated with the object (definition). - - - The name of the element containing the ctor arg definition. - - - The namespace-aware parser. - - - - - Parse a property element. - - - The name of the object (definition) associated with the property. - - - The list of properties associated with the object (definition). - - - The name of the element containing the property definition. - - - The namespace-aware parser. - - - - - Get the value of a property element (may be a list). - -

- Please note that even though this method is named GetPropertyValue, - it is called by both the property and constructor argument element - handlers. -

-
- The property element. - - The name of the object associated with the property. - - - The namespace-aware parser. - -
- - - Parse a value, ref or collection subelement of a property element. - - - Subelement of property element; we don't know which yet. - - - The name of the object (definition) associated with the top level property. - - - The namespace-aware parser. - - - - - Gets a list definition. - - - The element describing the list definition. - - - The name of the object (definition) associated with the list definition. - - - The namespace-aware parser. - - The list definition. - - - - Gets a set definition. - - - The element describing the set definition. - - - The name of the object (definition) associated with the set definition. - - - The namespace-aware parser. - - The set definition. - - - - Gets a dictionary definition. - - The element describing the dictionary definition. - The name of the object (definition) associated with the dictionary definition. - The namespace-aware parser. - The dictionary definition. - - - - Selects sub-elements with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child nodes to look for. - - - The child s of the supplied - with the supplied - . - -
- - - Selects a single sub-element with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child node to look for. - - - The first child of the supplied - with the supplied - . - -
- - - Gets a name value collection mapping definition. - - - The element describing the name value collection mapping definition. - - - The name of the object (definition) associated with the - name value collection mapping definition. - - the context carrying parsing state information - The name value collection definition. - - - - Returns the text of the supplied , - or the empty string value if said is empty. - - -

- If the supplied is , - then the empty string value will be returned. -

-
-
- - - Strips the dependency check value out of the supplied string. - - -

- If the supplied is an invalid dependency - checking mode, the invalid value will be logged and this method will - return the value. - No exception will be raised. -

-
- - The string containing the dependency check value. - - The dependency check value. - -
- - - Strips the autowiring mode out of the supplied string. - - -

- If the supplied is an invalid autowiring mode, - the invalid value will be logged and this method will return the - value. No exception will be raised. -

-
- - The string containing the autowiring mode definition. - - The autowiring mode. - -
- - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Context that gets passed along an object definition parsing process, encapsulating - all relevant configuraiton as well as state. - - - - - Initializes a new instance of the class. - - The parser helper. - - - - Initializes a new instance of the class. - - The parser helper. - The containing object definition. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - The containing object definition. - - - - Gets the reader context. - - The reader context. - - - - Gets the registry. - - The registry. - - - - Gets the parser helper. - - The parser helper. - - - - Gets the containing object definition. - - The containing object definition. - - - - Gets a value indicating whether this instance is nested. - - true if this instance is nested; otherwise, false. - - - - Gets a value indicating whether this instance is default lazy init. - - - true if this instance is default lazy init; otherwise, false. - - - - - Represents the replacement of a method on a managed object by the IoC - container. - - -

- Note that this mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The name of the method that is to be overridden. - - - The object name of the - instance in the surrounding IoC container. - - - If either of the supplied arguments is or - contains only whitespace character(s). - - - - - Add a fragment of a instance's - such as 'Exception or System.Excep to identify an argument - for a dependency injected method. - - - A (sub) string of a instance's . - - - If the supplied is or - contains only whitespace character(s). - - - - - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The object name of the - instance in the surrounding IoC container. - - - - - Object definition reader for Spring's default XML object definition format. - - -

- Typically applied to a - instance. -

-

- This class registers each object definition with the given object factory superclass, - and relies on the latter's implementation of the - interface. -

-

- It supports singletons, prototypes, and references to either of these kinds of object. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - the to use for creating new s - - - - Load object definitions from the supplied XML . - - - The XML resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Actually load object definitions from the specified XML file. - - The input stream to read from. - The resource for the XML data. - - - - - Validation callback for a validating XML reader. - - The source of the event. - Any data pertinent to the event. - - - - Register the object definitions contained in the given DOM document. - - The DOM document. - - The original resource from where the - was read. - - - The number of object definitions that were registered. - - - In case of parsing errors. - - - - - Creates the to use for actually - reading object definitions from an XML document. - - Default implementation instantiates the specified - or if no reader type is specified. - - - - - Creates the to be passed along - during the object definition reading process. - - The underlying that is currently processed. - A new - - - - Create a instance for handling custom namespaces. - - - TODO (EE): make protected virtual, see remarks on - - - - - The to be used for parsing. - - - - - Sets the IObjectDefinitionDocumentReader implementation to use, responsible for - the actual reading of the XML object definition document.stype of the document reader. - - The type of the document reader. - - - - Specify a to use. If none is specified a default - instance will be created by - - - - - Specify a for creating instances of . - - - - - For retrying the parse process - - - - - Convenience extension of - - that reads object definitions from an XML document or element. - - -

- Delegates to - - underneath; effectively equivalent to using a - for a - . -

- - objects doesn't need to be the root element of - the XML document: this class will parse all object definition elements in the - XML stream. - -

- This class registers each object definition with the - - superclass, and relies on the latter's implementation of the - interface. It supports - singletons, prototypes and references to either of these kinds of object. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Gets object definition reader to use. - - - - - Extension of specific to use with an XmlObjectDefinitionReader. - Provides access to configured in - - - - - The maximum length of any XML fragment displayed in the error message - reporting. - - -

- Hopefully this will display enough context so that a user - can pinpoint the cause of the error. -

-
-
- - - Initializes a new instance of the class. - - The resource. - The reader. - - - - Initializes a new instance of the class. - - The resource. - The reader. - The factory to use for creating new instances. - - - - Generates the name of the object. - - The object definition. - the generated object name - - - - Registers the name of the with generated. - - The object definition. - the generated object name - - - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - - -
- - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the error. - - - The root cause of the parse error (if any - may be ). - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - -
- - - This method can be overwritten in order to implement validators - capable of displaying a full list of errors found in the definition. - - - The node that triggered the parse error. - - - A message about the exception. - - - - - Gets the reader. - - The reader. - - - - Gets the resource loader. - - The resource loader. - - - - Gets the registry. - - The registry. - - - - Gets or sets the object definition factory. - - The object definition factory. - - - - Get the instance to lookup parsers for custom namespaces. - - - - - Exception thrown if an - is not fully - initialized, for example if it is involved in a circular reference. - - -

- This is usually indicated by any of the variants of the - - method returning . -

-

- A circular reference with an - cannot be solved by eagerly caching singleton instances (as is the - case with normal objects. The reason is that every - needs to be fully - initialized before it can return the created object, while only specific - normal objects need to be initialized - that is, if a collaborating object - actually invokes them on initialization instead of just storing the reference. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Thrown when an - encounters an error when attempting to create an object from an object - definition. - - Juergen Hoeller - Rick Evans (.NET) - - - - 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 name of the object that triggered 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. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Describes the creation failure trace of this exception. - - - - - Creates a new instance of the - FactoryObjectNotInitializedException class. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - FactoryObjectCircularReferenceException class. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectCircularReferenceException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - is asked for an object instance name for which it cannot find a definition. - - Rod Johnson - Rick Evans (.NET) - - - - 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. - - - Name of the missing object. - - - A further, detailed message describing the problem. - - - - - Initializes a new instance of the class. - - The required type of the object. - A description of the originating dependency. - A message describing the problem. - - - - Creates a new instance of the - class. - - - The of the missing object. - - - A further, detailed message describing the problem. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Return the required of object, if it was a - lookup by that failed. - - - - - Return the name of the missing object, if it was a lookup by name that - failed. - - - - - Thrown in case of a reference to an object that is currently in creation. - - -

- Typically happens when constructor autowiring matches the currently - constructed object. -

-
- Juergen Hoeller - Rick Evans -
- - - The default error message text to be used, if none is specified. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectCurrentlyInCreationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - encounters an error when attempting to parse an object - definition. - - Federico Spinazzi (.NET) - - - - Creates a new instance of the ObjectDefinitionException class. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The value of the xml class attribute thet can be resolved - as a type - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The message about the exception. - - - - - Thrown when an - encounters an internal error, and its definitions are invalid. - - -

- An example of a situation when this exception would be thrown is - in the case of an XML document containing object definitions being - malformed. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectDefinitionStoreException class. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The description of the resource associated with the object - - - - - The name of the object that trigger the exception. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Convenience methods operating on object factories, returning object instances, - names, or counts. - - -

- The nesting hierarchy of an object factory is taken into account by the various methods - exposed by this class. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Used to dereference an - and distinguish it from managed objects created by the factory. - - -

- For example, if the managed object identified as foo is a - factory, getting &foo will return the factory, not the - instance returned by the factory. -

-
-
- - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Count all object definitions in any hierarchy in which this - factory participates. - - -

- Includes counts of ancestor object factories. -

-

- Objects that are "overridden" (specified in a descendant factory - with the same name) are counted only once. -

-
- The object factory. - - The count of objects including those defined in ancestor factories. - -
- - - Return all object names in the factory, including ancestor factories. - - The object factory. - The array of object names, or an empty array if none. - - - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s - if is set to true, - which means that s will get initialized. -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - The array of object names, or an empty array if none. - -
- - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - The array of object names, or an empty array if none. - -
- - - Return all objects of the given type or subtypes, also picking up objects - defined in ancestor object factories if the current object factory is an - . - - -

- The return list will only contain objects of this type. - Useful convenience method when we don't care about object names. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the objects could not be created. - - - The of object instances, or an - empty if none. - -
- - - Return a single object of the given type or subtypes, also picking up objects defined - in ancestor object factories if the current object factory is an - . - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If more than one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. - This version of ObjectOfType automatically includes prototypes and - instances. -

-
- The object factory. - The of object to match. - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return the object name, stripping out the factory dereference prefix if necessary. - - The name of the object. - The object name sans any factory dereference prefix. - - - - Given an (object) name, builds a corresponding factory object name such that - the return value can be used as a lookup name for a factory object. - - - The name to be used to build the resulting factory object name. - - - The transformed into its factory object name - equivalent. - - - - - - - Is the supplied a factory dereference? - - -

- That is, does the supplied begin with - the - ? -

-
- The name to check. - - if the supplied is a - factory dereference; if not, or the - aupplied is or - consists solely of the - - value. - - -
- - - Exception that an object implementation is suggested to throw if its own - factory-aware initialization code fails. - thrown by object factory methods - themselves should simply be propagated as-is. - - -

- Note that non-factory-aware initialization methods like AfterPropertiesSet () - or a custom "init-method" can throw any exception. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectInitializationException class. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectInitializationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to an attempt to lookup a factory object, and - the object identified by the lookup key is not a factory. - - -

- An object is a factory if it implements (either directly or indirectly - via inheritance) the - interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Thrown when an object doesn't match the required . - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - Name of the object requested. - - - The required of the actual object - instance that was retrieved. - - - The instance actually returned, whose class did not match the - expected . - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The actual of the actual object - instance that was retrieved. - - - - - The required of the actual object - instance that was retrieved. - - - - - The instance actually returned, whose class did not match the - expected . - - - - - The name of the object requested. - - - - - 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 name of the object that was being retrieved from the factory. - - - The object instance that was retrieved. - - - - - 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. - - - - - Exception thrown when an object depends on other objects or simple properties - that were not specified in the object factory definition, although dependency - checking was enabled. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The constructor argument index at which the dependency is - unsatisfied. - - - The of the constructor argument at - which the dependency is unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The name identifying the property on which the dependency is - unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Base class implementation for classes that describe an event handler. - - Rick Evans - - - - Describes an event handler. - - Rick Evans - - - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - The source of the event. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Returns a stringified representation of this object. - - A stringified representation of this object. - - - - The source of the event (may be unresolved, as in the case - of a - value). - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Convenience base class for implementations. - - - - - Abstracts the state sharing strategy used - by - - Erich Eichinger - - - - Indicate, whether the given instance can be served by this factory - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state can - be served for the given instance or not. - - - - - Returns the shared state for the given instance. - - the instance to obtain shared state for. - the name of this instance - a dictionary containing shared state for or null. - - - - Gets a dictionary acc. to the type of . - If no dictionary is found, create it according to - - the instance to obtain shared state for - the name of the instance. - - A dictionary containing the 's state, - or null if no state can be served by this provider. - - - - - Creates a dictionary to hold the shared state identified by . - - a key to create the dictionary for. - a dictionary according to and . - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Create the key used for obtaining the state dictionary for . - - the instance to create the key for - the name of the instance. - - the key identifying the state dictionary to be used for - or null, if this state manager doesn't serve the given instance. - - - - Implementations may choose to return null from this method to indicate, - that they won't serve state for the given instance. - - - Note:Keys returned by this method are always treated case-sensitive! - - - - - - Create shared state dictionaries case-sensitive or case-insensitive? - - - - - A number indicating the priority of this ( for more). - - - - - Base class for all - implemenations that actually perform event wiring. - - Rick Evans - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Resolves the method metadata that describes the method that is to be used - as the argument to a delegate constructor. - - - The exposing the method. - - - The of the delegate (e.g. System.EventHandler). - - - The custom binding flags to use when searching for the method. - - The method metadata. - - If the method could not be found. - - - - - Describes an implementation - that autowires events to handler methods. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Wires up the specified handler to the named event on the supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a , - etc). - - - - - The name of the method that is going to handle the event. - - - - - Performs the matching up of handler methods to one or more source events. - - -

- This class merely marshals the matching of handler methods to the events exposed - by an event source, and then delegates to a concrete - implementation (such as - or - ) to do the heavy lifting of - actually wiring a handler method to an event. -

-

- Note : the order in which handler's are wired up to events is non-deterministic. -

-
-
- - - Creates a new instance of the - class. - - - The object exposing the event (s) being wired up. - - - The name of the event that is being wired up. - - - The object exposing the method (s) being wired to the event. - - - The name of the method that is going to handle the event. - - - - - Wires up events on the source to methods exposed on the handler. - - - - - Wires up the supplied event to any handler methods that match the event - signature. - - The event being wired up. - - - - Only replaces the first occurrence of the placeholder. - - The event whose name is going to be used. - - The method name customised for the name of the supplied event. - - - - - The object exposing the event (s) being wired up. - - - - - The object exposing the method (s) being wired to an event source. - - - - - The of the object that is handling any events. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Serves shared state on a by-type basis. - - - - - Creates a new instance matching all types by default. - - - - - Creates a new instance matching only specified list of types. - - the list of types to serve. - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Returns the for the given . - - the instance to obtain the key for. - the name of the instance (ignored by this provider) - instance.GetType() if it matches the list. Null otherwise. - - This method will only be called if returned true previously. - - - - - Limit object types to be served by this state manager. - - - Only objects assignable to one of the types in this list - will be served state by this manager. - - - - - Describes an event handler for an object instance. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Definition for sorting object instances by a property. - - Juergen Hoeller - Simon White (.NET) - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Mutable implementation of the - interface that - supports toggling the ascending value on setting the same property again. - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using - the specified . - - - The to use - as a source for initial property values. - - - - - Creates a new instance of the - class. - - - The name of the property to sort by. - - - Whether upper and lower case in string values should be ignored. - - - Whether or not the sorting should be ascending or descending. - - - - - Creates a new instance of the - class. - - - Whether or not the - - property should be toggled if the same name is set on the - - property. - - - - - Overrides the default method - - - The object to test against this instance for equality. - - - True if the supplied is equal to this instance. - - - - - Overrides the default method. - - The hashcode for this instance. - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Performs a comparison of two objects, using the specified object property via - an . - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - The to use for any - sorting. - - - If the supplied is . - - - - - Compares two objects and returns a value indicating whether one is less - than, equal to or greater than the other. - - The first object to compare. - The second object to compare. - - - - - Get the 's property - value for the given object. - - The object to get the property value for. - The property value. - - - - Sort the given according to the - given sort definition. - - - The to be sorted. - - The parameters to sort by. - - In the case of a missing property name. - - - If the supplied is . - - - - - Gets the to - use for any sorting. - - - The to use for - any sorting. - - - - - Describes an event handler for a static class method. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - The central interface of Spring.NET's low-level object infrastructure. - - -

- Typically not directly used by application code but rather implicitly - via an . -

-

- Implementing classes have the ability to get and set property values - (individually or in bulk), get property descriptors and query the - readability and writability of properties. -

-

- This interface supports nested properties enabling the setting - of properties on subproperties to an unlimited depth. -

-

- If a property update causes an exception, a - will be thrown. Bulk - updates continue after exceptions are encountered, throwing an exception - wrapping all exceptions encountered during the update. -

-

- implementations can be used - repeatedly, with their "target" or wrapped object changed. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - Get the value of a property. - - The name of the property to get the value of. May be nested. - - The value of the property. - - if the property isn't readable, or if the getting the value throws - an exception. - - - - - Get the for a particular - property. - - - The property to be retrieved. - - - The for the particular - property. - - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Get all of the instances for - all of the properties of the wrapped object. - - - An array of instances. - - - - - Set a property value. - - -

- This is the preferred way to update an individual property. -

-
- The new property value. -
- - - Set a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new property value. -
- - Set a number of property values in bulk. - -

- This is the preferred way to perform a bulk update. -

-

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

- Does not allow the setting of unknown fields. Equivalent to - - with an argument of false for the second parameter. -

-
- - The collection of instances to - set on the wrapped object. - -
- - - Set a number of property values in bulk with full control over behavior. - - -

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

Does not allow the setting of unknown fields. -

-
- - The to set on the target object - - - Should we ignore unknown values (not found in the object!?) - -
- - - The object wrapped by the wrapper (cannot be ). - - -

- Implementations are required to allow the type of the wrapped - object to change. -

-
- The object wrapped by this wrapper. -
- - - Convenience method to return the - of the wrapped object. - - The of the wrapped object. - - - - A collection style container for - instances. - - Rod Johnson - Mark Pollack (.NET) - - - - Return the instance with the - given name. - - The name to search for. - the , or null if a - the with the supplied - did not exist in this collection. - - - - - Is there a instance for this - property name? - - The name to search for. - - True if there is a instance for - the supplied . - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - -

- Subclasses should also override Equals. -

-
- The old property values. - - An containing any changes, or - an empty instance if there were - no changes. - -
- - - Return an array of the objects - held in this object. - - An array of the objects held - in this object. - - - - - This interface should be implemented by classes that want to - have access to the shared state. - - -

- Shared state is very useful if you have data that needs to be shared by all instances - of e.g. the same webform (or other IHttpHandlers). -

-

- For example, Spring.Web.UI.Page class implements this interface, which allows - each page derived from it to cache localizalization resources and parsed data binding - expressions only once and then reuse the cached values, regardless of how many instances - of the page are created. -

-
-
- - - Gets or sets the that should be used - to store shared state for this instance. - - - - - Default implementation of the - interface. - - -

- Allows simple manipulation of properties, and provides constructors to - support deep copy and construction from a number of collection types such as - and - . -

-
- Rod Johnson - Mark Pollack (.NET) - Rick Evans (.NET) -
- - - The list of objects. - - - - - Creates a new instance of the - class. - - -

- The returned instance is initially empty... - s can be added with the various - overloaded , - , - , - and - methods. -

-
- - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. Guarantees - references are independent, although it can't deep copy objects currently - referenced by individual objects. -

-
-
- - - Creates a new instance of the - class. - - - The with property values - keyed by property name, which must be a . - - - - - Overloaded version of Add that takes a property name and a property value. - - - The name of the property. - - - The value of the property. - - - - - Add the supplied object, - replacing any existing one for the respective property. - - - The object to add. - - - - - Merges the value of the supplied 'new' with that of - the current if merging is supported and enabled. - - - The new pv. - The current pv. - The possibly merged PropertyValue - - - - Add all property values from the given - . - - - The map of property values, the keys of which must be - s. - - - - - Add all property values from the given - . - - - The list of s to be added. - - - - - Remove the given , if contained. - - - The to remove. - - - - - Removes the named , if contained. - - - The name of the property. - - - - - Modify a object held in this object. Indexed from 0. - - - - - Return the property value given the name. - - - The property name is checked in a case-insensitive fashion. - - - The name of the property. - - - The property value. - - - - - Does the container of properties contain one of this name. - - The name of the property to search for. - - True if the property is contained in this collection, false otherwise. - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - Another property values collection. - - The collection of property values that are different than the supplied one. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - Convert the object to a string representation. - - - A string representation of the object. - - - - - Property to retrieve the array of property values. - - - - - Default implementation of the - interface that should be sufficient for all normal uses. - - -

- will convert - and array - values to the corresponding target arrays, if necessary. Custom - s that deal with - s or arrays can be written against a - comma delimited as - arrays are converted in such a format if the array itself is not assignable. -

-
- Rod Johnson - Juergen Hoeller - Jean-Pierre Pawlak - Mark Pollack (.NET) - Aleksandar Seovic(.NET) -
- - The wrapped object. - - - - The ILog instance for this class. We'll create a lot of these objects, - so we don't want a new instance every time. - - - - - Creates a new instance of the class. - - -

- The wrapped target instance will need to be set afterwards. -

-
- -
- - - Creates a new instance of the class. - - - The object wrapped by this . - - - If the supplied is . - - - - - Creates a new instance of the class, - instantiating a new instance of the specified and using - it as the . - - -

- Please note that the passed as the - argument must have a no-argument constructor. - If it does not, an exception will be thrown when this class attempts - to instantiate the supplied using it's - (non-existent) constructor. -

-
- - The to instantiate and wrap. - - - If the is , or if the - invocation of the s default (no-arg) constructor - fails (due to invalid arguments, insufficient permissions, etc). - -
- - Gets the value of a property. - - The name of the property to get the value of. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - Gets the value of a property. - - The property expression that should be used to retrieve the property value. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - - Sets a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new value. -
- - - Sets a property value. - - - The property expression that should be used to set the property value. - - The new value. - - - - Sets a property value. - - -

- This is the preferred way to update an individual property. -

-
- - The object containing new property value. - -
- - Set a number of property values in bulk. - -

- Does not allow unknown fields. Equivalent to - - with and for - arguments. -

-
- - The to set on the target - object. - - - If an error is encountered while setting a property. - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Perform a bulk update with full control over behavior. - - -

- This method may throw a reflection-based exception, if there is a critical - failure such as no matching field... less serious exceptions will be accumulated - and thrown as a single . -

-
- - The s to set on the target object. - - - Should we ignore unknown values (not found in the object!?). - - - If an error is encountered while setting a property (only thrown if the - parameter is set to ). - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Returns PropertyInfo for the specified property - - The name of the property to search for. - The for the specified property. - If cannot be determined. - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Returns MemberInfo for the specified property or field - - The name of the property or field to search for. - The or for the specified property or field. - If does not resolve to a property or field. - - - - Get the properties of the wrapped object. - - - An array of s. - - - - - This method is expensive! Only call for diagnostics and debugging reasons, - not in production. - - - A string describing the state of this object. - - - - - Attempts to parse property expression first and falls back to full expression - if that fails. Performance optimization. - - Property expression to parse. - Parsed proeprty expression. - - - - The object wrapped by this . - - - If the object cannot be changed; or an attempt is made to set the - value of this property to . - - - - - Convenience method to return the of the wrapped object. - - -

- Do not use this (convenience) method prior to setting the - property. -

-
- - The of the wrapped object. - - - If the property - is . - -
- - - Return the collection of property descriptors. - - - - - Combined exception, composed of individual binding - s. - - -

- An object of this class is created at the beginning of the binding - process, and errors added to it as necessary. -

-

- The binding process continues when it encounters application-level - s, applying those changes - that can be applied and storing rejected changes in an instance of this class. -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) -
- - - Creates a new instance of the PropertyAccessExceptionsException class. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Create new empty PropertyAccessExceptionsException. - We'll add errors to it as we attempt to bind properties. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The IObjectWrapper wrapping the target object at the root of the exception. - - - - The list of PropertyAccessException objects. - - - - Return the - for the supplied , or - if there isn't one. - - - - - Describe the number of exceptions contained in this container class. - - A description of the instance contents. - - - - Return the that generated - this exception. - - - - - Return the object we're binding to. - - - - - If this returns zero (0), no errors were encountered during binding. - - - - - Return an array of the s - stored in this object. - - -

- Will return the empty array (not ) if there were no errors. -

-
-
- - - Describe the group of exceptions. - - - - - Holds information and value for an individual property. - - -

- Using an object here, rather than just storing all properties in a - map keyed by property name, allows for more flexibility, and the - ability to handle indexed properties in a special way if necessary. -

-

- Note that the value doesn't need to be the final required - : an - implementation must - handle any necessary conversion, as this object doesn't know anything - about the objects it will be applied to. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - - If the supplied is or - contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - Pre-parsed property name. - - If the supplied or - is , or if the name contains only whitespace characters. - - - - - Print a string representation of the property. - - A string representation of the property. - - - - Determines whether the supplied - is equal to the current . - - The other instance. - - if they are equal in content. - - - - - 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 name of the property. - The name of the property. - - - - Parsed property expression. - - - - - Return the value of the property. - - -

- Note that type conversion will not have occurred here. - It is the responsibility of the - implementation to - perform type conversion. -

-
- The (possibly unresolved) value of the property. -
- - - A simple pool implementation - - -

- Based on the implementation found in Concurrent Programming in Java, - 2nd ed., by Doug Lea. -

-
- Doug Lea - Federico Spinazzi - Mark Pollack -
- - - A simple pooling interface for managing and monitoring a pool - of objects. - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - Obtain an instance from the pool. - - -

- By contract, clients must return the borrowed - instance using - or a related method as defined in an implementation or - sub-interface. -

-
- An instance from the pool. - - In case the pool is unusable. - - -
- - - Return an instance to the pool. - - -

- By contract, the object must have been obtained using - - or a related method as defined in an implementation or sub-interface. -

-
- The instance to be returned to the pool. - -
- - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This is an optional operation. AddObject is useful for "pre-loading" a - pool with idle objects. -

-
- - If the implementation does not support the operation. - -
- - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently borrowed from the pool. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently idle in the pool. - - -

- This is an optional operation. -

-

- This may be considered an approximation of the number of objects - that can be borrowed without creating any new instances. -

-
- - If the implementation does not support the operation. - -
- - - Set the factory used to create new instances. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Set of permits - - - - - Creates a new instance of the - class. - - - The factory used to instantiate and manage the lifecycle of pooled objects. - - The initial size of the pool. - - If the supplied is . - - - If the supplied is less than or equal to zero. - - - - - Obtain an instance from the pool. - - - In case the pool is unusable. - - - - - - - Return an instance to the pool. - - The instance to be returned to the pool. - - - - - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Synchronized borrow logic. - - - - - - Synchronized release logic. - - - The object to release to the pool. - - - if the object was not a busy one. - - - - - Instantiates the supplied number of instances and adds - them to the pool. - - - The initial number of objects to build. - - - If the supplied number of is - less than or equal to zero. - - - - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Change the state of the pool to unusable. - - - - - Gets the number of instances currently borrowed from the pool. - - - If the implementation does not support the operation. - - - - - - Gets the number of instances currently idle in the pool. - - - If the implementation does not support the operation. - - - - - - Set the factory used to create new instances. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Defines lifecycle methods for objects that are to be used in an - implementation. - - -

- The following methods summarize the contract between an - and an - an . -

- - - - is called whenever a new instance is needed. - - - - is invoked on every instance before it is returned from - the pool. - - - - is invoked on every instance when it is returned to the pool. - - - - is invoked on every instance when it is being dropped from the - pool (see - - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - 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. - - -

- Invoked on every instance when it is being "dropped" - from the pool (whether due to the return value from a call to the - - method, or for reasons specific to the pool implementation.) -

-
- 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. - - -

- Invoked in an implementation-specific fashion to determine if an - instance is still valid to be returned by the pool. - It will only be invoked on an "activated" instance. -

-
- 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. - - -

- Invoked on every instance before it is returned from the pool. -

-
- The instance to be activated. -
- - - Uninitialize an instance to be returned to the pool. - - -

- Invoked on every instance when it is returned to the pool. -

-
- The instance returned to the pool. -
- - - Base class for all pooling exceptions. - - Federico Spinazzi - - - - 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. - - - - - Base class for method builders that contains common functionalities. - - Bruno Baia - - - - Defines interface that proxy method builders have to implement. - - Aleksandar Seovic - Bruno Baia - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - The type builder to use. - - - - - The implementation to use. - - - - - Indicates whether interfaces should be implemented explicitly. - - - - - 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 . - - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Defines proxy method for the target object. - - The method to proxy. - - The interface definition of the method, if applicable. - - - if the supplied is to be - implemented explicitly; otherwise . - - - The for the proxy method. - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Calls target method directly. - - The IL generator to use. - The method to invoke. - - - - Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. - - The IL generator to use. - The method to test for - the name of the target to be used in error messages - - - - Calls base method directly. - - The IL generator to use. - The method to proxy. - - - - Replaces a raw reference with a reference to a proxy. - - -

- If the target object returns reference to itself -- 'this' -- - we need to treat it as a special case and return a reference - to a proxy object instead. -

-
- The IL generator to use. - The location of the return value. -
- - - Generates code that throws . - - IL generator to use. - the type of the exception to throw - Error message to use. - - - - Base class for proxy builders that can be used - to create a proxy for any class. - - -

- This class provides a set of template - methods that derived classes can override to provide custom behaviour - appropriate to the type of proxy that is being generated (one of - inheritance or composition-based proxying). -

-
- Aleksandar Seovic - Bruno Baia -
- - - Describes the operations for a generic proxy type builder that can be - used to create a proxy type for any class. - - Aleksandar Seovic - - - - Creates the proxy type. - - The generated proxy class. - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - - - - Gets or sets the list of interfaces proxy should implement. - - - - - Should we proxy target attributes? - - - by default. - Target type attributes, method attributes, method's return type attributes - and method's parameter attributes are copied to the proxy. - - - - - The list of custom s that the proxy - class must be decorated with. - - -

- Note that the list is composed of instances of the actual - s that are to be applied, not the - s of the s. -

-
- -

- The following code snippets show examples of how to decorate the - the proxied class with one or more s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary typeAtts = new Hashtable(); - builder.TypeAttributes = typeAtts; - - // applies a single Attribute to the proxied class... - typeAtts = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to the proxied class... - typeAtts = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - The custom s that the proxy - members must be decorated with. - - -

- This dictionary must use simple s for keys - (denoting the member names that the attributes are to be applied to), - with the corresponding values being - s. -

-

- The key may be wildcarded using the '*' character... if so, - then those proxy members that match against the key will be - decorated with the attendant list of - s. This naturally implies that using - the '*' character as a key will result in the attendant list - of s being applied to every member of - the proxied class. -

-
- -

- The following code snippets show examples of how to decorate the - members of a proxied class with one or more - s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary memAtts = new Hashtable(); - builder.MemberAttributes = memAtts; - - // applies a single Attribute to all members of the proxied class... - memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to all members of the proxied class... - memAtts ["*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - - // applies a single Attribute to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - Describes the operations that generates IL instructions - used to build the proxy type. - - Bruno Baia - - - - Generates the IL instructions that pushes - the proxy 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. - - - - The shared instance for this class (and derived classes). - - - - - Creates the proxy type. - - The generated proxy class. - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Creates an appropriate type builder. - - The name to use for the proxy type name. - The type to extends if provided. - The type builder to use. - - - - Applies attributes to the proxy class. - - The type builder to use. - The proxied class. - - - - - - Applies attributes to the proxied method. - - The method builder to use. - The proxied method. - - - - - - Applies attributes to proxied method's parameters. - - The method builder to use. - The proxied method. - - - - - Calculates and returns the list of attributes that apply to the - specified type. - - The type to find attributes for. - - A list of custom attributes that should be applied to type. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method. - - The method to find attributes for. - - A list of custom attributes that should be applied to method. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method's parameters. - - The method to find attributes for. - The method's parameter to find attributes for. - - A list of custom attributes that should be applied to the specified method's parameter. - - - - - - Check that the specified object is matching the passed attribute type. - - -

- The specified object can be of different type : -

- - - - - - System.Reflection.CustomAttributeData (Only with .NET 2.0) - - - - - -
- The object instance to check. - The attribute type to test against. - - if the object instance matches the attribute type; - otherwise . - -
- - - Defines the types of the parameters for the specified constructor. - - The constructor to use. - The types for constructor's parameters. - - - - Implements constructors for the proxy class. - - - The builder to use. - - - - - Generates the proxy constructor. - - The constructor builder to use. - The IL generator to use. - The constructor to use. - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - if target virtual methods should not be proxied; - otherwise . - - - - - Gets the mapping of the interface to proxy - into the actual methods on the target type - that does not need to implement that interface. - - -

- If the target type does not implement the interface, - we return the interfaces methods as the target methods for many reasons : -

    -
  • - The target object can change for an object that implements the interface. - (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' - implementation in the Spring AOP framework for an example) -
  • -
  • - Allow Transparent proxies to be proxied. - (See Spring Remoting framework for an example) -
  • -
  • - Allow null target to be proxied. - (See Spring AOP framework which avoid calls to the target object - by intercepting all methods. Think "dynamic mock") - (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) -
  • -
-

-
- - The of the target object. - - The interface to implement. - - An interface mapping for the interface to proxy. - -
- - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - if only members declared at the level - of the supplied 's hierarchy should be proxied; - otherwise . - - - - - Implements the specified . - - The type builder to use. - The type the property is defined on. - The property to proxy. - The implemented methods map. - - - - Implements the specified event. - - The type builder to use. - The type the event is defined on. - The event to proxy. - The implemented methods map. - - - - Returns an array of s that represent - the proxiable interfaces. - - - An interface is proxiable if it's not marked with the - . - - - The array of interfaces from which - we want to get the proxiable interfaces. - - - An array containing the interface s. - - - - - Checks if specified interface is of a special type - that should never be proxied (i.e. ISerializable). - - Interface type to check. - - true if it is, false otherwise. - - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - -

- The default value of this property is the - . -

-
-
- - - Gets or sets the list of interfaces proxy should implement. - - - The default value of this property is all the interfaces - implemented or inherited by the target type. - - - - - Should we proxy target attributes? - - - - - - The list of custom s that the proxy - class must be decorated with. - - - - - - The custom s that the proxy - members must be decorated with. - - - - - - Implementation of IProxyMethodBuilder that delegates method calls to the base class. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Builds a proxy type using composition. - - - - In order for this builder to work, the target must implement - one or more interfaces. - - - Aleksandar Seovic - Bruno Baia - - - - Target instance calls should be delegated to. - - - - - Creates a new instance of the - class. - - - - - Creates a proxy that delegates calls to an instance of the - target object. - - -

- Only interfaces can be proxied using composition, so the target - must implement one or more interfaces. -

-
- The generated proxy class. - - If the - does not implement any interfaces. - -
- - - Create an to create interface implementations - - - - - Allows subclasses to generate additional code - - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Deaclares a field that holds the target object instance. - - - The builder to use for code generation. - - - - - Generates the proxy constructor. - - -

- This implementation creates instance of the target object for delegation - using constructor arguments. -

-
- The constructor builder to use. - The IL generator to use. - The constructor to delegate the creation to. -
- - - Gets or sets a value indicating whether interfaces should be implemented explicitly. - - - if they should be; otherwise, . - - - - - Allows easy access to existing and creation of new dynamic proxies. - - Aleksandar Seovic - Bruno Baia - - - - The name of the assembly that defines proxy types created. - - - - - The attributes of the proxy type to generate. - - - - - Creates an appropriate type builder. - - The proxy type name. - The type to extends if provided. - The type builder to use. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Builds a proxy type using inheritance. - - - - In order for this builder to work, target methods have to be either - , or belong to an interface. - - - Aleksandar Seovic - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Creates a proxy that inherits the proxied object's class. - - -

- Only (non-final) methods can be proxied, - unless they are members of one of the interfaces that target class - implements. In that case, methods will be proxied using explicit - interface implementation, which means that client code will have - to cast the proxy to a specific interface in order to invoke the - methods. -

-
- 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 proxy constructor. - - -

- This implementation delegates the call to a base class constructor. -

-
- The constructor builder to use. - The IL generator to use. - - The base class constructor to delegate the call to. - -
- - - Gets or sets a value indicating whether inherited members should be proxied. - - - if they should be; otherwise, . - - - - - This attribute can be used to mark interfaces that should not be proxied - - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Implementation of IProxyMethodBuilder that delegates method calls to target object. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Base class for dynamic members. - - Aleksandar Seovic - - - - Method attributes constant. - - - - - Sets up target instance for invocation. - - IL generator to use. - Type of target instance. - - - - Sets up invocation argument. - - IL generator to use. - Argument type. - Argument position. - - - - Generates method invocation code. - - IL generator to use. - Flag specifying whether method is static. - Flag specifying whether method is on the value type. - Method to invoke. - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Defines constructors that dynamic constructor class has to implement. - - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Safe wrapper for the dynamic constructor. - - - will attempt to use dynamic - constructor if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe constructor wrapper. - - Constructor to wrap. - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Factory class for dynamic constructors. - - Aleksandar Seovic - - - - Creates dynamic constructor instance for the specified . - - Constructor info to create dynamic constructor for. - Dynamic constructor for the specified . - - - - Defines methods that dynamic field class has to implement. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Safe wrapper for the dynamic field. - - - will attempt to use dynamic - field if possible, but it will fall back to standard - reflection if necessary. - - - - - Returns a implementation - by determining the fastest possible dynamic access strategy - - the field to be wrapped - an instance for accessing the - field represented by the given - - - - Creates a new instance of the safe field wrapper. - - Field to wrap. - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Factory class for dynamic fields. - - Aleksandar Seovic - - - - Creates dynamic field instance for the specified . - - Field info to create dynamic field for. - Dynamic field for the specified . - - - - Defines methods that dynamic indexer class has to implement. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Safe wrapper for the dynamic indexer. - - - will attempt to use dynamic - indexer if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe indexer wrapper. - - Indexer to wrap. - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Internal PropertyInfo accessor. - - - - - Factory class for dynamic indexers. - - Aleksandar Seovic - - - - Creates dynamic indexer instance for the specified . - - Indexer info to create dynamic indexer for. - Dynamic indexer for the specified . - - - - Defines methods that dynamic method class has to implement. - - - - - Invokes dynamic method on the specified target object. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Safe wrapper for the dynamic method. - - - will attempt to use dynamic - method if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe method wrapper. - - Method to wrap. - - - - Invokes dynamic method. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Gets the class, that declares this method - - - - - Factory class for dynamic methods. - - Aleksandar Seovic - - - - Creates dynamic method instance for the specified . - - Method info to create dynamic method for. - Dynamic method for the specified . - - - - Defines methods that dynamic property class has to implement. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Safe wrapper for the dynamic property. - - - will attempt to use dynamic - property if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe property wrapper. - - Property to wrap. - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Internal PropertyInfo accessor. - - - - - Factory class for dynamic properties. - - Aleksandar Seovic - - - - Creates safe dynamic property instance for the specified . - - -

This factory method will create a dynamic property with a "safe" wrapper.

-

Safe wrapper will attempt to use generated dynamic property if possible, - but it will fall back to standard reflection if necessary.

-
- Property info to create dynamic property for. - Safe dynamic property for the specified . - -
- - - Creates dynamic property instance for the specified . - - Property info to create dynamic property for. - Dynamic property for the specified . - - - - Represents a Get method - - the target instance when calling an instance method - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - Represents an Indexer Get method - - the target instance when calling an instance method - - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - - Represents a method - - the target instance when calling an instance method - arguments to be passed to the method - the value return by the method. null when calling a void method - - - - Represents a constructor - - arguments to be passed to the method - the new object instance - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Allows easy access to existing and creation of new dynamic relection members. - - Aleksandar Seovic - - - - The name of the assembly that defines reflection types created. - - - - - The attributes of the reflection type to generate. - - - - - Cache for dynamic property types. - - - - - Cache for dynamic field types. - - - - - Cache for dynamic indexer types. - - - - - Cache for dynamic method types. - - - - - Cache for dynamic constructor types. - - - - - Creates an appropriate type builder. - - - The base name to use for the reflection type name. - - The type builder to use. - - - - Returns dynamic property if one exists. - - Property to look up. - callback function that will be called to create the dynamic property - An for the given property info. - - - - Returns dynamic field if one exists. - - Field to look up. - callback function that will be called to create the dynamic field - An for the given field info. - - - - Returns dynamic indexer if one exists. - - Indexer to look up. - callback function that will be called to create the dynamic indexer - An for the given indexer. - - - - Returns dynamic method if one exists. - - Method to look up. - callback function that will be called to create the dynamic method - An for the given method. - - - - Returns dynamic constructor if one exists. - - Constructor to look up. - callback function that will be called to create the dynamic constructor - An for the given constructor. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG mode, per ConditionalAttribute rules. - - - - - Delegates a Method(object target, params object[] args) call to the actual underlying method. - - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Converts to an instance of if necessary to - e.g. avoid e.g. double/int cast exceptions. - - - - This method mimics the behavior of the compiler that - automatically performs casts like int to double in "Math.Sqrt(4)".
- See about implicit, widening type conversions on MSDN - Type Conversion Tables -
- - Note: is expected to be a value type! - -
-
- - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Indicates that an annotated class is a "component". - Such classes are considered as candidates for future features such - as auto-detection when using attribute-based configuration and assembly scanning. - - Other class-level annotations may be considered as identifying - a component as well, typically a special kind of component: - e.g. the Repository attribute. - - Mark Fisher - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the component. - - - - Gets or sets the name of the component - - The name of the component. - - - - Indicates that an annotated class is a "Repository" (or "DAO"). - - - A class with this attribute is eligible for Spring DataAccessException translation. A class - with the Repository attribute is also clarified as to its role in the overall application - architecture for the purpose of tools, aspects, etc. - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Rod Johnson - Jueren Hoeller - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the repository. - - - - Indicates that an annotated class is a "Service" (e.g. a business service facade). - - - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - - - - Implements by using . - - Erich Eichinger - - - - Specifies the contract a strategy must be implement to store and - retrieve data that is specific to the executing thread. - - - All implementations of this interface must treat keys case-sensitive. - - Erich Eichinger - - - - Retrieves an object with the specified . - - The name of the item. - - The object in the current thread's context associated with the - specified or null if no object has been stored previously - - - - - Stores a given object and associates it with the specified . - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - - If the object with the specified is not found, the method does nothing. - - The name of the object to remove. - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - - Acquire/Release protocol, base of many concurrency utilities. - - - -

objects isolate waiting and notification for particular logical - states, resource availability, events, and the like that are shared - across multiple threads.

- -

Use of s sometimes (but by no means always) adds - flexibility and efficiency compared to the use of plain - .Net monitor methods and locking, and are sometimes (but by no means - always) simpler to program with.

- -

Used for implementation of a

-
- - Doug Lea - Federico Spinazzi (.Net) -
- - Wait (possibly forever) until successful passage. - Fail only upon interuption. Interruptions always result in - `clean' failures. On failure, you can be sure that it has not - been acquired, and that no - corresponding release should be performed. Conversely, - a normal return guarantees that the acquire was successful. - - - - - Potentially enable others to pass. -

- Because release does not raise exceptions, - it can be used in `finally' clauses without requiring extra - embedded try/catch blocks. But keep in mind that - as with any java method, implementations may - still throw unchecked exceptions such as Error or NullPointerException - when faced with uncontinuable errors. However, these should normally - only be caught by higher-level error handlers. -

-
-
- - - Wait at most msecs to pass; report whether passed. -

- The method has best-effort semantics: - The msecs bound cannot - be guaranteed to be a precise upper bound on wait time in Java. - Implementations generally can only attempt to return as soon as possible - after the specified bound. Also, timers in Java do not stop during garbage - collection, so timeouts can occur just because a GC intervened. - So, msecs arguments should be used in - a coarse-grained manner. Further, - implementations cannot always guarantee that this method - will return at all without blocking indefinitely when used in - unintended ways. For example, deadlocks may be encountered - when called in an unintended context. -

-
- the number of milleseconds to wait - An argument less than or equal to zero means not to wait at all. - However, this may still require - access to a synchronization lock, which can impose unbounded - delay if there is a lot of contention among threads. - - true if acquired -
- - A latch is a boolean condition that is set at most once, ever. - Once a single release is issued, all acquires will pass. -

- Sample usage. Here are a set of classes that use - a latch as a start signal for a group of worker threads that - are created and started beforehand, and then later enabled. -

- - class Worker implements IRunnable { - private readonly Latch startSignal; - Worker(Latch l) - { - startSignal = l; - } - public void Run() { - startSignal.acquire(); - DoWork(); - } - - void DoWork() { ... } - } - - class Driver { // ... - void Main() { - Latch go = new Latch(); - for (int i = 0; i < N; ++i) // make threads - new Thread(new ThreadStart(new Worker(go)).Start(); - DoSomethingElse(); // don't let run yet - go.Release(); // let all threads proceed - } - } - -
- Doug Lea - Federico Spinazzi (.Net) -
- - - can acquire ? - - - - - Method mainly used by clients who are trying to get the latch - - - - Wait at most msecs millisconds for a permit - - - - Enable all current and future acquires to pass - - - - - An abstraction to safely store "ThreadStatic" data. - - - By default, is used to store thread-specific data. - You may switch the storage strategy by calling .

- NOTE: Access to the underlying storage is not synchronized for performance reasons. - You should call only once at application startup! - - Erich Eichinger - - -

- Holds the current strategy. - - - Access to this variable is not synchronized on purpose for performance reasons. - Setting a different strategy should happen only once - at application startup. - -
- - - Set the new strategy. - - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - -

Base class for counting semaphores based on Semaphore implementation - from Doug Lea.

-
- - -

Conceptually, a semaphore - maintains a set of permits. Each acquire() blocks if - necessary until a permit is available, and then takes it.

- -

Each release adds a permit. However, no actual permit objects are used; - the Semaphore just keeps a count of the number available - and acts accordingly.

- -

A semaphore initialized to 1 can serve as a mutual exclusion lock.

- - Used for implementation of a -
- Doug Lea - Federico Spinazzi (.Net) -
- - - current number of available permits - - - - -

Create a Semaphore with the given initial number of permits.

-

Using a seed of 1 makes the semaphore act as a mutual - exclusion lock.

- -

Negative seeds are also allowed, - in which case no acquires will proceed until the number of - releases has pushed the number of permits past 0.

-
-
- - - Release a permit - - - - - Acquire a permit - - - - - Wait at most msecs millisconds for a permit - - number of ms to wait - true if aquired - - - Release N permits. release(n) is - equivalent in effect to: -
-            for (int i = 0; i < n; ++i) release();
-            
- But may be more efficient in some semaphore implementations. -
- if n is negative. - - -
- - Return the current number of available permits. - Returns an accurate, but possibly unstable value, - that may change immediately after returning. - - - - - Utility class to use an with the - C# using () {} idiom - - - - - Creates a new trying to the given - - - the to be held - - - - Creates a new trying to the given - - - the to be held - millisecond to try to acquire the lock - - - - Releases the held - - - - - initializes and acquire access to the - - - - - - Implements by using a hashtable. - - Erich Eichinger - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - Thrown by synchronization classes that report - timeouts via exceptions. The exception is treated - as a form (subclass) of InterruptedException. This both - simplifies handling, and conceptually reflects the fact that - timed-out operations are artificially interrupted by timers. - - - - - The approximate time that the operation lasted before - this timeout exception was thrown. - - - - - - 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. - - - 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. - - - - - Override of GetObjectData to allow for private serialization - - serialization info - streaming context - - - Constructs a TimeoutException with given duration value. - - - - - Constructs a TimeoutException with the - specified duration value and detail message. - - - - - Gets the approximate time that the operation lasted before - this timeout exception was thrown. - - - - A TimeoutSync is an adaptor class that transforms all - calls to acquire to instead invoke attempt with a predetermined - timeout value. - - - - - - the adapted sync - - - - - timeout value - - - - Create a TimeoutSync using the given Sync object, and - using the given timeout value for all calls to acquire. - - - - - Try to acquire the sync before the timeout - - In case a time out occurred - - - - - - - - - - - - - - Support to account for differences between java nad .NET: -
    -
-
-
- - - .NET threads have not a method to check if they have been interrupted. - Moreover, differently from java threads, when entering locked - blocks, Monitor, Sleep, SpinWait and so on, a - will be raised by the runtime. -

Spring.Threading classes usually call this method before entering a lock block, to mirror java code -

Usually this is non issue because the same exception will be raised entering the monitor - associated with the lock () -

-
- if the thread has been interrupted -
- - - Normalize the given so that - is is comparable with . - - Date. - - - - - - - - - the difference between millisecodns of the first and second date - - - - Returns the number of nanoseconds for the current value of - - Current number of nanoseconds - - - - Returns the number of nano seconds represented by the - - to use - Number of nano seconds for - - - - Returns a representing the number of nanoseconds passed in via . - - Number of nanoseconds. - representing the number of nanoseconds passed in. - - - - Placeholder for java.lang.System.currentTimeMillis - - The current machine time in milliseconds - - - - Has been interrupted this thread - - - - - Various utility methods relating to the manipulation of arrays. - - Aleksandar Seovic - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Use this sort method instead of to overcome - bugs in Mono. - - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Tests equality of two single-dimensional arrays by checking each element - for equality. - - The first array to be checked. - The second array to be checked. - True if arrays are the same, false otherwise. - - - - Returns hash code for an array that is generated based on the elements. - - - Hash code returned by this method is guaranteed to be the same for - arrays with equal elements. - - - Array to calculate hash code for. - - - A hash code for the specified array. - - - - - Returns string representation of an array. - - - Array to return as a string. - - - String representation of the specified . - - - - - Concatenates 2 arrays of compatible element types - - - If either of the arguments is null, the other array is returned as the result. - The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. - - - - - Assertion utility methods that simplify things such as argument checks. - - -

- Not intended to be used directly by applications. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Checks, whether may be invoked on . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the method to test for - - if is null - - - if it is not possible to invoke on - - - - - checks, whether supports the methods of . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the type to test for - - if is null - - - if it is not possible to invoke methods of - type on - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - If the supplied is . - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is . - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - An arbitrary message that will be passed to any thrown . - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is , contains no elements or only null elements. - - The array or collection to check. - The argument name. - - If the supplied is , - contains no elements or only null elements. - - - - - Checks whether the specified can be cast - into the . - - - The argument to check. - - - The name of the argument to check. - - - The required type for the argument. - - - An arbitrary message that will be passed to any thrown - . - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - The exception message to use if the assertion fails. - - if expression is false - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - - if expression is false - - - - - Assert a bool expression, throwing InvalidOperationException - if the expression is false. - - a boolean expression. - The exception message to use if the assertion fails - if expression is false - - - - Creates a new instance of the class. - - -

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

-
-
- - - General utility methods for working with annotations - - - - - Find a single Attribute of the type 'attributeType' from the supplied class, - traversing it interfaces and super classes if no attribute can be found on the - class iteslf. - - - This method explicitly handles class-level attributes which are not declared as - inherited as well as attributes on interfaces. - - The class to look for attributes on . - Type of the attribibute to look for. - the attribute of the given type found, or null - - - - Miscellaneous collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Adds the specified to the specified . - - The collection to add the element to. - The object to add to the collection. - - - - Adds the specified to the specified . - - The enumerable to add the element to. - The object to add to the collection. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Converts an instance to an instance. - - The instance to be converted. - An instance in which its elements are the elements of the instance. - if the is null. - - - - Copies the elements of the to a - new array of the specified element type. - - The instance to be converted. - The element of the destination array to create and copy elements to - An array of the specified element type containing copies of the elements of the . - - - - Returns the first element contained in both, and . - - The implementation assumes that <<< - the source enumerable. may be null - the list of candidates to match against elements. may be null - the first element found in both enumerables or null - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a value of the given type found, or null if none. - If more than one value of the given type is found - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a collection of matching values of the given type found, empty if none found, or null if the input collection was null. - - - - Find a value of one of the given types in the given Collection, - searching the Collection for a value of the first type, then - searching for a value of the second type, etc. - - The collection to search. - The types to look for, in prioritized order. - a value of the given types found, or null if none - If more than one value of the given type is found - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified dictionary is null empty. - - The dictionary to check. - - true if the specified dictionary is empty or null; otherwise, false. - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A callback method used for comparing to items. - - - - the first object to compare - the second object to compare - Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. - - - - - - Utility class containing helper methods for object comparison. - - Aleksandar Seovic - - - Compares two objects. - First object. - Second object. - - 0, if objects are equal; - less than zero, if the first object is smaller than the second one; - greater than zero, if the first object is greater than the second one. - - - - Utility class for .NET configuration files management. - - Aleksandar Seovic - - - - Avoid BeforeFieldInit pitfall - - - - - Parses the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. - Object created by a corresponding . -
- - - Refresh the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. -
- - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Configuration exception. - - - - Creates the configuration exception. - - Configuration exception. - - - - Determines whether the specified exception is configuration exception. - - The exception to check. - - true if the specified exception is configuration exception; otherwise, false. - - - - - Returns the line number of the specified node. - - Node to get the line number for. - The line number of the specified node. - - - - Returns the name of the file specified node is defined in. - - Node to get the file name for. - The name of the file specified node is defined in. - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Gets a string specifying the file/resource name related to the configuration details. - - - - - Gets an integer specifying the line number related to the configuration details. - - - - - Gets an integer specifying the line position related to the configuration details. - - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - An implementation, who's elements retain information - about their location in the original XML text document the were read from. - - - When loading a document, the used must implement . - Typical XmlReader implementations like support this interface. - - Erich Eichinger - - - - Overridden to create a retaining the current - text position information. - - - - - Overridden to create a retaining the current - text position information. - - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store null as their property. - - The XML source - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store as their property. - - - The new XmlNode or null if no more nodes exist. - - the name of the resource - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store null as their property. - - - The new XmlNode or null if no more nodes exist. - - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Get info about the current text position during loading a document. - Outside loading a document, the properties of - will always be null. - - - - - Holds the current text position during loading a document - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - Collects information on the constructor to use to create the instance and the argument instances to pass into the - constructor. - - - - - Initializes a new instance of the class. - - The constructor info. - The arg instances. - - - - Gets the constructor info. - - The constructor info. - - - - Gets the arg instances. - - The arg instances. - - - - Discovers the attributes of a - and provides access to the - s metadata. - - Rick Evans - - - - The method name associated with a delegate invocation. - - - - - Creates a new instance of the - class. - - - The event used to extract the delegate - from. - - - if the supplied is - . - - - - - Creates a new instance of the - class. - - - The delegate . - - - If the supplied is not a subclass of the - class, or is . - - - - - Checks to see if the method encapsulated by the supplied method - metadata is compatible with the method signature associated with - this delegate type. - - The method to be checked. - - if the method signature is compatible with - the signature of this delegate; if not, or - if the supplied parameter is - . - - - - - Gets the s of the parameters of the - method signature associated with this delegate type. - - -

- This method will never return ; the returned - array may be empty, but it most certainly - will not be . -

-
- - A array of the parameter - s; or the - array if the method signature has no parameters. - -
- - - Gets the return of the - method signature associated with this delegate type. - - The return . - - - - Gets the metadata about the method signature associated - with this delegate type. - - - The metadata about the method signature associated - with this delegate type. - - - - - Determines whether the supplied - is a type. - - - The to be checked. - - - if the supplied - is a ; - if not or the supplied - is . - - - - - Checks if the signature of the supplied - is compatible with the signature expected by the supplied - . - - The event to be checked against. - - The method signature to check for compatibility. - - - if the signature of the supplied - is compatible with the signature - expected by the supplied ; - if not or either of the supplied - parameters is . - - - - - - The of the delegate. - - - - - Use this class for obtaining instances for dynamic code generation. - - -

- The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. -

- - Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. - -
- -

The following excerpt from demonstrates usage:

- - public class DynamicProxyManager - { - public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; - - public static TypeBuilder CreateTypeBuilder(string name, Type baseType) - { - // Generates type name - string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); - ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); - return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); - } - } - -
- Erich Eichinger - - - -
- - - prevent instantiation - - - - - Returns the for the dynamic module within the specified assembly. - - - If the assembly does not exist yet, it will be created.
- This factory caches any dynamic assembly it creates - calling GetModule() twice with - the same name will *not* create 2 distinct modules! -
- The assembly-name of the module to be returned - the that can be used to define new types within the specified assembly -
- - - Persists the specified dynamic assembly to the file-system - - the name of the dynamic assembly to persist - - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Removes all registered s. - - - - - A utility class for raising events in a generic and consistent fashion. - - Rick Evans - - - - Create a new EventRaiser instance - - - - - Raises the event encapsulated by the supplied - , passing the supplied - to the event. - - The event to be raised. - The arguments to the event. - a map of sink/exception entries that occurred during event raising - - - - Invokes the supplied , passing the supplied - to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Raises events defensively. - - -

- Raising events defensively means that as the raised event is passed to each handler, - any thrown by a handler will be caught and silently - ignored. -

-
- Rick Evans -
- - - Defensively invokes the supplied , passing the - supplied to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - A strategy for handling errors. This is especially useful for handling - errors that occur during asynchronous execution as in such cases it may not be - possible to throw the error to the original caller. - - Mark Fisher - Mark Pollack (.NET) - - - - Handles the error. - - The exception. - - - - Utility methods for IO handling - - - - - Copies one stream into another. - (Don't forget to call on the destination stream!) - - - Does not close the input stream! - - - - - Reads a stream into a byte array. - - - Does not close the input stream! - - - - - Various utility methods relating to numbers. - - -

- Mainly for internal use within the framework. -

-
- Aleksandar Seovic -
- - - Determines whether the supplied is an integer. - - The object to check. - - if the supplied is an integer. - - - - - Determines whether the supplied is a decimal number. - - The object to check. - - if the supplied is a decimal number. - - - - - Determines whether the supplied is of numeric type. - - The object to check. - - true if the specified object is of numeric type; otherwise, false. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to a number. - - The object to check. - - true if the specified object is decimal number; otherwise, false. - - - - - Is the supplied equal to zero (0)? - - The number to check. - - id the supplied is equal to zero (0). - - - - - Negates the supplied . - - The number to negate. - The supplied negated. - - If the supplied is not a supported numeric type. - - - - - Returns the bitwise not (~) of the supplied . - - The number. - The value of ~. - - If the supplied is not a supported numeric type. - - - - - Bitwise ANDs (&) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise ORs (|) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise XORs (^) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Adds the specified numbers. - - The first number. - The second number. - - - - Subtracts the specified numbers. - - The first number. - The second number. - - - - Multiplies the specified numbers. - - The first number. - The second number. - - - - Divides the specified numbers. - - The first number. - The second number. - - - - Calculates remainder for the specified numbers. - - The first number (dividend). - The second number (divisor). - - - - Raises first number to the power of the second one. - - The first number. - The second number. - - - - Coerces the types so they can be compared. - - The right. - The left. - - - - Creates a new instance of the class. - - -

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

-
-
- - - Helper methods with regard to objects, types, properties, etc. - - -

- Not intended to be used directly by applications. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The instance for this class. - - - - - An empty object array. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Instantiates the type using the assembly specified to load the type. - - This is a convenience in the case of needing to instantiate a type but not - wanting to specify in the string the version, culture and public key token. - The assembly. - Name of the type. - - - If the or is - - - If cannot load the type from the assembly or the call to InstantiateType(Type) fails. - - - - - Convenience method to instantiate a using - its no-arg constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The to instantiate* - - A new instance of the . - - If the is - - - If the is an abstract class, an interface, - an open generic type or does not have a public no-argument constructor. - -
- - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. - - - - - Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains - open generic type parameters. - - The type. - - - - Convenience method to instantiate a using - the given constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The constructor to use for the instantiation. - - - The arguments to be passed to the constructor. - - A new instance. - - If the is - - - If the 's declaring type is an abstract class, - an interface, an open generic type or does not have a public no-argument constructor. - -
- - - Checks whether the supplied is not a transparent proxy and is - assignable to the supplied . - - -

- Neccessary when dealing with server-activated remote objects, because the - object is of the type TransparentProxy and regular is testing for assignable - types does not work. -

-

- Transparent proxy instances always return when tested - with the 'is' operator (C#). This method only checks if the object - is assignable to the type if it is not a transparent proxy. -

-
- The target to be checked. - The value that should be assigned to the type. - - if the supplied is not a - transparent proxy and is assignable to the supplied . - -
- - - Determine if the given is assignable from the - given value, assuming setting by reflection and taking care of transparent proxies. - - -

- Considers primitive wrapper classes as assignable to the - corresponding primitive types. -

-

- For example used in an object factory's constructor resolution. -

-
- The target . - The value that should be assigned to the type. - True if the type is assignable from the value. -
- - - Check if the given represents a - "simple" property, - i.e. a primitive, a , a - , or a corresponding array. - - -

- Used to determine properties to check for a "simple" dependency-check. -

-
- - The to check. - -
- - - Check if the given class represents a primitive array, - i.e. boolean, byte, char, short, int, long, float, or double. - - - - - Determines whether the specified array is null or empty. - - The array to check. - - true if the specified array is null empty; otherwise, false. - - - - - Determine if the given objects are equal, returning - if both are respectively - if only one is . - - The first object to compare. - The second object to compare. - - if the given objects are equal. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - If the supplied is . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - If the supplied is . - - - - - Gets the qualified name of the given method, consisting of - fully qualified interface/class name + "." method name. - - The method. - qualified name of the method. - - - - Return a String representation of an object's overall identity. - - The object (may be null). - The object's identity as String representation, - or an empty String if the object was null - - - - - Gets a hex String form of an object's identity hash code. - - The obj. - The object's identity code in hex notation - - - - Support matching of file system paths in a manner similar to that of the - NAnt FileSet. - - -

- Any (back)slashes are converted to forward slashes. -

-
- - - // true - PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); - PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); - PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); - // false - PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); - - - Federico Spinazzi -
- - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - should the match consider the case - - if the path is matched by the pattern; - otherwise . - - - - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - - if the path is matched by the pattern; - otherwise . - - - - - Replaces back(slashes) with forward slashes. - - - The path or the pattern to modify. - - A forward-slashed string. - - - - Helper method to convert a NAnt-like pattern into the - appropriate pattern for a regular expression. - - The NAnt-like pattern. - A regex-compatible pattern. - - - - Creates a new instance of the class. - - -

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

-
-
- - Utility methods for simple pattern matching, in particular for - Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. - - Juergen Hoeller - Mark Pollack - - - Match a String against the given pattern, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the pattern to match against - - the String to match - - whether the String matches the given pattern - - - - Match a String against the given patterns, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the patterns to match against - - the String to match - - whether the String matches any of the given patterns - - - - - An implementation of the Java Properties class. - - - For the complete syntax see java.util.Properties JavaDoc. - This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. - - - key1 = value - key2: - key3 - - will result in the name/value pairs: - - key1:="value" - key2:=string.Empty - key3:=<null> - - note, that to specify a null value, the key must not be followed by any character except newline. - - - Simon White - - - - Creates an empty property list with no default values. - - - - - Creates a property list with the specified initial properties. - - The initial properties. - - - - Reads a property list (key and element pairs) from the input stream. - - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - The text reader to load from. - - - - Reads a property list (key and element pairs) from the input stream. - - the dictionary to put it in - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - the dictionary to put it in - The text reader to load from. - - - - Strips whitespace from the front of the specified string. - - The string. - The string with all leading whitespace removed. - - - - Splits the specified string into a key / value pair. - - The line to split. - An array containing the key / value pair. - - - - Searches for the property with the specified key in this property list. - - The key. - The property, or null if the key was not found. - - - - Searches for the property with the specified key in this property list. - - The key. - - The default value to be returned if the key is not found. - - The property, or the default value. - - - - Writes this property list out to the specified stream. - - The stream to write to. - - - - Sets the specified property key / value pair. - - The key. - The value. - - - - Writes the properties in this instance out to the supplied stream. - - The stream to write to. - Arbitrary header information. - - - - Removes the key / value pair identified by the supplied key. - - - The key identifying the key / value pair to be removed. - - - - - Adds the specified key / object pair to this collection. - - The key. - The value. - - - - Adds the specified key / object pair to this collection. - - - - - Various reflection related methods that are missing from the standard library. - - Rod Johnson - Juergen Hoeller - Aleksandar Seovic (.NET) - Stan Dvoychenko (.NET) - Bruno Baia (.NET) - - - - Convenience value that will - match all private and public, static and instance members on a class - in a case inSenSItivE fashion. - - - - - Avoid BeforeFieldInit problem - - - - - Checks, if the specified type is a nullable - - - - - Returns signature for the specified , method name and argument - s. - - The the method is in. - The method name. - - The argument s. - - The method signature. - - - - Returns method for the specified , method - name and argument - s. - - - Searches with BindingFlags - When dealing with interface methods, you probable want to 'normalize' method references by calling - . - - - - The target to find the method on. - - The method to find. - - The argument s. May be - if the method has no arguments. - - The target method. - - - - - Resolves a given to the representing the actual implementation. - - - see article How To Get an Explicit Interface Implementation Method. - - a - the type to lookup - the representing the actual implementation method of the specified - - - - Returns an array of parameter s for the specified method - or constructor. - - The method (or constructor). - An array containing the parameter s. - - If is . - - - - - Returns an array of parameter s for the - specified parameter info array. - - The parameter info array. - An array containing parameter s. - - If is or any of the - elements is . - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the type of method (used for exception reporting only) - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of constructors, selects the constructor having an exact match on the given ' types. - - the list of constructors to choose from - the arguments to the method - the constructor matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - Packages arguments into argument list containing parameter array as a last argument. - - Argument vaklues to package. - Total number of oarameters. - Type of the param array element. - Packaged arguments. - - - - Convenience method to convert an interface - to a array that contains - all the interfaces inherited and the specified interface. - - The interface to convert. - An array of interface s. - - If the specified is not an interface. - - - If is . - - - - - Is the supplied the default indexer for the - supplied ? - - - The name of the property on the supplied to be checked. - - - The to be checked. - - - if the supplied is the - default indexer for the supplied . - - - If the supplied is . - - - - - Is the supplied declared on one of these interfaces? - - The method to check. - The array of interfaces we want to check. - - if the method is declared on one of these interfaces. - - - If any of the s specified is not an interface. - - - If or any of the specified interfaces is - . - - - - - Returns the default value for the specified - - -

- Follows the standard .NET conventions for default values where - relevant; for example, all numeric types default to the value - 0. -

-
- - The to return default value for. - - - The default value for the specified . - - - If the supplied is an enumerated type that - has no values. - -
- - - Returns an array consisting of the default values for the supplied - . - - - The array of s to return default values for. - - - An array consisting of the default values for the supplied - . - - - If any of the elements in the supplied - array is an enumerated type that has no values. - - - - - - Checks that the parameter s of the - supplied match the parameter - s of the supplied - . - - The method to be checked. - - The array of parameter s to check against. - - - if the parameter s - match. - - - - - Returns an array containing the s of the - objects in the supplied array. - - - The objects array for which the corresponding s - are needed. - - - An array containing the s of the objects - in the supplied array; this array will be empty (but not - if the supplied - is null or has no elements. - - -

- [C#]
- Given an array containing the following objects, - [83, "Foo", new object ()], the - array returned from this method call would consist of the following - elements... - [Int32, String, Object]. -

-
-
- - - Given the return its representation as - it would appear in the source code files. - - - Largely intended to handle generic types where .ToString() will typically return: - "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" - and this method will instead return: - "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" - - The type. - Friendly string representing the Type - - - - Does the given and/or it's superclasses - have at least one or more methods with the given name (with any - argument types)? - - -

- Includes non-public methods in the methods searched. -

-
- - The to be checked. - - - The name of the method to be searched for. Case inSenSItivE. - - - if the given or / and it's - superclasses have at least one or more methods (with any argument types); - if not, or either of the parameters is . - -
- - - Within , counts the number of overloads for the method with the given (case-insensitive!) - - The type to be searched - the name of the method for which overloads shall be counted - The number of overloads for method within type - - - - Creates a . - - -

- Note that if a non- - is supplied, any read write properties exposed by the - will be used to overwrite values that may have been passed in via the - . That is, the will be used - to initialize the custom attribute, and then any read-write properties on the - will be plugged in. -

-
- - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - If the parameter is . - - - If the parameter is not a - that derives from the class. - - -
- - - Creates a . - - - The desired . - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - - - Creates a . - - - The source attribute to copy properties from. - - A custom attribute builder. - - If the supplied is - . - - - - - Creates a . - - - The desired . - - A custom attribute builder. - - - - Creates a . - - - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - A custom attribute builder. - - - - Calculates and returns the list of attributes that apply to the - specified type or method. - - The type or method to find attributes for. - - A list of custom attributes (CustomAttributeData or Attribute instances) - that should be applied to type or method. - - - - - Tries to find matching methods in the specified - for each method in the supplied list. - - - The to look for matching methods in. - - The methods to match. - - A flag that specifies whether to throw an exception if a matching - method is not found. - - A list of the matched methods. - - If either of the or - parameters are . - - - - - Returns the of the supplied - . - - -

- If the is a - instance, the return value of this method call with be the - parameter cast to a - . If the is - anything other than a , the return value - will be the result of invoking the 's - method. -

-
- - A or instance. - - - The argument if it is a - or the result of invoking - on the argument if it - is an . - - - If the is . - -
- - - Unwraps the supplied - and returns the inner exception preserving the stack trace. - - - The to unwrap. - - The unwrapped exception. - - - - Is the supplied can be accessed outside the assembly ? - - The type to check. - - if the type can be accessed outside the assembly; - Otherwise . - - - - - Is the supplied can be accessed - from the supplied friendly assembly ? - - The type to check. - The friendly assembly name. - - if the type can be accessed - from the supplied friendly assembly; Otherwise . - - - - - Gets all of the interfaces implemented by - the specified . - - - The object to get the interfaces of. - - - All of the interfaces implemented by the - . - - - - - Returns the explicit that is the root cause of an exception. - - - If the InnerException property of the current exception is a null reference - or a , returns the current exception. - - The last exception thrown. - - The first explicit exception thrown in a chain of exceptions. - - - - - Copies all fields from one object to another. - - - The types of both objects must be related. This means, that either of the following is true: - - fromObject.GetType() == toObject.GetType() - fromObject.GetType() is derived from toObject.GetType() - toObject.GetType() is derived from fromObject.GetType() - - - The source object - The object, who's fields will be populated with values from the source object - If the object's types are not related - - - - Convenience method that uses reflection to return the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to retrieve the field value. - Name of the field on the object from which to retrieve the value. - - - - - Convenience method that uses reflection to set the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to set the field value. - Name of the field on the object to which to set the value. - The field value to set. - - - - Creates a . - - Bruno Baia - - - - Creates a new instance of the - class. - - The custom attribute type. - - - - Creates a new instance of the - class. - - The custom attribute type. - The custom attribute constructor arguments. - - - - Adds the specified values to the constructor argument list - used to create the custom attribute. - - An array of argument values. - - - - Adds a property value to the custom attribute. - - The property name. - The property value. - - - - Creates the . - - The created . - - - - Utility class to be used from within this assembly for executing security critical code - NEVER EVER MAKE THIS PUBLIC! - - Erich Eichinger - - - - Miscellaneous utility methods. - - -

- Mainly for internal use within the framework. -

-
- Rod Johnson - Juergen Hoeller - Keith Donald - Aleksandar Seovic (.NET) - Mark Pollack (.NET) - Rick Evans (.NET) - Erich Eichinger (.NET) -
- - - The string that signals the start of an Ant-style expression. - - - - - The string that signals the end of an Ant-style expression. - - - - - An empty array of instances. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - An array of the tokens. -
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - - - Pairs of quote characters. within a pair of quotes are ignored - - An array of the tokens. -
- - - Convert a CSV list into an array of s. - - - Values may also be quoted using doublequotes. - - A CSV list. - - An array of s, or the empty array - if is . - - - - - Take a which is a delimited list - and convert it to a array. - - -

- If the supplied is a - or zero-length string, then a single element - array composed of the supplied - will be - eturned. If the supplied - is , then an empty, - zero-length array will be returned. -

-
- - The to be parsed. - - - The delimeter (this will not be returned). Note that only the first - character of the supplied is used. - - - An array of the tokens in the list. - -
- - - Convenience method to return an - as a delimited - (e.g. CSV) . - - - The to parse. - - - The delimiter to use (probably a ','). - - The delimited string representation. - - - - Convenience method to return an - as a CSV - . - - - The to display. - - The delimited string representation. - - - - Convenience method to return an array as a CSV - . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - - - Convenience method to return a - array as a delimited (e.g. CSV) . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - The delimiter to use (probably a ','). - - - - Checks if a string has length. - - The string to check, may be . - - - if the string has length and is not - . - - - - StringUtils.HasLength(null) = false - StringUtils.HasLength("") = false - StringUtils.HasLength(" ") = true - StringUtils.HasLength("Hello") = true - - - - - - Checks if a has text. - - -

- More specifically, returns if the string is - not , it's is > - zero (0), and it has at least one non-whitespace character. -

-
- - The string to check, may be . - - - if the is not - , - > zero (0), and does not consist - solely of whitespace. - - - - StringUtils.HasText(null) = false - StringUtils.HasText("") = false - StringUtils.HasText(" ") = false - StringUtils.HasText("12345") = true - StringUtils.HasText(" 12345 ") = true - - -
- - - Checks if a is - or an empty string. - - -

- More specifically, returns if the string is - , it's is equal - to zero (0), or it is composed entirely of whitespace - characters. -

-
- - The string to check, may (obviously) be . - - - if the is - , has a length equal to zero (0), or - is composed entirely of whitespace characters. - - - - StringUtils.IsNullOrEmpty(null) = true - StringUtils.IsNullOrEmpty("") = true - StringUtils.IsNullOrEmpty(" ") = true - StringUtils.IsNullOrEmpty("12345") = false - StringUtils.IsNullOrEmpty(" 12345 ") = false - - -
- - - Returns , if it contains non-whitespaces. null otherwise. - - - - - Strips first and last character off the string. - - The string to strip. - The stripped string. - - - - Returns a list of Ant-style expressions from the specified text. - - The text to inspect. - - A list of expressions that exist in the specified text. - - - If any of the expressions in the supplied - is empty (${}). - - - - - Replaces Ant-style expression placeholder with expression value. - - -

- -

-
- The string to set the value in. - The name of the expression to set. - The expression value. - - A new string with the expression value set; the - value if the supplied - is , has a length - equal to zero (0), or is composed entirely of whitespace - characters. - -
- - - Surrounds (prepends and appends) the string value of the supplied - to the supplied . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The prefix and suffix that respectively will be prepended and - appended to the target . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - The surrounded string. -
- - - Surrounds (prepends and appends) the string values of the supplied - and to the supplied - . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The value that will be prepended to the . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - - The value that will be appended to the . If this value - is not a value, it's attendant - value will be used. - - The surrounded string. -
- - - Converts escaped characters (for example "\t") within a string - to their real character. - - The string to convert. - The converted string. - - - - Utility class containing miscellaneous system-level functionality. - - Aleksandar Seovic - - - - Registers assembly resolver that iterates over the - assemblies loaded into the current - in order to find an assembly that cannot be resolved. - - - This method has to be called if you need to serialize dynamically - generated types in transient assemblies, such as Spring AOP proxies, - because standard .NET serialization engine always tries to load - assembly from the disk. - - - - - Returns true if running on Mono - - Tests for the presence of the type Mono.Runtime - - - - Returns true if running on CLR 4.0 under InProc SxS mode - - - - - Gets the thread id for the current thread. Use thread name is available, - otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and - CurrentThread.ManagedThreadId otherwise. - - The thread id. - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Creates a new TextPositionInfo instance. - - - - - Creates a new TextPositionInfo instance, copying values from another instance. - - - - - The filename related to this text position - - - - - The line number related to this text position - - - - - The line position related to this text position - - - - - UniqueKey allows for generating keys unique to a type or particular instance and a partial name, - that can e.g. be used as keys in . - - - // shows usage type-scoped keys - UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); - UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); - - HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; - Assert.AreEqual( "some value unique for class A having key 'myKey'", value); - - HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; - Assert.AreEqual( "some value unique for class B having key 'myKey'", value); - - - - - Initialize a new instance of from its string representation. - See and See for details. - - The string representation of the new instance. - - - - Compares this instance to another. - - - - - Compares this instance to another. - - - - - Returns the hash code for this key. - - - - - - Returns a string representation of this key. - - - - - Creates a new key instance unique to the given instance. - - The instance the key shall be unique to - The partial key to be made unique - - - If is of type - - - - Creates a new key instance unique to the given type. - - The type the key shall be unique to - The partial key to be made unique - - - - Returns a key unique for the given instance. - - The instance the key shall be unique to - The partial key to be made unique - A key formatted as typename[instance-id].partialkey - - - - Returns a key unique for the given type. - - The type the key shall be unique to - The partial key to be made unique - A key formatted as typename.partialkey - - - - XML utility methods. - - Aleksandar Seovic - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - to be used for resolving external references - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an implementation - for the supplied . - - The XML that is going to be read. - - A non-validating implementation. - - - - - Implementation of that adds error message - to the validation errors container. - - Aleksandar Seovic - - - - Abstract base class that should be extended by all - validation actions. - - -

- This class implements template Execute method - and defines OnValid and OnInvalid methods that - can be overriden - by specific validation actions. -

-
- Aleksandar Seovic -
- - - An action that should be executed after validator is evaluated. - - -

- This interface allows us to define the actions that should be executed - after validation in a generic fashion. -

-

- For example, addition of error messages to validation errors collection - is performed by one specific implementation of this interface, . -

-
- Aleksandar Seovic -
- - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Initializes a new instance of the class. - - - - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is not valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Evaluates 'when' expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - Error message resource identifier. - Names of the error providers this message should be added to. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Resolves the error message. - - Validation context to resolve message parameters against. - Additional context parameters. - Resolved error message - - - - Resolves the message parameters. - - List of parameters to resolve. - Validation context to resolve parameters against. - Additional context parameters. - Resolved message parameters. - - - - Sets the expressions that should be resolved to error message parameters. - - The expressions that should be resolved to error message parameters. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression that defines the exception to throw when the validator is not valid. - - - - Initializes a new instance of the class with an expression - that defines the exception to throw. - - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the exception to throw - - The throws. - - - - Implementation of that allows you - to define Spring.NET expressions that should be evaluated after - validation. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression to execute when validator is valid. - - The expression to execute when validator is valid. - - - - Gets or sets the expression to execute when validator is not valid. - - The expression to execute when validator is not valid. - - - - Implementation of the custom configuration parser for validator definitions. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parses the validator definition. - - Validator's identifier. - The element to parse. - The parser helper. - Validator object definition. - - - - Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with - the parsed value. - - - - - Parses and potentially registers a validator. - - - Only validators that have id attribute specified are registered - as separate object definitions within application context. - - Validator XML element. - The parser helper. - Validator object definition. - - - - Gets the name of the object type for the specified element. - - The element. - The name of the object type. - - - - Creates an error message action based on the specified message element. - - The message element. - The parser helper. - The error message action definition. - - - - Creates a generic action based on the specified element. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Creates object definition for the validator reference. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Evaluates validator test using condition evaluator. - - Aleksandar Seovic - - - - Base class that defines common properties for all single validators. - - -

- Custom single validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class that defines common properties for all validators. - - -

- Custom validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - An object that can validate application-specific objects. - - -

- The primary motivation for this interface is to enable validation to be - decoupled from the (user) interface and placed in business objects. -

-

- Application developers writing their own custom - implementations will - typically not implement this interface directly. In most cases, custom - validators woud be better served deriving from the - class, with the - custom validation ligic being implemented in an override of the - - - template method. -

-
- Aleksandar Seovic - -
- - - Validates the specified object. - - The object to validate. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Evaluates when expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Processes the error messages. - - Whether validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Gets or sets the validation actions. - - The actions that should be executed after validation. - - - - Creates a new instance of the validator without any - and criteria - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates test object. - - Object to validate. - True if specified object is valid, False otherwise. - - - - Evaluates test expression. - - Root context to use for expression evaluation. - Additional context parameters. - Result of the test expression evaluation, or validation context if test is null. - - - - Gets or sets the test expression. - - The test expression. - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Evaluates the test using condition evaluator. - - -

- Test can be any logical expression that is supported by the Spring.NET logical - expression evaluation engine, and can use any variables that can be resolved - by the variable resolver used by the validation engine. -

-
- The object to validate. - - if the supplied is valid. - -
- - - Perform credit card validations. - - - By default, all supported card types are allowed. You can specify - which credit card type validator should be used by setting - the value of property to a concrete - instance. - - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid credit card number. - - The object to validate. - - if the supplied is valid - credit card number. - - - - - Checks if the is a valid credit card number. - - - The card number to validate. - - - true if the card number is valid. - - - - - Validates card number with the specified validator. - - - Credit card number to validate. - - - true if credit card number is a valid number of credit card type specified. - - - - - Checks for a valid credit card number. - - - Credit Card Number. - - - true if the card number passes the LuhnCheck. - - - - - Credit card type validator to use. - - - Can be concrete implementations of - interface. The following are available implementations: - , , , - . - - - - - CreditCardType interface defines how validation is performed - for one type/brand of credit card. - - - - - Returns true if the card number matches this type of - credit card. - - - The card number, never null. - - - true if the number matches. - - - - - Visa credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a visa number. - - - - - American Express credit card type validation support. - - - - - Indicates, wheter the given credit card number matches an amex number. - - - - - Discover credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a discover number. - - - - - Mastercard credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a mastercard number. - - - - - Perform email validations. - - -

- This implementation is not guaranteed to catch all possible errors in an - email address. For example, an address like nobody@noplace.nowhere will - pass validator, even though there is no TLD "nowhere". - - Goran Milosavljevic - - -

- Creates a new instance of the EmailValidator class. - -
- - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid e-mail address. - - The object to validate. - - if the supplied is valid - e-mail address. - - - - - Regular expression used for validation of object passed to this . - - - - - Validates that the object is valid ISBN-10 or ISBN-13 value. - - Goran Milosavljevic - - - - Creates a new instance of the ISBNValidator class. - - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the ISBN-10 or - ISBN-13 validation rules. - - The object to validate. - - if the supplied is valid ISBN. - - - - - Validates against ISBN-10 or ISBN-13 validation - rules. - - - ISBN string to validate. - - - true if is a valid ISBN-10 or ISBN-13 code. - - - - - ISBN-10 consists of 4 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 1-5 characters, second 1-7, third 1-6, - and fourth is 1 digit or an X. - - - - - ISBN-13 consists of 5 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 978 or 979, the second group is - 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. - - - - - Validates that object matches specified regular expression. - - -

- The test expression must evaluate to a ; - otherwise, an exception is thrown. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Validates an object. - - Object to validate. - - if the supplied - object is valid. - - - If the supplied is not a - - - - - - The regular expression text to match against. - - The regular expression text. - - - - Gets or sets a value indicating whether to do a partial match instead of a full match. - Default is false. - - - - - The for the regular expression evaluation. - - The regular expression evaluation options. - - - - - Validates that required value is not empty. - - -

- This validator uses following rules to determine if target value is valid: - - - - - - - - - - - - - - - - - - - - - - - - - -
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
-

-

- You cannot use this validator to validate any value types other than the ones - specified in the table above. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a variable expression that will be evaluated and the object - obtained as a result of this evaluation will be tested using the rules described - in the class overview of the - class. - - The object to validate. - - if the supplied is valid. - - - - - Validates that the value is valid URL. - - Goran Milosavljevic - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the URL validation rules. - - The object to validate. - - if the supplied is valid. - - - - - Regular expression used for validation of object passed to this . - - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one or more of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

Note, that defaults to true for this validator type!

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class for composite validators - - - - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the child validators. - - The validators. - - - - When set true, shortcircuits evaluation. - - - Setting this property true causes the evaluation process to prematurely abort - if the end result is known. Any remaining child validators will not be considered then. - Setting this value false causes implementations to evaluate all child validators, regardless - of the potentially already known result. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - implementation that supports validating collections. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid for all of the objects in the specified collection. -

-

- You can specify if you want to validate all of the collection elements regardless of the errors by - setting the property to false. -

-

Note, that defaults to true for this validator type!

-

- If you set the IncludeElementErrors property to true, - ValidationErrors collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. -

-
- Damjan Tomic - Aleksandar Seovic -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The bool that determines if all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Validates the specified collection of objects. - If the IncludeElementErrors property was set to true, - collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. - - The collection to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the value that indicates whether to validate all elements of the collection - regardless of the errors. - - This is just an alias for property - - - - Gets or sets the value that indicates whether to capture all the errors of the specific - elements of the collection - - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one and only one of the validators in the Validators collection are valid -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

- By default, this validator group uses == true semantics. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - An interface that validation errors containers have to implement. - - Aleksandar Seovic - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied error . - - -

- If there are no errors for the supplied , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all error providers. - - - - - Allows developers to specify which validator should be used - to validate method argument. - - Damjan Tomic - Aleksandar Seovic - - - - Creates an attribute instance. - - - The name of the validator to use (must be defined within - Spring application context). - - - - - Gets the name of the validator to use. - - The name of the validator to use. - - - - A container for validation errors. - - -

- This class groups validation errors by validator names and allows - access to both the complete errors collection and to the errors for a - certain validator. -

-
- Aleksandar Seovic - Goran Milosavljevic -
- - - Default constructor. - - - - - This property is reserved, apply the - - to the class instead. - - - An that describes the - XML representation of the object that is produced by - the - method and consumed by the - - method. - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all providers. - - - - - Thrown by the validation advice if the method parameters validation fails. - - Aleksandar Seovic - - - - Creates a new instance of the ValidationException class. - - - - - Creates a new instance of the ValidationException class with - specified validation errors. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the ValidationException class with the - specified message and validation errors. - - - A message about the exception. - - - Validation errors. - - - - - Creates a new instance of the ValidationException 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 ValidationException class with the - specified message, root cause and validation errors. - - - A message about the exception. - - - The root exception that is being wrapped. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Implements object serialization. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Gets validation errors. - - Validation errors. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Represents a reference to an externally defined validator object - - -

- This class allows validation groups to reference validators that - are defined outside of the group itself. -

-

- It also allows users to narrow the context for the referenced validator - by specifying value for the Context property. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the name of the referenced validator. - - The name of the referenced validator. - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - 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. - -
- - - - - - diff --git a/packages/Spring.Core.1.3.2/lib/net20/Spring.Core.dll b/packages/Spring.Core.1.3.2/lib/net20/Spring.Core.dll deleted file mode 100644 index 37db1da..0000000 Binary files a/packages/Spring.Core.1.3.2/lib/net20/Spring.Core.dll and /dev/null differ diff --git a/packages/Spring.Core.1.3.2/lib/net30/Spring.Core.dll b/packages/Spring.Core.1.3.2/lib/net30/Spring.Core.dll deleted file mode 100644 index 37db1da..0000000 Binary files a/packages/Spring.Core.1.3.2/lib/net30/Spring.Core.dll and /dev/null differ diff --git a/packages/Spring.Core.1.3.2/lib/net35/Spring.Core.dll b/packages/Spring.Core.1.3.2/lib/net35/Spring.Core.dll deleted file mode 100644 index 37db1da..0000000 Binary files a/packages/Spring.Core.1.3.2/lib/net35/Spring.Core.dll and /dev/null differ diff --git a/packages/Spring.Core.1.3.2/lib/net35/Spring.Core.xml b/packages/Spring.Core.1.3.2/lib/net35/Spring.Core.xml deleted file mode 100644 index a7bd651..0000000 --- a/packages/Spring.Core.1.3.2/lib/net35/Spring.Core.xml +++ /dev/null @@ -1,49291 +0,0 @@ - - - - Spring.Core - - - - - An abstract implementation that can - be used as base class for concrete implementations. - - Aleksandar Seovic - Erich Eichinger - - - - Defines a contract that all cache implementations have to fulfill. - - Aleksandar Seovic - Erich Eichinger - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method have no expiration time - and default cache priority. - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method use the default - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - If equals , - or is true, this cache - instance's value will be applied. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Actually does the cache implementation specific insert operation into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Gets/Set the Default time-to-live (TTL) for items inserted into this cache. - Used by - - - - - Gets/Sets a value, whether the this cache instance's - shall be applied to all items, regardless of their individual TTL - when is called. - - - - - Gets the number of items in the cache. - - - May be overridden by subclasses for cache-specific efficient implementation. - - - - - Gets a collection of all cache item keys. - - - - - Abstract base class containing shared properties for all cache attributes. - - Aleksandar Seovic - - - - The instance used to parse values. - - - - - - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - The cache key cannot evaluate be null or an empty string. - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the cache key for the item. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - Gets an expression instance that should be evaluated in order - to determine the cache key for the item. - - - An expression instance that should be evaluated in order to determine - the cache key for the item. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether the item should be cached. - - - An expression string that should be evaluated in order to determine - whether the item should be cached. - - - - - Gets an expression instance that should be evaluated in order - to determine whether the item should be cached. - - - An expression instance that should be evaluated in order to determine - whether the item should be cached. - - - - - The amount of time an object should remain in the cache. - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache - formatted to be recognizable by . - - - - - The amount of time an object should remain in the cache (in seconds). - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache (in seconds). - - - - - This attribute should be used to mark methods whose argument(s) - need to be cached. - - -

- This attribute allows application developers to specify that an argument - of the method should be cached, but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheParameterAdvice to - all of the members that have this attribute defined. -

-

- You can specify this attribute multiple times on the same method in order to - cache several method parameters. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark methods whose result - needs to be cached. - - -

- This attribute allows application developers to mark that a result - of the method invocation should be cached, but it will not do any - caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used with methods that return an - in order to cache each item separately. - - -

- This attribute allows application developers to specify that each item - from the collection returned by the method should be cached, - but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark method that should - invalidate one or more cache items when invoked. - - -

- This attribute allows application developers to specify that some - cache items should be evicted from cache when the method is invoked, - but it will not do any eviction by itself. -

-

- In order to actually evict cache items, an application developer - must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression string that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether items should be evicted. - - - An expression string that should be evaluated in order to determine - whether items should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine whether items should be evicted. - - - An expression instance that should be evaluated in order to determine - whether items should be evicted. - - - - - A simple implementation backed by a dictionary that - never expires cache items. - - Aleksandar Seovic - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL) in milliseconds. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - -

DictionarySet is an abstract class that supports the creation of new Set - types where the underlying data store is an IDictionary instance.

- -

You can use any object that implements the IDictionary interface to hold set data. - You can define your own, or you can use one of the objects provided in the Framework. - The type of IDictionary you choose will affect both the performance and the behavior - of the Set using it.

- -

To make a Set typed based on your own IDictionary, simply derive a - new class with a constructor that takes no parameters. Some Set implmentations - cannot be defined with a default constructor. If this is the case for your class, - you will need to override Clone() as well.

- -

It is also standard practice that at least one of your constructors takes an ICollection or - an ISet as an argument.

-
-
- -

A collection that contains no duplicate elements. This class models the mathematical - Set abstraction, and is the base class for all other Set implementations. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - Operator - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - | - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - & - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - ^ - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - - - -
-
- - -

A collection that contains no duplicate elements. This interface models the mathematical - Set abstraction. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns if this set contains no elements. - - - - - A collection that contains no duplicate elements. - - -

- This interface models the mathematical - abstraction. The order of - elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various - methods, and thus is not - guaranteed. -

-

- overrides the - method to test for "equivalency": - whether the two sets contain the same elements. The "==" and "!=" - operators are not overridden by design, since it is often desirable to - compare object references for equality. -

-

- Also, the method is not - implemented on any of the set implementations, since none of them are - truly immutable. This is by design, and it is the way almost all - collections in the .NET framework function. So as a general rule, don't - store collection objects inside - instances. You would typically want to use a keyed - instead. -

-

- None of the implementations in - this library are guaranteed to be thread-safe in any way unless wrapped - in a . -

-

- The following table summarizes the binary operators that are supported - by the class. -

- - - Operation - Description - Method - - - Union (OR) - - Element included in result if it exists in either A OR - B. - - Union() - - - Intersection (AND) - - Element included in result if it exists in both A AND - B. - - InterSect() - - - Exclusive Or (XOR) - - Element included in result if it exists in one, but not both, - of A and B. - - ExclusiveOr() - - - Minus (n/a) - - Take all the elements in A. Now, if any of them exist in - B, remove them. Note that unlike the other operators, - A - B is not the same as B - A. - - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - -

- That is, the element is included if it is in either - or this set. Neither this set nor the input - set are modified during the operation. The return value is a - clone of this set with the extra elements added in. -

-
- A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included if it exists in both sets. The - Intersect() operation does not modify the input sets. It - returns a clone of this set with the appropriate elements - removed. -

-
- A set of elements. - - The intersection of this set with . - -
- - - Performs a "minus" of this set from the - set. - - -

- This returns a set of all the elements in set - , removing the elements that are also in - this set. The original sets are not modified during this operation. - The result set is a clone of this - containing the elements from - the operation. -

-
- A set of elements. - - A set containing the elements from this set with the elements in - removed. - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of this set containing the elements - from the exclusive-or operation. -

-
- A set of elements. - - A set containing the result of - ^ this. - -
- - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains no elements. - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns a clone of the Set instance. This will work for derived Set - classes if the derived class implements a constructor that takes no arguments. - - A clone of this object. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the Set is synchronized across threads. Note that - enumeration is inherently not thread-safe. Use the SyncRoot to lock the - object during enumeration. - - - - - An object that can be used to synchronize this collection to make it thread-safe. - When implementing this, if your object uses a base object, like an IDictionary, - or anything that has a SyncRoot, return that object instead of "this". - - - - - Indicates whether the given instance is read-only or not - - - if the ISet is read-only; otherwise, . - In the default implementation of Set, this property always returns false. - - - - - Provides the storage for elements in the Set, stored as the key-set - of the IDictionary object. Set this object in the constructor - if you create your own Set class. - - - - - Adds the specified element to this set if it is not already present. - - The to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. Needed for - non-generic ISet methods implementation - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - The placeholder object used as the value for the IDictionary instance. - - - There is a single instance of this object globally, used for all Sets. - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - None of the objects based on DictionarySet are synchronized. Use the - SyncRoot property instead. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates wether the Set is read-only or not - - - - - Implements a Set based on a Dictionary (which is equivalent of - non-genric HashTable) This will give the best lookup, add, and remove - performance for very large data-sets, but iteration will occur in no particular order. - - - - - Creates a new set instance based on a Dictinary. - - - - - Creates a new set instance based on a Dictinary and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - -

Implements an immutable (read-only) Set wrapper.

-

Although this is advertised as immutable, it really isn't. Anyone with access to the - basisSet can still change the data-set. So GetHashCode() is not implemented - for this Set, as is the case for all Set implementations in this library. - This design decision was based on the efficiency of not having to Clone() the - basisSet every time you wrap a mutable Set.

-
-
- - - Constructs an immutable (read-only) Set wrapper. - - The Set that is wrapped. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - nothing - is always thrown - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - nothing - is always thrown - - - - Removes all objects from the set. - - is always thrown - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - nothing - is always thrown - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - nothing - is always thrown - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - nothing - is always thrown - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns an object that can be used to synchronize use of the Set across threads. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates that the given instance is read-only - - - - - Implements an ordered Set based on a dictionary. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - A collection of elements that defines the initial set contents. - - - - Represents a read only wrapper around a generic IDictionary. The design pattern - mirrors ReadOnlyCollection, and follows the apparent pattern that write operations - do not throw an exception, but simply make no change to the underlying collection. - - Originally put into the public domain. - http://www.simple-talk.com/community/forums/thread/2263.aspx - - - - Original from Public Domain - Mark Pollack (.NET) - - - - Inner storage for ReadOnlyDictionary - - - - - Easy access to non-generic dictionary API - - - - - Initializes a new instance of the class. - - The dictionary to wrap. - - - - Add does not change a read only Dictionary - - The object to use as the key of the element to add. - The object to use as the value of the element to add. - The is read-only. - - - - Determines whether the contains an element with the specified key. - - The key to locate in the . - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Remove does not change a read only Dictionary, will throw an exception. - - The is read-only. - - - - Tries the get value. - - The key. - The value. - - - - - Add does not change a read only Dictionary - - The object to add to the . - The is read-only. - - - - Clear does not change a read only Dictionary. - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if item is found in the ; otherwise, false. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - arrayIndex is less than 0. - array is null. - array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. - - - - Remove does not change a read only Dictionary. Throws an exception - - The object to remove from the . - - true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . - - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Add does not change a read only Dictionary. Throws an exception. - - The to use as the key of the element to add. - The to use as the value of the element to add. - The is read-only.-or- The has a fixed size. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Remove does not change a read only Dictionary. Throws an exception. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. - - - - Runs when the entire object graph has been deserialized. - - The object that initiated the callback. The functionality for this parameter is not currently implemented. - - - - Populates a with the data needed to serialize the target object. - - The to populate with data. - The destination (see ) for this serialization. - The caller does not have the required permission. - - - - Gets a read only containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the value with the specified key. - Set will throw an exception - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether the is read-only. - - - true if the is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets an containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the with the specified key. Set throws an exception. - - - The is read-only. - if try to set value - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Implements a Set based on a sorted tree. This gives good performance for operations on very - large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration - occurs in order. Elements that you put into this type of collection must implement IComparable, - and they must actually be comparable. You can't mix string and int values, for example. - - - - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree. - - The to use for sorting. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - The to use for sorting. - - - -

Implements a thread-safe Set wrapper. The implementation is extremely conservative, - serializing critical sections to prevent possible deadlocks, and locking on everything. - The one exception is for enumeration, which is inherently not thread-safe. For this, you - have to lock the SyncRoot object for the duration of the enumeration.

-
-
- - - Constructs a thread-safe Set wrapper. - - The Set object that this object will wrap. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot - to synchronize the entire enumeration process. - - - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns , indicating that this object is thread-safe. The exception to this - is enumeration, which is inherently not thread-safe. Use the SyncRoot object to - lock this object for the entire duration of the enumeration. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates whether given instace is read-only or not - - - - - This class provides skeletal implementations of some - operations. - - -

- The implementations in this class are appropriate when the base - implementation does not allow elements. The methods - , - , and - are based on - the , - , and - methods - respectively but throw exceptions instead of indicating failure via - or returns. -

- An implementation that extends this class must - minimally define a method - which does - not permit the insertion of elements, along with methods - , and - . Typically, - additional methods will be overridden as well. If these requirements - cannot be met, consider instead subclassing - }. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - A collection designed for holding elements prior to processing. - - -

- Besides basic operations, - queues provide additional insertion, extraction, and inspection - operations. -

-

- Each of these methods exists in two forms: one throws - an exception if the operation fails, the other returns a special - value (either or , depending on the - operation). The latter form of the insert operation is designed - specifically for use with capacity-restricted - implementations; in most implementations, insert operations cannot - fail. -

-

- Queues typically, but do not necessarily, order elements in a - FIFO (first-in-first-out) manner. Among the exceptions are - priority queues, which order elements according to a supplied - comparator, or the elements' natural ordering, and LIFO queues (or - stacks) which order the elements LIFO (last-in-first-out). - Whatever the ordering used, the head of the queue is that - element which would be removed by a call to - or - . In a FIFO queue, all new - elements are inserted at the tail of the queue. Other kinds of queues may - use different placement rules. Every implementation - must specify its ordering properties. -

-

- The method inserts an - element if possible, otherwise returning . This differs from the - method, which can fail to - add an element only by throwing an exception. The - method is designed for - use when failure is a normal, rather than exceptional occurrence, for example, - in fixed-capacity (or "bounded" queues. -

-

- The - methods remove and - return the head of the queue. Exactly which element is removed from the - queue is a function of the queue's ordering policy, which differs from - implementation to implementation. The - and - methods differ only in their - behavior when the queue is empty: the - method throws an exception, - while the method returns - . -

-

- The and - methods return, but do - not remove, the head of the queue. -

-

- The interface does not define the blocking queue - methods, which are common in concurrent programming. -

-

- implementations generally do not allow insertion - of elements, although some implementations, such as - a linked list, do not prohibit the insertion of . - Even in the implementations that permit it, should - not be inserted into a , as is also - used as a special return value by the - method to - indicate that the queue contains no elements. -

-

- implementations generally do not define - element-based versions of methods - and , but instead inherit the - identity based versions from the class object, because element-based equality - is not always well-defined for queues with the same elements but different - ordering properties. -

-

- Based on the back port of JCP JSR-166. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the class of the supplied prevents it - from being added to this queue. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue - - if this queue is empty -
- - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue. - - If this queue is empty. -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Returns if there are no elements in the , otherwise. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Inserts the specified element into this queue if it is possible - to do so immediately without violating capacity restrictions. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that - it throws an exception if this queue is empty. -

-
- - The head of this queue - - - If this queue is empty. - -
- - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-

- ALso note that this implementation returns the result of - unless the queue - is empty. -

-
- The head of this queue. - - If this queue is empty. - -
- - - Removes all of the elements from this queue. - - -

- The queue will be empty after this call returns. -

-

- This implementation repeatedly invokes - until it - returns . -

-
-
- - - Adds all of the elements in the supplied - to this queue. - - -

- Attempts to - - of a queue to itself result in . - Further, the behavior of this operation is undefined if the specified - collection is modified while the operation is in progress. -

-

- This implementation iterates over the specified collection, - and adds each element returned by the iterator to this queue, in turn. - An exception encountered while trying to add an element (including, - in particular, a element) may result in only some - of the elements having been successfully added when the associated - exception is thrown. -

-
- - The collection containing the elements to be added to this queue. - - - if this queue changed as a result of the call. - - - If the supplied or any one of its elements are . - - - If the collection is the current or - the collection size is greater than the queue capacity. - -
- - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns if there are no elements in the , otherwise. - - - - - Returns the current capacity of this queue. - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. - - Erich Eichinger - - - - Creates a case-insensitive hashtable using . - - - - - Creates a case-insensitive hashtable using the given . - - the to calculate the hashcode - - - - Creates a case-insensitive hashtable using the given , initially - populated with entries from another dictionary. - - the dictionary to copy entries from - the to calculate the hashcode - - - - Initializes a new, empty instance of the class that is serializable using the specified and objects. - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the object. - info is null. - - - - Implements the interface and returns the data needed to serialize the . - - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the . - info is null. - - - - Calculate the hashcode of the given string key, using the configured culture. - - - - - - - Compares two keys - - - - - Creates a shallow copy of the current instance. - - - - - is an - class that supports the creation of new - types where the underlying data - store is an instance. - - -

- You can use any object that implements the - interface to hold set - data. You can define your own, or you can use one of the objects - provided in the framework. The type of - you - choose will affect both the performance and the behavior of the - using it. -

-

- This object overrides the method, - but not the method, because - the class is mutable. - Therefore, it is not safe to use as a key value in a dictionary. -

-

- To make a typed based on your - own , simply derive a new - class with a constructor that takes no parameters. Some - implmentations cannot be defined - with a default constructor. If this is the case for your class, you - will need to override clone as well. -

-

- It is also standard practice that at least one of your constructors - takes an or an - as an argument. -

-
- -
- - - A collection that contains no duplicate elements. - - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs a "union" of two sets, where all the elements in both are - present. - - -

- That is, the element is included if it is in either - or . The return - value is a clone of one of the sets ( - if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. -

-
- A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - -
- - - Performs a "union" of two sets, where all the elements in both are - present. - - A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included only if it exists in both - and . Neither input - object is modified by the operation. The result object is a - clone of one of the input objects ( - if it is not ) containing the elements from - the intersect operation. -

-
- A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs a "minus" of set from set - . - - -

- This returns a set of all the elements in set - , removing the elements that are also in - set . The original sets are not modified - during this operation. The result set is a clone of set - containing the elements from the operation. -

-
- A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - -
- - - Performs a "minus" of set from set - . - - A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of one of the sets ( - if it is not ) - containing the elements from the exclusive-or operation. -

-
- A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Returns a clone of the - instance. - - -

- This will work for derived - classes if the derived class implements a constructor that takes no - arguments. -

-
- A clone of this object. -
- - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - This method will test the - against another for - "equality". - - -

- In this case, "equality" means that the two sets contain the same - elements. The "==" and "!=" operators are not overridden by design. - If you wish to check for "equivalent" - instances, use - Equals(). If you wish to check to see if two references are - actually the same object, use "==" and "!=". -

-
- - A object to compare to. - - - if the two sets contain the same elements. - -
- - - Gets the hashcode for the object. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - -

- When implementing this, if your object uses a base object, like an - , or anything that has - a SyncRoot, return that object instead of "this". -

-
- - An object that can be used to synchronize this collection to make - it thread-safe. - -
- - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Provides the storage for elements in the - , stored as the key-set - of the object. - - -

- Set this object in the constructor if you create your own - class. -

-
-
- - - The placeholder object used as the value for the - instance. - - - There is a single instance of this object globally, used for all - s. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Implements an based on a - hash table. - - -

- This will give the best lookup, add, and remove performance for very - large data-sets, but iteration will occur in no particular order. -

-
- -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class, and - initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an that automatically - changes from a list based implementation to a hashtable based - implementation when the size reaches a certain threshold. - - -

- This is good if you are unsure about whether you data-set will be tiny - or huge. -

- - Because this uses a dual implementation, iteration order is not - guaranteed! - -
- -
- - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size, and initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an immutable (read-only) - wrapper. - - -

- Although this class is advertised as immutable, it really isn't. - Anyone with access to the wrapped - can still change the data. So - is not implemented for this , as - is the case for all - implementations in this library. This design decision was based on the - efficiency of not having to clone the wrapped - every time you wrap a mutable - . -

-
-
- - - Constructs an immutable (read-only) - wrapper. - - - The that is to be wrapped. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - - Removes all objects from this set. - - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the - instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - Simple linked list implementation. - - Simon White - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class that contains all - elements of the specified list. - - - A list of elements that defines the initial contents. - - - - - Removes the object at the specified index. - - The lookup index. - - If the specified is greater than the - number of objects within the list. - - - - - Inserts an object at the specified index. - - The lookup index. - The object to be inserted. - - If the specified is greater than the - number of objects within the list. - - - - - Removes the first instance of the specified object found. - - The object to remove - - - - Returns if this list contains the specified - element. - - The element to look for. - - if this list contains the specified element. - - - - - Removes all objects from the list. - - - - - Returns the index of the first instance of the specified - found. - - The object to search for - - The index of the first instance found, or -1 if the element was not - found. - - - - - Adds the specified object to the end of the list. - - The object to add - The index that the object was added at. - - - - Adds all of the elements of the supplied - list to the end of this list. - - The list of objects to add. - - - - Checks whether the list can be modified. - - - If the list cannot be modified. - - - - - Validates the specified index. - - The lookup index. - - If the index is invalid. - - - - - Returns the node at the specified index. - - The lookup index. - The node at the specified index. - - If the specified is greater than the - number of objects within the list. - - - - - Returns the node (and index) of the first node that contains - the specified value. - - The value to search for. - - The node, or if not found. - - - - - Removes the specified node. - - The node to be removed. - - - - Copies the elements in this list to an array. - - -

- The type of array needs to be compatible with the objects in this - list, obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - - - If the supplied is . - - - If the supplied is less than zero - or is greater than the length of . - - - If the supplied is of insufficient size. - -
- - - Gets an enumerator for the elements in the - . - - -

- Enumerators are fail fast. -

-
- - An over the elements - in the . - -
- - - Is list read only? - - - if the list is read only. - - - - - Returns the node at the specified index. - - -

- This is the indexer for the - class. -

-
- -
- - - Is the list a fixed size? - - - if the list is a fixed size list. - - - - - Returns if the list is synchronized across - threads. - - - - This implementation always returns . - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - The number of objects within the list. - - - - - An object that can be used to synchronize this - to make it thread-safe. - - - An object that can be used to synchronize this - to make it thread-safe. - - - - - Implements a based on a list. - - -

- Performance is much better for very small lists than either - or . - However, performance degrades rapidly as the data-set gets bigger. Use a - instead if you are not sure your data-set - will always remain very small. Iteration produces elements in the order they were added. - However, element order is not guaranteed to be maintained by the various - mathematical operators. -

-
-
- - - Creates a new set instance based on a list. - - - - - Creates a new set instance based on a list and initializes it based on a - collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Thrown when an element is requested from an empty . - - Griffin Caprio - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - An unbounded priority based on a priority - heap. This queue orders elements according to an order specified - at construction time, which is specified either according to their - natural order (see , or according to a - , depending on which constructor is - used. A priority queue does not permit elements. - A priority queue relying on natural ordering also does not - permit insertion of non-comparable objects (doing so will result - . - -

- The head of this queue is the lowest element - with respect to the specified ordering. If multiple elements are - tied for lowest value, the head is one of those elements -- ties are - broken arbitrarily. - -

- A priority queue is unbounded, but has an internal - capacity governing the size of an array used to store the - elements on the queue. It is always at least as large as the queue - size. As elements are added to a priority queue, its capacity - grows automatically. The details of the growth policy are not - specified. - -

- This class and its enumerator implement all of the - optional methods of the and - interfaces. - The enumerator provided in method - is not guaranteed to traverse the elements of the PriorityQueue in any - particular order. - -

- Note that this implementation is NOT synchronized. - Multiple threads should not access a - instance concurrently if any of the threads modifies the list - structurally. Instead, use the thread-safe PriorityBlockingQueue. -

- Josh Bloch - Griffin Caprio (.NET) -
- - - Priority queue represented as a balanced binary heap: the two children - of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is - ordered by comparator, or by the elements' natural ordering, if - comparator is null: For each node n in the heap and each descendant d - of n, n <= d. - - The element with the lowest value is in queue[1], assuming the queue is - nonempty. (A one-based array is used in preference to the traditional - zero-based array to simplify parent and child calculations.) - - queue.length must be >= 2, even if size == 0. - - - - The number of elements in the priority queue. - - - - The comparator, or null if priority queue uses elements' - natural ordering. - - - - - The number of times this priority queue has been - structurally modified. - - - - - Creates a with the default initial capacity - (11) that orders its elements according to their natural - ordering (using ). - - - - - Creates a with the specified initial capacity - that orders its elements according to their natural ordering - (using ). - - the initial capacity for this priority queue. - - if is less than 1. - - - - Creates a with the specified initial capacity - that orders its elements according to the specified comparator. - - the initial capacity for this priority queue. - the comparator used to order this priority queue. - If then the order depends on the elements' natural ordering. - - if is less than 1. - - - - Creates a containing the elements in the - specified collection. The priority queue has an initial - capacity of 110% of the size of the specified collection or 1 - if the collection is empty. If the specified collection is an - instance of a , the priority queue will be sorted - according to the same comparator, or according to its elements' - natural order if the collection is sorted according to its - elements' natural order. Otherwise, the priority queue is - ordered according to its elements' natural order. - - the collection whose elements are to be placed into this priority queue. - if elements of cannot be - compared to one another according to the priority queue's ordering - if or any element with it is - - - - - - Common code to initialize underlying queue array across - constructors below. - - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - - Establishes the heap invariant assuming the heap - satisfies the invariant except possibly for the leaf-node indexed by k - (which may have a nextExecutionTime less than its parent's). - - - This method functions by "promoting" queue[k] up the hierarchy - (by swapping it with its parent) repeatedly until queue[k] - is greater than or equal to its parent. - - - - - Establishes the heap invariant (described above) in the subtree - rooted at k, which is assumed to satisfy the heap invariant except - possibly for node k itself (which may be greater than its children). - - - This method functions by "demoting" queue[k] down the hierarchy - (by swapping it with its smaller child) repeatedly until queue[k] - is less than or equal to its children. - - - - - Establishes the heap invariant in the entire tree, - assuming nothing about the order of the elements prior to the call. - - - - - Returns the of or - 1, - whichever is smaller. - - base size - percentage to return - of - - - - Initially fill elements of the queue array under the - knowledge that it is sorted or is another , in which - case we can just place the elements in the order presented. - - - - - Initially fill elements of the queue array that is not to our knowledge - sorted, so we must rearrange the elements to guarantee the heap - invariant. - - - - - Removes and returns element located at from queue. (Recall that the queue - is one-based, so 1 <= i <= size.) - - - Normally this method leaves the elements at positions from 1 up to i-1, - inclusive, untouched. Under these circumstances, it returns . - Occasionally, in order to maintain the heap invariant, it must move - the last element of the list to some index in the range [2, i-1], - and move the element previously at position (i/2) to position i. - Under these circumstances, this method returns the element that was - previously at the end of the list and is now at some position between - 2 and i-1 inclusive. - - - - Resize array, if necessary, to be able to hold given index - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - and this queue does not permit - elements. - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - - - Removes a single instance of the specified element from this - queue, if it is present. - - - - - Returns an over the elements in this queue. - The enumeratoar does not return the elements in any particular order. - - an enumerator over the elements in this queue. - - - - Removes all elements from the priority queue. - The queue will be empty after this call returns. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Queries the queue to see if it contains the specified - - element to look for. - if the queue contains the , - otherwise. - - - Returns the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering - (using ). - - - the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering. - - - - - Save the state of the instance to a stream (that - is, serialize it). - - The length of the array backing the instance is - emitted (int), followed by all of its elements (each an - ) in the proper order. - - the stream - the context - - - - Reconstitute the instance from a stream (that is, - deserialize it). - - the stream - the context - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Copies the elements of the to an , starting at index 0. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Gets the Capacity of this queue. Will equal - - - - - Returns the queue count. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Returns if there are no elements in the , otherwise. - - - - - Index (into queue array) of element to be returned by subsequent call to next. - - - - - Implements an based on a sorted - tree. - - -

- This gives good performance for operations on very large data-sets, - though not as good - asymptotically - as a - . However, iteration occurs - in order. -

-

- Elements that you put into this type of collection must implement - , and they must actually be comparable. - You can't mix and - values, for example. -

-

- This implementation does - not support elements that are . -

-
- -
- - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree using for ordering. - - - - - Creates a new set instance based on a sorted tree and initializes - it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Synchronized that should be returned by synchronized - dictionary implementations in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that should be returned by synchronized - collections in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that, unlike hashtable created - using method, synchronizes - reads from the underlying hashtable in addition to writes. - - -

- In addition to synchronizing reads, this implementation also fixes - IEnumerator/ICollection issue described at - http://msdn.microsoft.com/en-us/netframework/aa570326.aspx - (search for SynchronizedHashtable for issue description), by implementing - interface explicitly, and returns thread safe enumerator - implementations as well. -

-

- This class should be used whenever a truly synchronized - is needed. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of - - - - - Initializes a new instance of - - - - - Initializes a new instance of , copying inital entries from - handling keys depending on . - - - - - Creates a instance that - synchronizes access to the underlying . - - the hashtable to be synchronized - - - - Creates a wrapper that synchronizes - access to the passed . - - the hashtable to be synchronized - - - - Adds an element with the provided key and value to the object. - - The to use as the value of the element to add. - The to use as the key of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. 2 - - - - Removes all elements from the object. - - The object is read-only. 2 - - - - Creates a new object that is a copy of the current instance. - - - A new object that is a copy of this instance. - - - - - Determines whether the object contains an element with the specified key. - - - true if the contains an element with the key; otherwise, false. - - The key to locate in the object. - key is null. 2 - - - - Returns, whether this contains an entry with the specified . - - The key to look for - , if this contains an entry with this - - - - Returns, whether this contains an entry with the specified . - - The valúe to look for - , if this contains an entry with this - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets or sets the element with the specified key. - - - The element with the specified key. - - The key of the element to get or set. - The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. - key is null. 2 - - - - Implements a thread-safe wrapper. - - -

- The implementation is extremely conservative, serializing critical - sections to prevent possible deadlocks, and locking on everything. The - one exception is for enumeration, which is inherently not thread-safe. - For this, you have to lock the SyncRoot object for the - duration of the enumeration. -

-
- -
- - - Constructs a thread-safe - wrapper. - - - The object that this object - will wrap. - - - If the supplied ecposes a - SyncRoot value. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the instance. - - A clone of this object. - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Simple listener that logs application events to the console. - - -

- Intended for use during debugging only. -

-
- Rod Johnson - Griffin Caprio (.NET) - -
- - - A listener for application events. - - Rod Johnson - Griffin Caprio (.NET) - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Creates a new instance of the - class. - - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle events. - - Griffin Caprio (.NET) - - - - - - - Encapsulates the data associated with an event raised by an - . - - Rod Johnson - Mark Pollack (.NET) - Griffin Caprio (.NET) - - - - - Creates a new instance of the - class. - - - - - The date and time when the event occured. - - - The date and time when the event occured. - - - - - The system time in milliseconds when the event happened. - - - The system time in milliseconds when the event happened. - - - - - Creates a new instance of the ContextEventArgs class to represent the - supplied context event. - - The type of context event. - - - - Returns a string representation of this object. - - A string representation of this object. - - - - The event type. - - - - - The various context event types. - - - - - The event type when the context is refreshed or created. - - - - - The event type when the context is closed. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Partial implementation of the - interface. - - -

- Does not mandate the type of storage used for configuration, but does - implement common functionality. Uses the Template Method design - pattern, requiring concrete subclasses to implement - methods. -

-

- In contrast to a plain vanilla - , an - is supposed - to detect special objects defined in its object factory: therefore, - this class automatically registers - s, - s - and s that are - defined as objects in the context. -

-

- An may be also supplied as - an object in the context, with the special, well-known-name of - "messageSource". Else, message resolution is delegated to the - parent context. -

-
- Rod Johnson - Juergan Hoeller - Griffin Caprio (.NET) - - -
- - - Configurable implementation of the - interface. - - -

- This implementation - supports the configuration of resource access protocols and the - corresponding .NET types that know how to handle those protocols. -

-

- Basic protocol-to-resource type mappings are also defined by this class, - while others can be added either internally, by application contexts - extending this class, or externally, by the end user configuring the - context. -

-

- Only one resource type can be defined for each protocol, but multiple - protocols can map to the same resource type (for example, the - "http" and "ftp" protocols both map to the - type. The protocols that are - mapped by default can be found in the following list. -

-

- - - assembly - - - config - - - file - - - http - - - https - - -

-
- Aleksandar Seovic - - - -
- - - Describes an object that can load - s. - - -

- An implementation is - generally required to support the functionality described by this - interface. -

-

- The class is a - standalone implementation that is usable outside an - ; the aforementioned - class is also used by the - class. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Return an handle for the - specified resource. - - -

- The handle should always be a reusable resource descriptor; this - allows one to make repeated calls to the underlying - . -

-

-

    -
  • - Must support fully qualified URLs, e.g. "file:C:/test.dat". -
  • -
  • - Should support relative file paths, e.g. "test.dat" (this will be - implementation-specific, typically provided by an - implementation). -
  • -
-

- - An handle does not imply an - existing resource; you need to check the value of an - 's - property to determine - conclusively whether or not the resource actually exists. - -
- The resource location. - - An appropriate handle. - - - - -
- - - The separator between the protocol name and the resource name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified default protocol for unqualified resources. - - - - - Returns a that has been - mapped to the protocol of the supplied . - - The name of the resource. - - A new instance for the - supplied . - - - If a - mapping does not exist for the supplied . - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - - Checks that the supplied starts - with one of the protocol names currently mapped by this - instance. - - The name of the resource. - - if the supplied - starts with one of the known - protocols; if not, or if the supplied - is itself . - - - - - Extracts the protocol name from the supplied - . - - The name of the resource. - - The extracted protocol name or if the - supplied is unqualified (or - is itself ). - - - - - The default protocol to use for unqualified resources. - - -

- The initial value is "file". -

-
-
- - - Provides the means to configure an application context in addition to - the methods exposed on the - interface. - - -

- This interface is to be implemented by most (if not all) - implementations. -

-

- Configuration and lifecycle methods are encapsulated here to avoid - making them obvious to - client code. -

-

- Calling will close this - application context, releasing all resources and locks that the - implementation might hold. This includes disposing all cached - singleton objects. -

- - does not invoke the - attendant on any parent - context. - -
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - The central interface to Spring.NET's IoC container. - - -

- implementations - provide: - - - - Object factory functionality inherited from the - - and - interfaces. - - - - - The ability to resolve messages, supporting internationalization. - Inherited from the - interface. - - - - - The ability to load file resources in a generic fashion. - Inherited from the - interface. - - - - - Acts an an event registry for supporting loosely coupled eventing - between objecs. Inherited from the - interface. - - - - - The ability to raise events related to the context lifecycle. Inherited - from the - interface. - - - - - Inheritance from a parent context. Definitions in a descendant context - will always take priority. - - - -

-

- In addition to standard object factory lifecycle capabilities, - implementations need - to detect - , - , and - objects and supply - their attendant dependencies accordingly. -

-

- This interface is the central client interface in Spring.NET's IoC - container implementation. As such it does inherit a quite sizeable - number of interfaces; implementations are strongly encouraged to use - composition to satisfy each of the inherited interfaces (where - appropriate of course). -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - -
- - - Extension of the interface - to be implemented by object factories that can enumerate all their object instances, - rather than attempting object lookup by name one by one as requested by clients. - - -

- implementations that preload - all their objects (for example, DOM-based XML factories) may implement this - interface. This interface is discussed in - "Expert One-on-One J2EE Design and Development", by Rod Johnson. -

-

- If this is an , - the return values will not take any - hierarchy into account, but - will relate only to the objects defined in the current factory. - Use the helper class to - get all objects. -

-

- With the exception of - , - the methods and properties in this interface are not designed for frequent - invocation. Implementations may be slow. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - The root interface for accessing a Spring.NET IoC container. - - - - This is the basic client view of a Spring.NET IoC container; further interfaces - such as and - - are available for specific purposes such as enumeration and configuration. - - - This is the root interface to be implemented by objects that can hold a number - of object definitions, each uniquely identified by a - name. An independent instance of any of these objects can be obtained - (the Prototype design pattern), or a single shared instance can be obtained - (a superior alternative to the Singleton design pattern, in which the instance is a - singleton in the scope of the factory). Which type of instance - will be returned depends on the object factory configuration - the API is the same. - The Singleton approach is more useful and hence more common in practice. - - - The point of this approach is that the IObjectFactory is a central registry of - application components, and centralizes the configuring of application components - (no more do individual objects need to read properties files, for example). - See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a - discussion of the benefits of this approach. - - - Normally an IObjectFactory will load object definitions stored in a configuration - source (such as an XML document), and use the - namespace to configure the objects. However, an implementation could simply return - .NET objects it creates as necessary directly in .NET code. There are no - constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties - file etc. Implementations are encouraged to support references amongst objects, - to either Singletons or Prototypes. - - - In contrast to the methods in - , all of the methods - in this interface will also check parent factories if this is an - . If an object is - not found in this factory instance, the immediate parent is asked. Objects in - this factory instance are supposed to override objects of the same name in any - parent factory. - - - Object factories are supposed to support the standard object lifecycle interfaces - as far as possible. The maximum set of initialization methods and their standard - order is: - - - - - - 's - property. - - - - - 's - property. - - - - - - (only applicable if running within an ). - - - - - The - - method of - s. - - - - - 's - method. - - - - - A custom init-method definition. - - - - - The - - method of - s. - - - - -

- - On shutdown of an object factory, the following lifecycle methods apply: - - - - - - 's - method. - - - - - A custom destroy-method definition. - - - - - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - -

- Is this object a singleton? - - - - That is, will - always return the same object? - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Does this object factory contain an object with the given name? - - - - The concrete lookup strategy depends on the implementation. E.g. s - will also search their parent factory if a name isn't found . - - - The name of the object to query. - True if an object with the given name is defined. - - - - Return the aliases for the given object name, if defined. - - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - Provides a measure of type safety by throwing an exception if the object is - not of the required . - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - Determine the type of the object with the given name. - - - - More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. - - - The name of the object to query. - - The type of the object or if not determinable. - - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - In addition to being generally useful, typically this method is used to provide - dependency injection functionality for objects that are instantiated outwith the - control of a developer. A case in point is the way that the current (1.1) - ASP.NET classes instantiate web controls... the instantiation takes place within - a private method of a compiled page, and thus cannot be hooked into the - typical Spring.NET IOC container lifecycle for dependency injection. - - - - The following code snippet assumes that the instantiated factory instance - has been configured with an object definition named - 'ExampleNamespace.BusinessObject' that has been configured to set the - Dao property of any ExampleNamespace.BusinessObject instance - to an instance of an appropriate implementation... - - namespace ExampleNamespace - { - public class BusinessObject - { - private IDao _dao; - - public BusinessObject() {} - - public IDao Dao - { - get { return _dao; } - set { _dao = value; } - } - } - } - - with the corresponding driver code looking like so... - - IObjectFactory factory = GetAnIObjectFactoryImplementation(); - BusinessObject instance = new BusinessObject(); - factory.ConfigureObject(instance, "object_definition_name"); - // at this point the dependencies for the 'instance' object will have been resolved... - - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - If there is no object definition for the supplied . - - - If any of the target object's dependencies could not be created. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - This is the indexer for the - interface. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Check if this object factory contains an object definition with the given name. - - -

- Does not consider any hierarchy this factory may participate in. -

- - Ignores any singleton objects that have been registered by other means - than object definitions. - -
- The name of the object to look for. - - if this object factory contains an object - definition with the given name. - -
- - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. - Use - to include beans in ancestor factories too. - <p>Note: Does <i>not</i> ignore singleton objects that have been registered - by other means than bean definitions. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Sub-interface implemented by object factories that can be part - of a hierarchy. - - Rod Johnson - Rick Evans (.NET) - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts, also resolving a given alias if necessary. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Return the parent object factory, or - if this factory does not have a parent. - - - The parent object factory, or - if this factory does not have a parent. - - - - - Describes an object that can resolve messages. - - -

- This enables the parameterization and internationalization of messages. -

-

- Spring.NET provides one out-of-the-box implementation for production - use: -

    -
  • .
  • -
-

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - The default message if name is not found. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - -

- This method must use the - - value to obtain a resource. -

-

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The resolved object, or if not found. - -
- - - Gets a localized resource object identified by the supplied - . - - -

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - -
- - - Applies resources to object properties. - - -

- Resource key names are of the form objectName.propertyName. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - - Encapsulates event publication functionality. - - -

- Serves as a super-interface for the - interface. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Publishes an application context event. - - - The source of the event. May be . - - - The event that is to be raised. - - - - - A registry that manages subscriptions to and the - publishing of events. - - Griffin Caprio - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - Subscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Raised in response to an application context event. - - - - - Returns the date and time this context was loaded. - - -

- This is to be set immediately after an - has been - instantiated and its configuration has been loaded. Implementations - are permitted to update this value if the context is reset or - refreshed in some way. -

-
- - The representing when this context - was loaded. - - -
- - - Gets the parent context, or if there is no - parent context. - - -

- If the parent context is , then this context - is the root of any context hierarchy. -

-
- - The parent context, or if there is no - parent. - -
- - - Gets and sets a name for this context. - - - A name for this context. - - - - - Interface defining methods for start/stop lifecycle control. - The typical use case for this is to control asynchronous processing. - - - - Can be implemented by both components (typically a Spring object defined in - a spring and containers - (typically a spring . Containers will - propagate start/stop signals to all components that apply. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Gets a value indicating whether this component is currently running. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - true if this component is running; otherwise, false. - - - - - Add an - - that will get applied to the internal object factory of this - application context on refresh, before any of the object - definitions are evaluated. - - -

- To be invoked during context configuration. -

-
- - The factory processor to register. - - -
- - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Return the internal object factory of this application context. - - -

- Can be used to access specific functionality of the factory. -

- - This is just guaranteed to return an instance that is not - after the context has been refreshed - at least once. - - - Do not use this to post-process the object factory; singletons - will already have been instantiated. Use an - - to intercept the object factory setup process before objects even - get touched. - -
- -
- - - Sets the parent of this application context. - - - - The parent should not be changed: it should only be set - outside a constructor if it isn't available when an instance of - this class is created. - - - - The parent context. - - - - - Interface for registries that hold object definitions, i.e. - - and - - instances. - - -

- Typically implemented by object factories that work with the - - hierarchy internally. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Determine whether the given object name is already in use within this registry, - i.e. whether there is a local object or alias registered under this name. - - - - - Return the names of all objects defined in this registry. - - - The names of all objects defined in this registry, or an empty array - if none defined - - - - - Check if this registry contains a object definition with the given name. - - - The name of the object to look for. - - - True if this object factory contains an object definition with the - given name. - - - - - Returns the - - for the given object name. - - - The name of the object to find a definition for. - - - The for - the given name (never null). - - - If the object definition cannot be resolved. - - - In case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Return the aliases for the given object name, if defined. - - the object name to check for aliases - - -

- Will ask the parent factory if the object cannot be found in this - factory instance. -

-
- - The aliases, or an empty array if none. - - - If there's no such object definition. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - - The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Return the number of objects defined in the registry. - - - The number of objects defined in the registry. - - - - - Name of the .Net config section that contains Spring.Net context definition. - - - - - Default name of the root context. - - - - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then message resolution - will be delegated to the parent context (if any). -

-
-
- - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then a default - will be used. -

-
-
- - - The instance for this class. - - - - - The instance we delegate - our implementation of said interface to. - - - - - The instance we - delegate our implementation of said interface to. - - - - - Creates a new instance of the - with no parent context. - - -

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

-
-
- - - Creates a new instance of the - with no parent context. - - -

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

-
- Flag specifying whether to make this context case sensitive or not. -
- - - Creates a new instance of the - with the supplied parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent application context. -
- - - Adds the given to the list of standard - processors being added to the underlying - - - Each time is called on this context, the context ensures, that - all default s are registered with the underlying . - - The instance. - - - - Closes this context and disposes of any resources (such as - singleton objects in the wrapped - ). - - - - - Subclasses must implement this method to perform the actual - configuration loading. - - -

- This method is invoked by - , - before any other initialization occurs. -

-
- - In the case of errors encountered while refreshing the object factory. - -
- - - Returns the internal object factory of the parent context if it implements - ; else, - returns the parent context itself. - - - The parent context's object factory, or the parent itself. - - - - - Raises an application context event. - - - Any arguments to the event. May be . - - - - - Raises an application context event. - - - The source of the event. - - - Any arguments to the event. May be . - - - - - Create the strategy to be used - - - - - Modify the application context's internal object factory after its standard - initialization. - - -

- All object definitions will have been loaded, but no objects - will have been instantiated yet. This allows for the registration - of special - s - in certain - implementations. -

-
- - The object factory used by the application context. - - - In the case of errors. - . -
- - - Template method which can be overridden to add context-specific - work before the underlying object factory gets refreshed. - - - - - Template method which can be overridden to add context-specific - refresh work. - - -

- Called on initialization of special objects, before instantiation - of singletons. -

-
-
- - - Template method which can be overridden to add context-specific - work after the context was refreshed but before the - event gets raised. - - - - - Instantiate and invoke all registered - - objects, respecting any explicit ordering. - - - - Must be called before singleton instantiation. - - - In the case of errors. - - - - Resets the well-known ObjectPostProcessorChecker that logs an info - message when an object is created during IObjectPostProcessor - instantiation, i.e. when an object is not eligible for being - processed by all IObjectPostProcessors. - - - - - Initializes the default event registry for this context. - - - - - Returns the internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - The internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - - - Initializes the default message source for this context. - - -

- Uses any parent context's message source if one is not available - in this context. -

-
-
- - - Add a new - that will get applied to the internal object factory of this application context - on refresh, before any of the object definitions are evaluated. - - - The factory processor to register. - - - - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Registers well-known s and - preregisters well-known dependencies using - - the raw object factory as returned from - - - - Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory - - - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Check if this object factory contains an object definition with the given name. - - The name of the object to look for. - - True if this object factory contains an object definition with the given name. - - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - - if an object with the given name is defined. - - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Is this object a singleton? - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determine the of the object with the - given name. - - The name of the object to query. - - The of the object, or - if not determinable. - - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - - - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Determine whether the given object name is already in use within this context, - i.e. whether there is a local object. May be override by subclasses, the default - implementation simply returns - - - - - Register a new object definition with this registry. - Must support - - and . - - The name of the object instance to register. - The definition of the object instance to register. - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - The name of the object. - The alias that will behave the same as the object name. - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - - Subscribes to published events of a all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Publishes an application context event. - - -

- -

-
- - The source of the event. May be . - - - The event that is to be raised. - - -
- - - An object that can be used to synchronize access to the - - - - - Set the to be used by this context. - - - - - The timestamp when this context was first loaded. - - - The timestamp (milliseconds) when this context was first loaded. - - - - - Gets a flag indicating whether context should be case sensitive. - - true if object lookups are case sensitive; otherwise, false. - - - - The for this context. - - - If the context has not been initialized yet. - - - - - The for this context. - - - If the context has not been initialized yet. - - - - - Returns the list of the - s - that will be applied to the objects created with this factory. - - -

- The elements of this list are instances of implementations of the - - interface. -

-
- - The list of the - s - that will be applied to the objects created with this factory. - -
- - - Return the internal object factory of this application context. - - - - - Gets the parent context, or if there is no - parent context. - - - The parent context, or if there is no - parent. - - - - - - Gets a value indicating whether this component is currently running. - - - true if this component is running; otherwise, false. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - - - Gets a dictionary of all singleton beans that implement the - ILifecycle interface in this context. - - A dictionary of ILifecycle objects with object name as key. - - - - Raised in response to an implementation-dependant application - context event. - - - - - The date and time this context was first loaded. - - - The representing when this context - was first loaded. - - - - - A name for this context. - - - A name for this context. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return the parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - - Allows for custom modification of new object instances, e.g. - checking for marker interfaces or wrapping them with proxies. - - -

- Application contexts can auto-detect - - objects in their object definitions and apply them before any other - objects get created. Plain object factories allow for programmatic - registration of post-processors. -

-

- Typically, post-processors that populate objects via marker interfaces - or the like will implement - , - and post-processors that wrap objects with proxies will normally implement - . -

-
- Juergen Hoeller - Aleksandar Seovic (.NET) - -
- - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Interface that can be implemented by objects that should be orderable, e.g. in an - . - - -

- The actual order can be interpreted as prioritization, the first object (with the - lowest order value) having the highest priority. -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Abstract implementation of the interface, - implementing common handling of message variants, making it easy - to implement a specific strategy for a concrete . - - -

Subclasses must implement the abstract ResolveObject - method.

-

Note: By default, message texts are only parsed through - String.Format if arguments have been passed in for the message. In case - of no arguments, message texts will be returned as-is. As a consequence, - you should only use String.Format escaping for messages with actual - arguments, and keep all other messages unescaped. -

-

Supports not only IMessageSourceResolvables as primary messages - but also resolution of message arguments that are in turn - IMessageSourceResolvables themselves. -

-

This class does not implement caching of messages per code, thus - subclasses can dynamically change messages over time. Subclasses are - encouraged to cache their messages in a modification-aware fashion, - allowing for hot deployment of updated messages. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - Harald Radi (.NET) - - - -
- - - Sub-interface of to be - implemented by objects that can resolve messages hierarchically. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - holds the logger instance shared with subclasses. - - - - - Initializes this instance. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- If the lookup is not successful throw NoSuchMessageException -
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException. -

-
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message if name is not found. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException -

-
-
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - The value object storing those attributes that are required to - properly resolve a message. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful. - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. If - the resource name resolves to null, then in .NET 1.1 the return - value will be String.Empty whereas in .NET 2.0 it will return - null. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Resolve the given code and arguments as message in the given culture, - returning null if not found. Does not fall back to the code - as default message. Invoked by GetMessage methods. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Try to retrieve the given message from the parent MessageSource, if any. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Return a fallback default message for the given code, if any. - - - Default is to return the code itself if "UseCodeAsDefaultMessage" - is activated, or return no fallback else. In case of no fallback, - the caller will usually receive a NoSuchMessageException from GetMessage - - The code to lookup up, such as 'calculator.noRateSet'. - The default message to use, or null if none. - - - - Renders the default message string. The default message is passed in as specified by the - caller and can be rendered into a fully formatted default message shown to the user. - - Default implementation passed he String for String.Format resolving any - argument placeholders found in them. Subclasses may override this method to plug - in custom processing of default messages. - - The default message. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The rendered default message (with resolved arguments) - - - - Format the given default message String resolving any - agrument placeholders found in them. - - The message to format. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The formatted message (with resolved arguments) - - - - Search through the given array of objects, find any - MessageSourceResolvable objects and resolve them. - - - Allows for messages to have MessageSourceResolvables as arguments. - - - The array of arguments for a message. - The with which the - resource is associated. - An array of arguments with any IMessageSourceResolvables resolved - - - - Gets the specified resource (e.g. Icon or Bitmap). - - The name of the resource to resolve. - - The to resolve the - code for. - - The resource if found. otherwise. - - - - Applies resources from the given name on the specified object. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Subclasses must implement this method to resolve a message. - - The code to lookup up, such as 'calculator.noRateSet'. - The with which the - resource is associated. - The resolved message from the backing store of message data. - - - - Resolves an object (typically an icon or bitmap). - - -

- Subclasses must implement this method to resolve an object. -

-
- The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - -
- - - Applies resources to object properties. - - -

- Subclasses must implement this method to apply resources - to an arbitrary object. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - Gets or Sets a value indicating whether to use the message code as - default message instead of throwing a NoSuchMessageException. - Useful for development and debugging. Default is "false". - - -

Note: In case of a IMessageSourceResolvable with multiple codes - (like a FieldError) and a MessageSource that has a parent MessageSource, - do not activate "UseCodeAsDefaultMessage" in the parent: - Else, you'll get the first code returned as message by the parent, - without attempts to check further codes.

-

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, - AbstractMessageSource contains special checks - to delegate to the internal GetMessageInternal method if available. - In general, it is recommended to just use "UseCodeAsDefaultMessage" during - development and not rely on it in production in the first place, though.

-

Alternatively, consider overriding the GetDefaultMessage - method to return a custom fallback message for an unresolvable code.

-
- - true if use the message code as default message instead of - throwing a NoSuchMessageException; otherwise, false. - -
- - - The parent message source used to try and resolve messages that - this object can't resolve. - - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - Convenient abstract superclass for - implementations that - draw their configuration from XML documents containing object - definitions as understood by an - . - - Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - class - with the given parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent context. -
- - - Instantiates and populates the underlying - with the object - definitions yielded up by the - method. - - - In the case of errors encountered while refreshing the object factory. - - - In the case of errors encountered reading any of the resources - yielded by the method. - - - - - - Initialize the object definition reader used for loading the object - definitions of this context. - - -

- The default implementation of this method is a no-op; i.e. it does - nothing. Can be overridden in subclasses to provide custom - initialization of the supplied - ; for example, a derived - class may want to turn off XML validation. -

-
- - The object definition reader used by this context. - -
- - - Load the object definitions with the given - . - - -

- The lifecycle of the object factory is handled by - ; - therefore this method is just supposed to load and / or register - object definitions. -

-
- - The reader containing object definitions. - - In case of object registration errors. - - - In the case of errors encountered reading any of the resources - yielded by either the or - the methods. - -
- - - Loads the object definitions into the given object factory, typically through - delegating to one or more object definition readers. - - The object factory to lead object definitions into - - - - - - Create a new reader instance for importing object definitions into the specified . - - the to be associated with the reader - a new instance. - - - - Customizes the internal object factory used by this context. - - Called for each attempt. -

- The default implementation is empty. Can be overriden in subclassses to customize - DefaultListableBeanFatory's standard settings. -

- The newly created object factory for this context -
- - - Create an internal object factory for this context. - - -

- Called for each attempt. - This default implementation creates a - - with the internal object factory of this context's parent serving - as the parent object factory. Can be overridden in subclasse,s - for example to customize DefaultListableBeanFactory's settings. -

-
- The object factory for this context. -
- - - Determine whether the given object name is already in use within this context's object factory, - i.e. whether there is a local object or alias registered under this name. - - - - - An array of resource locations, referring to the XML object - definition files that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of resource locations, or if none. - -
- - - An array of resources that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of s, or if none. - -
- - - Subclasses must return their internal object factory here. - - - The internal object factory for the application context. - - - - - - - implementation that passes the application context to object that - implement the - , - , and - interfaces. - - -

- If an object's class implements more than one of the - , - , and - interfaces, then the - order in which the interfaces are satisfied is as follows... - - - - - - - - - - - -

-

- Application contexts will automatically register this with their - underlying object factory. Applications should thus never need to use - this class directly. -

-
- Juergen Hoeller - Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - The that this - instance will work with. - - - - - Apply this - to the given new object instance before any object - initialization callbacks. - - - The new object instance. - - - The name of the object. - - - The 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. - - - 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. - - - - - - Convenient superclass for application objects that want to be aware of - the application context, e.g. for custom lookup of collaborating object - or for context-specific resource access. - - -

- It saves the application context reference and provides an - initialization callback method. Furthermore, it offers numerous - convenience methods for message lookup. -

-

- There is no requirement to subclass this class: it just makes things - a little easier if you need access to the context, e.g. for access to - file resources or to the message source. Note that many application - objects do not need to be aware of the application context at all, - as they can receive collaborating objects via object references. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) -
- - - To be implemented by any object that wishes to be notified - of the that it runs in. - - -

- Implementing this interface makes sense when an object requires access - to a set of collaborating objects. Note that configuration via object - references is preferable to implementing this interface just for object - lookup purposes. -

-

- This interface can also be implemented if an object needs access to - file resources, i.e. wants to call - , or access to - the . However, it is - preferable to implement the more specific - - interface to receive a reference to the - object in that scenario. -

-

- Note that dependencies can also - be exposed as object properties of the - type, populated via strings with - automatic type conversion performed by an object factory. This obviates - the need for implementing any callback interface just for the purpose - of accessing a specific file resource. -

-

- - is a convenience implementation of this interface for your - application objects. -

-

- For a list of all object lifecycle methods, see the overview for the - interface. -

-
- Rod Johnson - Mark Pollack (.NET) - - - -
- - - 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. - - -
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - The that this - object runs in. - -
- - - Intializes the wrapped - . - - -

- This is a template method that subclasses can override for custom - initialization behavior. -

-

- Gets called by the - - instance directly after setting the context instance. -

- - Does not get called on reinitialization of the context. - -
- - In the case of any initialization errors. - - - If thrown by application context methods. - -
- - - The context class that any context passed to the - - must be an instance of. - - - The - . - - - - - Return a for the - application context used by this object, for easy message access. - - - - - Gets or sets the that this - object runs in. - - - When passed an unexpected - implementation - instance that is not compatible with the - defined by the value of the - . - property. Also, thrown when trying to re-initialize with a - different than was - originally used. - - - If thrown by any application context methods. - - - - - - - Creates an instance - using context definitions supplied in a custom configuration and - configures the with that instance. - - - Implementations of the - interface must provide the following two constructors: - - - - A constructor that takes a string array of resource locations. - - - - - A constructor that takes a reference to a parent application context - and a string array of resource locations (and in that order). - - - -

- Note that if the type attribute is not present in the declaration - of a particular context, then a default - - is assumed. This default - - is currently the - ; please note the exact - of this default is an - implementation detail, that, while unlikely, may do so in the future. - to -

-
- -

- This is an example of specifying a context that reads its resources from - an embedded Spring.NET XML object configuration file... -

- - - - -
- - - - - - - - - -

- This is an example of specifying a context that reads its resources from - a custom configuration section within the same application / web - configuration file and uses case insensitive object lookups. -

-

- Please note that you must adhere to the naming - of the various sections (i.e. '<sectionGroup name="spring">' and - '<section name="context">'. -

- - - - -
-
- - - - - - - - - - - - -

- And this is an example of specifying a hierarchy of contexts. The - hierarchy in this case is only a simple parent->child hierarchy, but - hopefully it illustrates the nesting of context configurations. This - nesting of contexts can be arbitrarily deep, and is one way... child - contexts know about their parent contexts, but parent contexts do not - know how many child contexts they have (if any), or have references - to any such child contexts. -

- - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mark Pollack - Aleksandar Seovic - Rick Evans - - - - - Creates an instance - using the context definitions supplied in a custom - configuration section. - - -

- This instance is - also used to configure the . -

-
- - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - An instance - populated with the object definitions supplied in the configuration - section. - -
- - - Create all child-contexts in the given for the given context. - - The parent context to use - The current configContext - The list of child context elements - - - - Instantiates a new context. - - - - - Gets the context's name specified in the name attribute of the context element. - - The current configContext - The context element - - - - Extracts the context-type from the context element. - If none is specified, returns the parent's type. - - - - - Extracts the case-sensitivity attribute from the context element - - - - - Gets the context specified in the type - attribute of the context element. - - -

- If this attribute is not defined it defaults to the - type. -

-
- - If the context type does not implement the - interface. - -
- - - Returns the array of resources containing object definitions for - this context. - - - - - Returns the array of child contexts for this context. - - - - - The of - created if no type attribute is specified on a context element. - - - - - - Get the context's case-sensitivity to use if none is specified - - -

- Derived handlers may override this property to change their default case-sensitivity. -

-

- Defaults to 'true'. -

-
-
- - - Specifies, whether the instantiated context will be automatically registered in the - global . - - - - - Returns if the context should be lazily - initialized. - - - - - Constants defining the structure and values associated with the - schema for laying out Spring.NET contexts in XML. - - - - - Defines a single - . - - - - - Specifies a context name. - - - - - Specifies if context should be case sensitive or not. Default is true. - - - - - Specifies a . - - -

- Does not have to be fully assembly qualified, but its generally regarded - as better form if the names of one's objects - are specified explicitly. -

-
-
- - - Specifies whether context should be lazy initialized. - - - - - Defines an - - - - - Specifies the URI for an - . - - - - - Provides access to a central registry of - s. - - -

- A singleton implementation to access one or more application contexts. Application - context instances are cached. -

-

Note that the use of this class or similar is unnecessary except (sometimes) for - a small amount of glue code. Excessive usage will lead to code that is more tightly - coupled, and harder to modify or test. Consider refactoring your code to use standard - Dependency Injection techniques or implement the interface IApplicationContextAware to - obtain a reference to an application context.

-
- Mark Pollack - Aleksandar Seovic - -
- - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the ContextRegistry class. - - -

- Explicit static constructor to tell C# compiler - not to mark type as beforefieldinit. -

-
-
- - - Registers an instance of an - . - - -

- This is usually called via a - inside a .NET - application configuration file. -

-
- The application context to be registered. - - If a context has previously been registered using the same name - -
- - - Handles events raised by an application context. - - - - - - - Removes the context from the registry - - - Has no effect if the context wasn't registered - - ´the context to remove from the registry - - - - Returns the root application context. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The root application context. -
- - - Returns context based on specified name. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The context name. - The specified context, or null, if context with that name doesn't exists. - - If the context name is null or empty - -
- - - Removes all registered - s from this - registry. - - - Raises the event while still holding a lock on - - - - - Allows to check, if a context is already registered - - The context name. - true, if the context is already registered. false otherwise - - - - This event is fired, if ContextRegistry.Clear() is called.
- Clients may register to get informed -
- - This event is fired while still holding a lock on the Registry.
- 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used -
-
- - - Gets an object that should be used to synchronize access to ContextRegistry - from the calling code. - - - - - Default implementation of the - interface. - - -

- Provides easy ways to store all the necessary values needed to resolve - messages from an . -

-
- Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Describes objects that are suitable for message resolution in a - . - - -

- Spring.NET's own validation error classes implement this interface. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - -

- The last code will therefore be the default one. -

-
- - A array of codes which are associated - with this message. - -
- - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - Creates a new instance of the - class - using a single code. - - The message code to be resolved. - - - - Initializes a new instance of the class. - - The codes to be used to resolve this message - - - - Creates a new instance of the - class - using multiple codes. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - - - Creates a new instance of the - class - using multiple codes and a default message. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - The default message used if no code could be resolved. - - - - - Creates a new instance of the - class - from another resolvable. - - -

- This is the copy constructor for the - class. -

-
- - The to be copied. - - - If the supplied is . - -
- - - Returns a representation of this - . - - - A representation of this - . - - - - - Calls the visit method on the supplied - to output a version of this class. - - The visitor to use. - - A representation of this - . - - - - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - - A array of codes which are associated - with this message. - - - - - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - - Return the default code for this resolvable. - - - The default code of this resolvable; this will be the last code in - the codes array, or if this instance has no - codes. - - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - - Default section handler that can handle any configuration section. - - -

- Simply returns the configuration section as an . -

-
- Aleksandar Seovic -
- - - Returns the configuration section as an - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is a null reference. - - - The for the section. - - Config section as XmlElement. - - - - Empty implementation that - simply delegates all method calls to it's parent - . - - -

- If no parent is available, - no messages will be resolved (and a - will be thrown). -

-

- Used as placeholder by the - class, - if the context definition doesn't define its own - . Not intended for direct use - in applications. -

-
- Juergan Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - - Generic ApplicationContext implementation that holds a single internal - instance and does not - assume a specific object definition format. - - - Implements the interface in order - to allow for aplying any object definition readers to it. - Typical usage is to register a variety of object definitions via the - interface and then call - to initialize those - objects with application context semantics (handling - , auto-detecting - ObjectFactoryPostProcessors, etc). - - In contrast to other IApplicationContext implementations that create a new internal - IObjectFactory instance for each refresh, the internal IObjectFactory of this context - is available right from the start, to be able to register object definitions on it. - may only be called once - Usage examples - - GenericApplicationContext ctx = new GenericApplicationContext(); - // register your objects and object definitions - ctx.RegisterObjectDefinition(...) - ctx.Refresh(); - - - Mark Pollack - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true names in the context are case sensitive. - - - - Initializes a new instance of the class. - - The object factory instance to use for this context. - - - - Initializes a new instance of the class. - - The parent application context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - - - - Initializes a new instance of the class. - - The object factory to use for this context - The parent applicaiton context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - The object factory to use for this context - - - - Do nothing operation. We hold a single internal ObjectFactory and rely on callers - to register objects throug our public methods (or the ObjectFactory's). - - - In the case of errors encountered while refreshing the object factory. - - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - - - - Return the internal object factory of this application context. - - - - - - Gets the underlying object factory of this context, available for - registering object definitions. - - You need to call Refresh to initialize the - objects factory and its contained objects with application context - semantics (autodecting IObjectFactoryPostProcessors, etc). - The internal object factory (as DefaultListableObjectFactory). - - - - Helper class for easy access to messages from an - , providing various - overloaded GetMessage methods. - - -

- Available from - , but also - reusable as a standalone helper to delegate to in application objects. -

-
- Juergen Hoeller - Griffin Caprio (.NET) - - -
- - - Creates a new instance of the - class - that uses the current - for all locale specific lookups. - - - The to use to locate messages. - - - - - Creates a new instance of the - class - - - The to use to locate - messages. - - - The to use for - locale specific messages. - - - - - Retrieve the message for the given code and the default - . - - The code of the message. - The message. - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - The message. - - - - Retrieve the message for the given code and the default - . - - The code of the message. - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - . - - - The . - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - in the given - . - - - The . - - - The to use for - lookups. - - The message - - If the message could not be found. - - - - - Visitor class to represent - instances. - - -

- Used in the first instance to supply stringified versions of - instances. -

-

- Other methods can be added here to return different representations, - including XML, CSV, etc.. -

-
- Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - - - Outputs the supplied - as a nicely formatted . - - - The to output. - - - - - Configuration section handler for the (recommended, Spring.NET standard) parsers - config section. - - -

- Spring.NET allows the registration of custom configuration parsers that - can be used to create simplified configuration schemas that better - describe object definitions. -

-

- For example, Spring.NET uses this facility internally in order to - define simplified schemas for various AOP, Data and Services definitions. -

-
- -

- The following example shows how to configure both this section handler - and how to define custom configuration parsers within a Spring.NET - config section. -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Registers parsers specified in the (recommended, Spring.NET standard) - parsers config section with the . - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because parsers - are registered as a side-effect of this object's execution and there - is thus no need to return anything. - - - - - An that doesn't do a whole lot. - - -

- is an implementation of - the NullObject pattern. It should be used in those situations where a - needs to be passed (say to a - method) but where the resolution of messages is not required. -

-

- There should not (typically) be a need to instantiate instances of this class; - does not maintan any state - and the instance is - thus safe to pass around. -

-
- Aleksandar Seovic -
- - - The canonical instance of the - class. - - - - - Creates a new instance of the class. - - -

- Consider using - instead. -

-
-
- - - Simply returns the supplied message as-is. - - The code of the message to resolve. - - The to resolve the - code for. - - - The supplied message as-is. - - - - - Always returns . - - The code of the object to resolve. - - The to resolve the - code for. - - - (always). - - - - - Does nothing. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Handler for Spring.NET resourceHandlers config section. - - -

- Spring allows registration of custom resource handlers that can be used to load - object definitions from. -

-

- For example, if you wanted to store your object definitions in a database instead - of in the config file, you could write a custom implementation - and register it with Spring using 'db' as a protocol name. -

-

- Afterwards, you would simply specify resource URI within the context config element - using your custom resource handler. -

-
- -

- The following example shows how to configure both this section handler, - how to define custom resource within Spring config section, and how to load - object definitions using custom resource handler: -

- - - - -
- - - - - - - - - - - - - - Aleksandar Seovic - - - - - Registers resource handlers that are specified in - the resources config section with the . - - - The configuration settings in a corresponding parent - configuration section. Ignored. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns null, because resource handlers are registered - as a sideffect of its execution and there is no need to return anything. - - - - - An implementation that - accesses resources from .resx / .resource files. - - Note that for the method - GetResourceObject if the resource name resolves to null, then in - .NET 1.1 the return value will be String.Empty whereas - in .NET 2.0 it will return null. - Griffin Caprio (.NET) - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - - - - Defines a simple initialization callback for objects that need to to some - post-initialization logic after all of their dependencies have been injected. - - -

- An implementation of the - - method might perform some additional custom initialization (over and above that - performed by the constructor), or merely check that all mandatory properties - have been set (this last example is a very typical use case of this interface). -

- - The use of the - interface - by non-Spring.NET framework code can be avoided (and is generally - discouraged). The Spring.NET container provides support for a generic - initialization method given to the object definition in the object - configuration store (be it XML, or a database, etc). This requires - slightly more configuration (one attribute-value pair in the case of - XML configuration), but removes any dependency on Spring.NET from the - class definition. - -
- Rod Johnson - Rick Evans (.NET) - -
- - - 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. - -
- - - Creates a new instance of the - class. - - - - - Resolves a given code by searching through each assembly name in - the base names array. - - The code to resolve. - - The to use for lookups. - - The message from the resource set. - - - - Resolves a given code by searching through each assembly name in the array. - - The code to resolve. - - The to use for lookups. - - The object from the resource set. - - - - Uses a System.ComponentModel.ComponentResourceManager - to apply resources to object properties. - Resource key names are of the form objectName.propertyName - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - An object that contains the property values to be applied. - - - The base name of the object to use for the key lookup. - - - The to use for lookups. - If , uses the - value. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - - - Resolves a code into an object given a base name. - - The to search. - The code to resolve. - - The to use for lookups. - - The object from the resource file. - - - - Returns a representation of the - . - - A representation of the - . - - - - Invoked by an - after it has set all object properties supplied. - - -

- The list may contain objects of type or - . types - are converted to instances using the notation - resourcename, assembly partial name. -

-
- - If the conversion from a to a - can't be performed. - -
- - - The collection of s - in this . - - - - - that allows concrete registration of - objects and messages in code, rather than from external configuration sources. - - -

- Mainly useful for testing. -

-
- Rod Johnson - Griffin Caprio (.NET) -
- - - Creates a new instance of the StaticApplicationContext class. - - - - - Creates a new instance of the StaticApplicationContext class. - - The parent application context. - - - - Creates a new, named instance of the StaticApplicationContext class. - - the context name - The parent application context. - - - - Do nothing: we rely on callers to update our public methods. - - - - - Register a singleton object with the default object factory. - - The name of the object. - The of the object. - The property values for the singleton instance. - - - - Registers a prototype object with the default object factory. - - The name of the prototype object. - The of the prototype object. - The property values for the prototype instance. - - - - Associate the given message with the given code. - - The lookup code. - - The that the message should be found within. - - The message associated with the lookup code. - - - - Simple implementation of - that allows messages to be held in an object and added programmatically. - - -

- Mainly useful for testing. -

-

- This supports internationalization. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Creates a new instance of the - class. - - - - - Returns a format string. - - The code of the message to resolve. - - The to resolve the - code for. - - - A format string or if not found. - - - - - - Resolves an object (typically an icon or bitmap). - - The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - - - - - - Applies resources to object properties. - - -

- Uses a System.ComponentModel.ComponentResourceManager - internally to apply resources to object properties. Resource key - names are of the form objectName.propertyName. -

-

- This feature is not currently supported on version 1.0 of the .NET platform. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - -
- - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The message format associated with this lookup code. - - - - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The object associated with this lookup code. - - - - - Returns a representation of this - message source. - - - A containing all of this message - source's messages. - - - - - Configuration section handler for the Spring.NET typeAliases - config section. - - -

- Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

-

- This includes type names specified within an object definition, as well - as values of the properties or constructor arguments that expect - instances. -

-
- -

- The following example shows how to configure both this section handler and - how to define type aliases within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeAliases config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of this - object's execution and thus there is no need to return anything. - - - - - Configuration section handler for the Spring.NET typeConverters - config section. - - -

- Type converters are used to convert objects from one type into another - when injecting property values, evaluating expressions, performing data - binding, etc. -

-

- They are a very powerful mechanism as they allow Spring.NET to automatically - convert string-based property values from the configuration file into the appropriate - type based on the target property's type or to convert string values submitted - via a web form into a type that is used by your data model when Spring.NET data - binding is used. Because they offer such tremendous help, you should always provide - a type converter implementation for your custom types that you want to be able to use - for injected properties or for data binding. -

-

- The standard .NET mechanism for specifying type converter for a particular type is - to decorate the type with a , passing the type - of the -derived class as a parameter. -

-

- This mechanism will still work and is a preferred way of defining type converters if - you control the source code for the type that you want to define a converter for. However, - this configuration section allows you to specify converters for the types that you don't - control and it also allows you to override some of the standard type converters, such as - the ones that are defined for some of the types in the .NET Base Class Library. -

-
- -

- The following example shows how to configure both this section handler and - how to define type converters within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeConverters config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of - its execution and thus there is no need to return anything. - - - - - An implementation that - reads context definitions from XML based resources. - - -

- Currently, the resources that are supported are the file, - http, ftp, config and assembly resource - types. -

-

- You can provide custom implementations of the - interface and and register them - with any that inherits - from the - - interface. -

- - In case of multiple config locations, later object definitions will - override ones defined in previously loaded resources. This can be - leveraged to deliberately override certain object definitions via an - extra XML file. - -
- -

- Find below some examples of instantiating an - using a - variety of different XML resources. -

- - // an XmlApplicationContext that reads its object definitions from an - // XML file that has been embedded in an assembly... - IApplicationContext context = new XmlApplicationContext - ( - "assembly://AssemblyName/NameSpace/ResourceName" - ); - - // an XmlApplicationContext that reads its object definitions from a - // number of disparate XML resources... - IApplicationContext context = new XmlApplicationContext - ( - // from an XML file that has been embedded in an assembly... - "assembly://AssemblyName/NameSpace/ResourceName", - // and from a (relative) filesystem-based resource... - "file://Objects/services.xml", - // and from an App.config / Web.config resource... - "config://spring/objects" - ); - -
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - -
- - - Initializes a new instance of the XmlApplicationContext class. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The created context will be case sensitive. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - This constructor is meant to be used by derived classes. By passing =false, it is - the responsibility of the deriving class to call to initialize the context instance. - - if true, is called automatically. - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - An array of resource locations, referring to the XML object - definition files with which this context is to be built. - - - An array of resource locations, or if none. - - - - - - An array of resources instances with which this context is to be built. - - - An array of s, or if none. - - - - - - Encapsulates arguments to the class. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - - - - Initializes a new instance of the XmlApplicationContextArgs class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - if set to true [case sensitive]. - if set to true [refresh]. - - - Exception thrown during application context initialization. - Rod Johnson - Mark Pollack (.NET) - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Marks an interface as being an application event listener. - - Griffin Caprio - - - - - Creates a new instance of the - class. - - - - - The callback for application events. - - - - - To be implemented by any object that wishes to be notified - of the associated with it. - - -

- In the current implementation, the - will typically be the - associated that - spawned the implementing object. -

-

- The can usually also be - passed on as an object reference to arbitrary object properties or - constructor arguments, because a - is typically defined as an - object with the well known name "messageSource" in the - associated application context. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Sets the associated - with this object. - - -

- Invoked after population of normal object properties but - before an initializing callback such as the - - method of the - interface - or a custom init-method. -

-

- It is also invoked before the - - property of any - - implementation. -

-
- - The associated - with this object. - -
- - - Interface to be implemented by any object that wishes to be notified - of the (typically the - ) that it runs in. - - -

- Note that dependencies can also - be exposed as object properties of type - , populated via strings with - automatic type conversion by the object factory. This obviates the - need for implementing any callback interface just for the purpose of - accessing a specific resource. -

-

- You typically need an - when your application object has to access a variety of file resources - whose names are calculated. A good strategy is to make the object use - a default resource loader but still implement the - interface to allow - for overriding when running in an - . -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Sets the - that this object runs in. - - -

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

-
-
- - - Thrown when a message cannot be resolved. - - Rod Johnson - Mark Pollack (.NET) - - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class with the - specified message. - - - 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. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for given culture. - - - The that was used - to search for the code. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for the current UI culture. - - - - - Convenience base class for - implementations, pre-implementing typical behavior. - - -

- The method will - check whether a or - can be opened; - will always return - ; - and - throw an exception; - and will - return the value of the - property. -

-
- Juergen Hoeller - Rick Evans (.NET) - Aleksandar Seovic (.NET) - -
- - - The central abstraction for Spring.NET's access to resources such as - s. - - -

- This interface encapsulates a resource descriptor that abstracts away - from the underlying type of resource; possible resource types include - files, memory streams, and databases (this list is not exhaustive). -

-

- A can definitely be opened and accessed - for every such resource; if the resource exists in a physical form (for - example, the resource is not an in-memory stream or one that has been - extracted from an assembly or ZIP file), a or - can also be accessed. The actual - behavior is implementation-specific. -

-

- This interface, when used in tandem with the - interface, forms the backbone of - Spring.NET's resource handling. Third party extensions or libraries - that want to integrate external resources with Spring.NET's IoC - container are encouraged expose such resources via this abstraction. -

-

- Interfaces cannot obviously mandate implementation, but derived classes - are strongly encouraged to expose a constructor that takes a - single as it's sole argument (see example). - Exposing such a constructor will make your custom - implementation integrate nicely - with the class. -

-
- Juergen Hoeller - Rick Evans (.NET) - - -
- - - Simple interface for objects that are sources for - s. - - -

- This is the base interface for the abstraction encapsulated by - Spring.NET's interface. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Return an for this resource. - - - - Clients of this interface must be aware that every access of this - property will create a fresh ; - it is the responsibility of the calling code to close any such - . - - - - An . - - - If the stream could not be opened. - - - - - Creates a resource relative to this resource. - - - The path (always resolved as relative to this resource). - - - The relative resource. - - - If the relative resource could not be created from the supplied - path. - - - If the resource does not support the notion of a relative path. - - - - - Does this resource represent a handle with an open stream? - - -

- If , the - cannot be read multiple times, and must be read and then closed to - avoid resource leaks. -

-

- Will be for all usual resource descriptors. -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - -
- - - Returns a handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available on a filesystem, or cannot be - exposed as a handle. - - - -
- - - Returns a description for this resource. - - -

- The description is typically used for diagnostics and other such - logging when working with the resource. -

-

- Implementations are also encouraged to return this value from their - method. -

-
- - A description for this resource. - -
- - - Does this resource actually exist in physical form? - - -

- An example of a resource that physically exists would be a - file on a local filesystem. An example of a resource that does not - physically exist would be an in-memory stream. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - The default special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - A string representation of the resource. - - - If the supplied is - or contains only whitespace character(s). - -
- - - Strips any protocol name from the supplied - . - - -

- If the supplied does not - have any protocol associated with it, then the supplied - will be returned as-is. -

-
- - - GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); - // returns www.mycompany.com/resource.txt - - - - The name of the resource. - - - The name of the resource without the protocol name. - -
- - - Resolves the supplied to its value - sans any leading protocol. - - - The name of the resource. - - - The name of the resource without the protocol name. - - - - - - Resolves the presence of the - value - in the supplied into a path. - - -

- The default implementation simply returns the supplied - as is. -

-
- - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - -
- - - This implementation returns the - of this resource. - - - - - - Determines whether the specified is - equal to the current . - - -

- This implementation compares values. -

-
- -
- - - Serves as a hash function for a particular type, suitable for use - in hashing algorithms and data structures like a hash table. - - -

- This implementation returns the hashcode of the - property. -

-
- -
- - - Factory Method. Create a new instance of the current resource type using the given resourceName - - - - - The ResourceLoader to be used for resolving relative resources - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Creates a new resource that is relative to this resource based on the - supplied . - - -

- This method can accept either a fully qualified resource name or a - relative resource name as it's parameter. -

-

- A fully qualified resource is one that has a protocol prefix and - all elements of the resource name. All other resources are treated - as relative to this resource, and the following rules are used to - locate a relative resource: -

- - - If the starts with '..', - the current resource path is navigated backwards before the - is concatenated to the current - of - this resource. - - - If the starts with '/', the - current resource path is ignored and a new resource name is - appended to the - of - this resource. - - - If the starts with '.' or a - letter, a new path is appended to the current - of - this resource. - - -
- - The name of the resource to create. - - The relative resource. - - If the process of resolving the relative resource yielded an - invalid URI. - - - If this resource does not support the resolution of relative - resources (as determined by the value of the - - property). - - -
- - - Calculates a new resource path based on the supplied - . - - - The relative path to evaluate. - - The newly calculated resource path. - - - - The special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
- -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the protocol associated with this resource (if any). - - -

- The value of this property may be if no - protocol is associated with the resource type (for example if the - resource is a memory stream). -

-
- - The protocol associated with this resource (if any). - -
- - - Does this resource represent a handle with an open stream? - - -

- This, the default implementation, always returns - . -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - - - - - Returns a handle for this resource. - - -

- This, the default implementation, always throws a - , assuming that the - resource cannot be resolved to an absolute file path. -

-
- - The handle for this resource. - - - This implementation always throws a - . - - - -
- - - Does this resource actually exist in physical form? - - -

- This implementation checks whether a - can be opened, falling back to whether a - can be opened. -

-

- This will cover both directories and content resources. -

-

- This implementation will also return if - permission to the (file's) path is denied. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - Does this support relative - resource retrieval? - - -

- This property is generally to be consulted prior to attempting - to attempting to access a resource that is relative to this - resource (via a call to - ). -

-

- This, the default implementation, always returns - . -

-
- - if this - supports relative resource - retrieval. - -
- - - Gets the root location of the resource. - - -

- Where root resource can be taken to mean that part of the resource - descriptor that doesn't change when a relative resource is looked - up. Examples of such a root location would include a drive letter, - a web server name, an assembly name, etc. -

-
- - The root location of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets the current path of the resource. - - -

- An example value of this property would be the name of the - directory containing a filesystem based resource. -

-
- - The current path of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets those characters that are valid path separators for the - resource type. - - -

- An example value of this property would be the - and - values for a - filesystem based resource. -

-

- Any derived classes that override this method are expected to - return a new array for each access of this property. -

-
- - Those characters that are valid path separators for the resource - type. - - - This, the default implementation, always throws a - . - -
- - - An implementation for - resources stored within assemblies. - - -

- This implementation expects any resource name passed to the - constructor to adhere to the following format: -

-

- assembly://assemblyName/namespace/resourceName -

-
- Aleksandar Seovic (.NET) - Federico Spinazzi (.NET) -
- - - Creates a new instance of the - class. - - - The name of the assembly resource. - - - If the supplied did not conform - to the expected format. - - - If the assembly specified in the supplied - was loaded twice with two - different evidences. - - - If the assembly specified in the supplied - could not be found. - - - If the caller does not have the required permission to load - the assembly specified in the supplied - . - - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the caller does not have the required permission to load - the underlying assembly's manifest. - - - - - - - Does the embedded resource specified in the value passed to the - constructor exist? - - - if this resource actually exists in physical - form (for example on a filesystem). - - - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (the assembly name in this - case). - - - The root location of the resource. - - - - - - Gets the current path of the resource (the namespace in which the - target resource was embedded in this case). - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - - - - Used when retrieving information from the standard .NET configuration - files (App.config / Web.config). - - -

- If created with the name of a configuration section, then all methods - aside from the description return , - , or throw an exception. If created with an - , then the - property - will return a corresponding to parse. -

-
- Mark Pollack - Rick Evans -
- - - Creates new instance of the - class. - - - The actual XML configuration section. - - - If the supplied is . - - - - - Creates new instance of the - class. - - - The name of the configuration section. - - - If the supplied is - or contains only whitespace character(s). - - - - - Returns the handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a description for this resource (the name of the - configuration section in this case). - - - A description for this resource. - - - - - - Does this resource actually exist in physical form? - - -

- This implementation always returns . -

-
- - - - - -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Exposes the actual for the - configuration section. - - -

- Introduced to accomodate line info tracking during parsing. -

-
-
- - - Holder that combines with a specific encoding to be used for reading - from the resource - - Juergen Hoeller - Erich Eichinger (.NET) - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - the resource to read from. Must not be null - whether to autoDetect encoding from byte-order marks () - - - - Create an encoded resource using the specified encoding. - - the resource to read from. Must not be null - the encoding to use. If null, encoding will be autodetected. - whether to autoDetect encoding from byte-order marks () - - - - - - - - - - Determine whether equals this instance. - - - true if obj is an and both - , and are equal. - - - - - Calculate the unique hash code for this instance. - - - - - - Get a textual description of the resource. - - - - - Get the underlying resource - - - - - Get the encoding to use for reading, if any. May be null - - - - - whether to autoDetect encoding from byte-order marks () - - - - - A backed resource. - - -

- Supports resolution as both a and a - . -

-

- Also supports the use of the ~ character. If the ~ character - is the first character in a resource path (sans protocol), the ~ - character will be replaced with the value of the - System.AppDomain.CurrentDomain.BaseDirectory property (an example of - this can be seen in the examples below). -

-
- -

- Consider the example of an application that is running (has been launched - from) the C:\App\ directory. The following resource paths will map - to the following resources on the filesystem... -

- - strings.txt C:\App\strings.txt - ~/strings.txt C:\App\strings.txt - file://~/strings.txt C:\App\strings.txt - file://~/../strings.txt C:\strings.txt - ../strings.txt C:\strings.txt - ~/../strings.txt C:\strings.txt - - // note that only a leading ~ character is resolved to the executing directory... - stri~ngs.txt C:\App\stri~ngs.txt - -
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - If the supplied is - or contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - Supresses initialization of this instance. Used from derived classes. - - - If the supplied is - or contains only whitespace character(s). - - - - - Initializes this instance. - - - - - - Resolves the handle - for the supplied . - - - The name of the file system resource. - - - The handle for this resource. - - - - - Resolves the root location for the supplied . - - - The name of the file system resource. - - - The root location of the resource. - - - - - Resolves the path for the supplied . - - - The name of the file system resource. - - - The current path of the resource. - - - - - Resolves the presence of the - value - in the supplied into a path. - - - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the underlying handle for - this resource. - - - The handle for this resource. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (a drive or UNC file share - name in this case). - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the underlying file could not be found. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - adapter implementation for a - . - - -

- Should only be used if no other - implementation is applicable. -

-

- In contrast to other - implementations, this is an adapter for an already opened - resource - the - therefore always returns . Do not use this class - if you need to keep the resource descriptor somewhere, or if you need - to read a stream multiple times. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The input to use. - - - Where the input comes from. - - - If the supplied is - . - - - - - The input to use. - - - If the underlying has already - been read. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Custom type converter for instances. - - -

- A resource path may contain placeholder variables of the form ${...} - that will be expended to environment variables. -

-

- Currently only supports conversion from a - instance. -

-
- -

- On Win9x boxes, this resource path, ${userprofile}\objects.xml will - be expanded at runtime with the value of the 'userprofile' environment - variable substituted for the '${userprofile}' portion of the path. -

- - // assuming a user called Rick, running on a plain vanilla Windows XP setup... - // this resource path... - - ${userprofile}\objects.xml - - // will become (after expansion)... - - C:\Documents and Settings\Rick\objects.xml - -
- Mark Pollack - - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified resourceLoader. - - the underlying IResourceLoader to be used to resolve resources - - - - Returns whether this converter can convert an object of one - to a - - - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - - - - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An if successful. - - - If the resource name objectained form the supplied - is malformed. - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - Resolve the given path, replacing placeholder values with - corresponding property values if necessary. - - -

- This implementation resolves environment variables only. -

-
- The original resource path. - The resolved resource path. -
- - - Return the used to - resolve the string. - - - The used to resolve - the string. - - - - - Registry class that allows users to register and retrieve protocol handlers. - - - - Resource handler is an implementation of interface - that should be used to process resources with the specified protocol. - - - They are used throughout the framework to access resources from various - sources. For example, application context loads object definitions from the resources - that are processed using one of the registered resource handlers. - - Following resource handlers are registered by default: - - - Protocol - Handler Type - Description - - - config - - Resolves the resources by loading specified configuration section from the standard .NET config file. - - - file - - Resolves filesystem resources. - - - http - - Resolves remote web resources. - - - https - - Resolves remote web resources via HTTPS. - - - ftp - - Resolves ftp resources. - - - assembly - - Resolves resources that are embedded into an assembly. - - - web - Spring.Core.IO.WebResource, Spring.Web* - Resolves resources relative to the web application's virtual directory. - - - * only available in web applications. - - Users can create and register their own protocol handlers by implementing interface - and mapping custom protocol name to that implementation. See for details - on how to register custom protocol handler. - - - Aleksandar Seovic - - - - Name of the .Net config section that contains definitions - for custom resource handlers. - - - - - Registers standard and user-configured resource handlers. - - - - - Returns resource handler for the specified protocol name. - - - - This method returns object that should be used - to create an instance of the -derived type by passing - resource location as a parameter. - - - Name of the protocol to get the handler for. - Resource handler constructor for the specified protocol name. - If is null. - - - - Returns true if a handler is registered for the specified protocol, - false otherwise. - - Name of the protocol. - - true if a handler is registered for the specified protocol, false otherwise. - - If is null. - - - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The type name of the concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Allows to create any arbitrary Url format - - - - - A adapter implementation encapsulating a simple string. - - Erich Eichinger - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Get the to - for accessing this resource. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Gets the encoding used to create a byte stream of the string. - - - - - Gets the content encapsulated by this . - - - - - A backed resource - on top of - - -

- Obviously supports resolution as a , and also - as a in the case of the "file:" - protocol. -

-
- -

- Some examples of the strings that can be used to initialize a new - instance of the class - include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) - - - -
- - - Creates a new instance of the - class. - - -

- Some examples of the values that the - can typically be expected to hold include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- - A string representation of the resource. - -
- - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the instance - used for the resource resolution. - - - A instance. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - Returns a handle for this resource. - - - The handle for this resource. - - - If the resource is not available on a filesystem. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource. - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Converts string representation of a credential for Web client authentication - into an instance of . - - -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. -

- - - - - - -
- Bruno Baia -
- - - Can we convert from the sourcetype - to a instance ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A instance if successful. - - - - - A custom for any - primitive numeric type such as , - , , etc. - - -

- Can use a given for - (locale-specific) parsing and rendering. -

-

- This is not meant to be used as a system - but rather as a - locale-specific number converter within custom controller code, to - parse user-entered number strings into number properties of objects, - and render them in a UI form. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The primitive numeric to convert to. - - - The to use for - (locale-specific) parsing and rendering - - - Is an empty string allowed to be converted? If - , an empty string value will be converted to - numeric 0. - - Id the supplied is not a primitive - . - - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - -
- - - Converts the specified object (a string) to the required primitive - type. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - A primitive representation of the string value. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Custom implementation for - objects. - - -

- Handles conversion from an XML formatted string to a - object - (see below for an example of the expected XML format). -

-

- This converter must be registered before it will be available. Standard - converters in this namespace are automatically registered by the - class. -

-
- -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. Note that the name of the top level - (document) element is quite arbitrary... it is only the content that - matters (and which must be in the format - <add key="..." value="..."/>. For your continued sanity - though, you may wish to standardize on the top level name of - 'dictionary' (although you are of course free to not do so). -

- - - - - - -

- The following example uses a different top level (document) element - name, but is equivalent to the first example. -

- - - - - - -
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from an - XML formatted instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - - - - Converts string representation of a regular expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts string representation of the registry key - into instance. - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Generates partial registry key name. - - - Key elements. - - - Index of the last element to use. - - - Friendly key name containing key element from - 0 to , inclusive. - - - - - Returns for the specified - root hive name. - - - Root hive name. - - - Registry key for the specified name. - - - - - Converts a two part string, (resource name, assembly name) - to a ResourceManager instance. - - - - - This constant represents the name of the folder/assembly containing global resources. - - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - If the specified does not denote a valid resource - - - - Converter for from a comma separated - list of RBG values. - - -

- Please note that this class does not implement converting - to a comma separated list of RBG values from a - . -

-
- Federico Spinazzi -
- - - Returns whether this converter can convert an object of one - to a - . - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Converts the specified object (a string) a - instance. - - - A - that provides a format context. - - - The to use - as the current culture: currently ignored. - - - The value that is to be converted, in "R,G,B", "A,R,G,B", or - symbolic color name (). - - - A representation of the string value. - - - If the input string is not in a supported format, or is not one of the - predefined system colors (). - - - - - A custom for - runtime type references. - - -

- Currently only supports conversion to and from a - . -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to the - of this converter. - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Returns whether this converter can convert the object to the specified - . - - - A - that provides a format context. - - - A that represents the - you want to convert to. - - True if the conversion is possible. - - - - Converts the given value to the type of this converter. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An that represents the converted value. - - - - - Converts the given value object to the specified type, - using the specified context and culture information. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - The to convert the - parameter to. - - - An that represents the converted value. - - - - - Converter for to directly set a - property. - - Jurgen Hoeller - Mark Pollack (.NET) - - - - Create a new StreamConverter using the default - . - - - - - Create a new StreamConverter using the given - . - - - The to use. - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts a separated to a - array. - - -

- Defaults to using the , (comma) as the list separator. Note that the value - of the current is - not used. -

-

- If you want to provide your own list separator, you can set the value of the - - property to the value that you want. Please note that this value will be used - for all future conversions in preference to the default list separator. -

-

- Please note that the individual elements of a string will be passed - through as is (i.e. no conversion or trimming of surrounding - whitespace will be performed). -

-

- This should be - automatically registered with any - implementations. -

-
- - - public class StringArrayConverterExample - { - public static void Main() - { - StringArrayConverter converter = new StringArrayConverter(); - - string csvWords = "This,Is,It"; - string[] frankBoothWords = converter.ConvertFrom(csvWords); - - // the 'frankBoothWords' array will have 3 elements, namely - // "This", "Is", "It". - - // please note that extraneous whitespace is NOT trimmed off - // in the current implementation... - string csv = " Cogito ,ergo ,sum "; - string[] descartesWords = converter.ConvertFrom(csv); - - // the 'descartesWords' array will have 3 elements, namely - // " Cogito ", "ergo ", "sum ". - // notice how the whitespace has NOT been trimmed. - } - } - - - -
- - - Can we convert from a the sourcetype to a array? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to a - array. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - The value that will be used as the list separator when performing - conversions. - - - A 'single' string character that will be used as the list separator - when performing conversions. - - - If the supplied value is not and is an empty - string, or has more than one character. - - - - - Base parser for custom specifiers. - - - - - Convert int value to a Timespan based on the specifier - - - - - - - Check if the string contains the specifier and - - - - - - - Specifier - - - - - Recognize 10d as ten days - - - - - Parse value as days - - Timespan in days - - - - - Day specifier: d - - - - - Recognize 10h as ten hours - - - - - Parse value as hours - - Timespan in hours - - - - - Hour specifier: h - - - - - Recognize 10m as ten minutes - - - - - Parse value as minutes - - Timespan in minutes - - - - - Minute specifier: m - - - - - Recognize 10s as ten seconds - - - - - Parse value as seconds - - Timespan in seconds - - - - - Second specifier: s - - - - - Recognize 10ms as ten milliseconds - - - - - Parse value as milliseconds - - Timespan in milliseconds - - - - - Millisecond specifier: ms - - - - - Converter for instances. - - Bruno Baia - Roberto Paterlini - - - - Creates a new instance of the - class. - - - - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Utility methods that are used to convert objects from one type into another. - - Aleksandar Seovic - - - - Convert the value to the required (if necessary from a string). - - The proposed change value. - - The we must convert to. - - Property name, used for error reporting purposes... - - If there is an internal error. - - The new value, possibly the result of type conversion. - - - - Utility method to create a property change event. - - - The full name of the property that has changed. - - The property old value - The property new value - - A new . - - - - - Determines if a Type implements a specific generic interface. - - Candidate to evaluate. - The to test for in the Candidate . - if a match, else - - - - Registry class that allows users to register and retrieve type converters. - - Aleksandar Seovic - - - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - Registers standard and configured type converters. - - - - - Returns for the specified type. - - Type to get the converter for. - a type converter for the specified type. - If is null. - - - - Registers for the specified type. - - Type to register the converter for. - Type converter to register. - If either of arguments is null. - - - - Registers for the specified type. - - - This is a convinience method that accepts the names of both - type to register converter for and the converter itself, - resolves them using , creates an - instance of type converter and calls overloaded - method. - - Type name of the type to register the converter for (can be a type alias). - Type name of the type converter to register (can be a type alias). - If either of arguments is null or empty string. - - If either of arguments fails to resolve to a valid . - - - If type converter does not derive from or if it cannot be instantiated. - - - - - Converts between instances of and their string representations. - - Erich Eichinger - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A that provides a format context. - - - A that represents the you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful, otherwise. - - The conversion cannot be performed. - - - - Returns whether this converter can convert the object to the specified type, using the specified context. - - An that provides a format context. - A that represents the type you want to convert to. - - true if this converter can perform the conversion; otherwise, false. - - - At the moment only conversion to string is supported. - - - - - Converts the given value object to the specified type, using the specified context and culture information. - - - - An that represents the converted value. - - - A . If null is passed, the current culture is assumed. - An that provides a format context. - The to convert the value parameter to. - The to convert. - The conversion cannot be performed. - The destinationType parameter is null. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Resolves (instantiates) a by it's (possibly - assembly qualified) name, and caches the - instance against the type name. - - Rick Evans - Bruno Baia - Erich Eichinger - - - - Resolves a by name. - - -

- The rationale behind the creation of this interface is to centralise - the resolution of type names to instances - beyond that offered by the plain vanilla - method call. -

-
- Rick Evans -
- - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - The cache, mapping type names ( instances) against - instances. - - - - - Creates a new instance of the class. - - - The that this instance will delegate - actual resolution to if a - cannot be found in this instance's cache. - - - If the supplied is . - - - - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holder for the generic arguments when using type parameters. - - -

- Type parameters can be applied to classes, interfaces, - structures, methods, delegates, etc... -

-
-
- - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The character that separates a list of generic arguments. - - - - - Creates a new instance of the GenericArgumentsHolder class. - - - The string value to parse looking for a generic definition - and retrieving its generic arguments. - - - - - Returns the array declaration portion of the definition, e.g. "[,]" - - - - - - Returns an array of unresolved generic arguments types. - - -

- A empty string represents a type parameter that - did not have been substituted by a specific type. -

-
- - An array of strings that represents the unresolved generic - arguments types or an empty array if not generic. - -
- - - The (unresolved) generic type name portion - of the original value when parsing a generic type. - - - - - The (unresolved) generic method name portion - of the original value when parsing a generic method. - - - - - Is the string value contains generic arguments ? - - -

- A generic argument can be a type parameter or a type argument. -

-
-
- - - Is generic arguments only contains type parameters ? - - - - - Is this an array type definition? - - - - - Resolves a generic by name. - - Bruno Baia - - - - Resolves a by name. - - Rick Evans - Aleksandar Seovic - Bruno Baia - - - - Resolves the supplied to a - instance. - - - The unresolved (possibly partially assembly qualified) name - of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Uses - to load an and then the attendant - referred to by the - parameter. - - -

- is - deprecated in .NET 2.0, but is still used here (even when this class is - compiled for .NET 2.0); - will - still resolve (non-.NET Framework) local assemblies when given only the - display name of an assembly (the behaviour for .NET Framework assemblies - and strongly named assemblies is documented in the docs for the - method). -

-
- - The assembly and type to be loaded. - - - A , or . - - - - -
- - - Uses - to load the attendant referred to by - the parameter. - - - The type to be loaded. - - - A , or . - - - - - Creates a new instance - from the given - - - - - Creates a new instance - from the given with the given inner - - - - - Resolves the supplied generic to a - instance. - - - The unresolved (possibly generic) name of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holds data about a and it's - attendant . - - - - - The string that separates a name - from the name of it's attendant - in an assembly qualified type name. - - - - - Creates a new instance of the TypeAssemblyHolder class. - - - The unresolved name of a . - - - - - The (unresolved) type name portion of the original type name. - - - - - The (unresolved, possibly partial) name of the attandant assembly. - - - - - Is the type name being resolved assembly qualified? - - - - - Provides access to a central registry of aliased s. - - -

- Simplifies configuration by allowing aliases to be used instead of - fully qualified type names. -

-

- Comes 'pre-loaded' with a number of convenience alias' for the more - common types; an example would be the 'int' (or 'Integer' - for Visual Basic.NET developers) alias for the - type. -

-
- Aleksandar Seovic - -
- - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - The alias around the 'int' type. - - - - - The alias around the 'Integer' type (Visual Basic.NET style). - - - - - The alias around the 'int[]' array type. - - - - - The alias around the 'Integer()' array type (Visual Basic.NET style). - - - - - The alias around the 'decimal' type. - - - - - The alias around the 'Decimal' type (Visual Basic.NET style). - - - - - The alias around the 'decimal[]' array type. - - - - - The alias around the 'Decimal()' array type (Visual Basic.NET style). - - - - - The alias around the 'char' type. - - - - - The alias around the 'Char' type (Visual Basic.NET style). - - - - - The alias around the 'char[]' array type. - - - - - The alias around the 'Char()' array type (Visual Basic.NET style). - - - - - The alias around the 'long' type. - - - - - The alias around the 'Long' type (Visual Basic.NET style). - - - - - The alias around the 'long[]' array type. - - - - - The alias around the 'Long()' array type (Visual Basic.NET style). - - - - - The alias around the 'short' type. - - - - - The alias around the 'Short' type (Visual Basic.NET style). - - - - - The alias around the 'short[]' array type. - - - - - The alias around the 'Short()' array type (Visual Basic.NET style). - - - - - The alias around the 'unsigned int' type. - - - - - The alias around the 'unsigned long' type. - - - - - The alias around the 'ulong[]' array type. - - - - - The alias around the 'uint[]' array type. - - - - - The alias around the 'unsigned short' type. - - - - - The alias around the 'ushort[]' array type. - - - - - The alias around the 'double' type. - - - - - The alias around the 'Double' type (Visual Basic.NET style). - - - - - The alias around the 'double[]' array type. - - - - - The alias around the 'Double()' array type (Visual Basic.NET style). - - - - - The alias around the 'float' type. - - - - - The alias around the 'Single' type (Visual Basic.NET style). - - - - - The alias around the 'float[]' array type. - - - - - The alias around the 'Single()' array type (Visual Basic.NET style). - - - - - The alias around the 'DateTime' type. - - - - - The alias around the 'DateTime' type (C# style). - - - - - The alias around the 'DateTime' type (Visual Basic.NET style). - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime()' array type (Visual Basic.NET style). - - - - - The alias around the 'bool' type. - - - - - The alias around the 'Boolean' type (Visual Basic.NET style). - - - - - The alias around the 'bool[]' array type. - - - - - The alias around the 'Boolean()' array type (Visual Basic.NET style). - - - - - The alias around the 'string' type. - - - - - The alias around the 'string' type (Visual Basic.NET style). - - - - - The alias around the 'string[]' array type. - - - - - The alias around the 'string[]' array type (Visual Basic.NET style). - - - - - The alias around the 'object' type. - - - - - The alias around the 'object' type (Visual Basic.NET style). - - - - - The alias around the 'object[]' array type. - - - - - The alias around the 'object[]' array type (Visual Basic.NET style). - - - - - The alias around the 'int?' type. - - - - - The alias around the 'int?[]' array type. - - - - - The alias around the 'decimal?' type. - - - - - The alias around the 'decimal?[]' array type. - - - - - The alias around the 'char?' type. - - - - - The alias around the 'char?[]' array type. - - - - - The alias around the 'long?' type. - - - - - The alias around the 'long?[]' array type. - - - - - The alias around the 'short?' type. - - - - - The alias around the 'short?[]' array type. - - - - - The alias around the 'unsigned int?' type. - - - - - The alias around the 'unsigned long?' type. - - - - - The alias around the 'ulong?[]' array type. - - - - - The alias around the 'uint?[]' array type. - - - - - The alias around the 'unsigned short?' type. - - - - - The alias around the 'ushort?[]' array type. - - - - - The alias around the 'double?' type. - - - - - The alias around the 'double?[]' array type. - - - - - The alias around the 'float?' type. - - - - - The alias around the 'float?[]' array type. - - - - - The alias around the 'bool?' type. - - - - - The alias around the 'bool?[]' array type. - - - - - Registers standard and user-configured type aliases. - - - - - Registers an alias for the specified . - - -

- This overload does eager resolution of the - referred to by the parameter. It will throw a - if the referred - to by the parameter cannot be resolved. -

-
- - A string that will be used as an alias for the specified - . - - - The (possibly partially assembly qualified) name of the - to register the alias for. - - - If either of the supplied parameters is or - contains only whitespace character(s). - - - If the referred to by the supplied - cannot be loaded. - -
- - - Registers short type name as an alias for - the supplied . - - - The to register. - - - If the supplied is . - - - - - Registers an alias for the supplied . - - - The alias for the supplied . - - - The to register the supplied under. - - - If the supplied is ; or if - the supplied is or - contains only whitespace character(s). - - - - - Resolves the supplied to a . - - - The alias to resolve. - - - The the supplied was - associated with, or if no - was previously registered for the supplied . - - - If the supplied is or - contains only whitespace character(s). - - - - - Returns a flag specifying whether TypeRegistry contains - specified alias or not. - - - Alias to check. - - - true if the specified type alias is registered, - false otherwise. - - - - - Helper methods with regard to type resolution. - - -

- Not intended to be used directly by applications. -

-
- Bruno Baia -
- - - Creates a new instance of the class. - - -

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

-
-
- - - Resolves the supplied type name into a - instance. - - -

- If you require special resolution, do - not use this method, but rather instantiate - your own . -

-
- - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the type cannot be resolved. - -
- - - Resolves a string array of interface names to - a array. - - - An array of valid interface names. Each name must include the full - interface and assembly name. - - An array of interface s. - - If any of the interfaces can't be loaded. - - - If any of the s specified is not an interface. - - - If (or any of its elements ) is - . - - - - - Match a method against the given pattern. - - the pattern to match against. - the method to match. - - if the method matches the given pattern; otherwise . - - - If the supplied is invalid. - - - - - Exception thrown when the ObjectFactory cannot load the specified type of a given object. - - Mark Pollack - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Initializes 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. - - - - - Initializes a new instance of the class. - - The resource description that the object definition came from. - Name of the object requested - Name of the object type. - The root cause. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Gets he name of the object we are trying to load. - - The name of the object. - - - - Gets the name of the object type we are trying to load. - - The name of the object type. - - - - Gets the resource description that the object definition came from - - The resource description. - - - - A implementation that represents - a composed collection of instances. - - - - - The criteria for an arbitrary filter. - - Rick Evans - - - - Does the supplied satisfy the criteria - encapsulated by this instance? - - - The datum to be checked by this criteria instance. - - - if the supplied - satisfies the criteria encapsulated by this instance; - if not, or the supplied - is . - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A user-defined (child) criteria that will be composed into this instance. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The data to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Adds the supplied into the criteria - composed within this instance. - - - The to be added. - - - - - The list of composing this - instance. - - - - - Factory class to conceal any default implementation. - - Rod Johnson - Simon White (.NET) - - - - Creates a new instance of the - implementation provided by this factory. - - - A new instance of the - implementation provided by this factory. - - - - - Interface to be implemented by objects that can return information about - the current call stack. - - -

- Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - The to look for. - - - if the caller is under the supplied . - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - - The to look for. - - The name of the method to look for. - - if the caller is under the supplied - and . - - - - - Does the current stack trace contain the supplied ? - - The token to match against. - - if the current stack trace contains the supplied - . - - - - - Creates a new instance of the - class. - - - - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - -

- Matches the whole method name. -

-
- -
- - - Does the current stack trace contain the supplied ? - - -

- This leaves it up to the caller to decide what matches, but is obviously less of - an abstraction because the caller must know the exact format of the underlying - stack trace. -

-
- -
- - - Provides methods to support various naming and other conventions used throughout the framework. - Mainly for internal use within the framework. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - Convert Strings in attribute name format (lowercase, hyphens separating words) - into property name format (camel-cased). For example, transaction-manager is - converted into transactionManager. - - - - - Convenience class that exposes a signature that matches the - delegate. - - -

- Useful when filtering members via the - mechanism. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - - - Returns true if the supplied instance - satisfies the supplied (which must be an - implementation). - - - The instance that will be checked to see if - it matches the supplied . - - - The criteria against which to filter the supplied - instance. - - - True if the supplied instance - satisfies the supplied (which must be an - implementation); false if not or the - supplied is not an - implementation or is null. - - - - - Interface that can be implemented by exceptions etc that are error coded. - - -

- The error code is a , rather than a number, so it can - be given user-readable values, such as "object.failureDescription". -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Return the error code associated with this failure. - - -

- The GUI can render this anyway it pleases, allowing for I18n etc. -

-
- - The error code associated with this failure, - or the empty string instance if not error-coded. - -
- - - Thrown in response to referring to an invalid property (most often via reflection). - - Rick Evans - - - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - - - Creates a new instance of the InvalidPropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The that is (or rather was) the source of the - offending property. - - - - - The name of the offending property. - - - - - Extension of the interface, expressing a 'priority' - ordering: Order values expressed by IPriorityOrdered objects always - apply before order values of 'plain' Ordered values. - - - This is primarily a special-purpose interface, used for objects - where it is particularly important to determine 'prioritized' - objects first, without even obtaining the remaining objects. - A typical example: Prioritized post-processors in a Spring - - - IPriorityOrdered post-processor objects are initialized in - a special phase, ahead of other post-processor objects. - - Juergen Hoeller - Mark Pollack (.NET) - - - - - - - Criteria that is satisfied if the of each of the - arguments matches each of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - -

- This implementation respects the inheritance chain of any parameter - s... i.e. methods that have a base type (or - interface) that is assignable to the in the - same corresponding index of the parameter types will satisfy this - criteria instance. -

-
- The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - -
- - - Criteria that is satisfied if the number of generic arguments to a given - matches an arbitrary number. - - -

- This class supports checking the generic arguments count of both - generic methods and constructors. -

-
- Bruno Baia -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Thrown when a method (typically a property getter or setter invoked via reflection) - throws an exception, analogous to a . - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for exceptions related to a property access, such as a - mismatch or a target invocation exception. - - Rod Johnson - Mark Pollack (.NET) - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessException class. - - - - - Creates a new instance of the PropertyAccessException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Returns the PropertyChangeEventArgs that resulted in the problem. - - - - - The string error code used to classify the error. - - - - - Creates a new instance of the MethodInvocationException class. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Constructor to use when an exception results from a - . - - - The raised by the invoked property. - - - The that - resulted in an exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The error code string for this exception. - - - - - Criteria that is satisfied if the method Name of an - instance matches a - supplied string pattern. - - - - Supports the following simple pattern styles: - "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - - Bruno Baia - - - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to * (any method name). -

-
-
- - - Creates a new instance of the - class. - - The pattern that names - must match against in order to satisfy this criteria. - - If the supplied is null or resolve to an empty string. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is null or resolve to an empty string. - - - - - Helper class that encapsulates the specification of a method parameter, i.e. - a MethodInfo or ConstructorInfo plus a parameter index. - Useful as a specification object to pass along. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - Initializes a new instance of the class for the given - MethodInfo. - - The MethodInfo to specify a parameter for. - Index of the parameter. - - - - Initializes a new instance of the class. - - The ConstructorInfo to specify a parameter for. - Index of the parameter. - - - - Create a new MethodParameter for the given method or donstructor. - This is a convenience constructor for scenarios where a - Method or Constructor reference is treated in a generic fashion. - - The method or constructor to specify a parameter for. - Index of the parameter. - the corresponding MethodParameter instance - - - - Parameters the name of the method/constructor parameter. - - the parameter name. - - - - Gets the type of the method/constructor parameter. - - The type of the parameter. (never null) - - - - Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The MethodInfo, or null if none. - - - - Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The ConstructorInfo, or null if none - - - - Criteria that is satisfied if the number of parameters to a given - matches an arbitrary number. - - -

- This class supports checking the parameter count of both methods and - constructors. -

-

- Default parameters, etc need to taken into account. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Criteria that is satisfied if the of each of the - parameters of a given matches each - of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the return of a given - matches a given . - - Rick Evans - - - - The return to match against if no - is provided explictly. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Thrown in response to a failed attempt to read a property. - - -

- Typically thrown when attempting to read the value of a write-only - property via reflection. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - 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. - - - - - Thrown in response to a failed attempt to write a property. - - Mark Pollack (.NET) - - - - Creates a new instance of the NotWritablePropertyException class. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class - summarizing what property was not writable. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - - - Creates new NotWritablePropertyException with a root cause. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - The root cause indicating why the property was not writable. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to encountering a value - when traversing a nested path expression. - - - - - 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 of the object where the property was not found. - - The name of the property not found. - - - - Creates a new instance of the - class. - - - The of the object where the property was not found. - - The name of the property not found. - A message about the exception. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the offending property. - - - - - The of the class where the property was last looked for. - - - - - Comparator implementation for objects, sorting by - order value ascending (resp. by priority descending). - - -

- Non- objects are treated as greatest order values, - thus ending up at the end of a list, in arbitrary order (just like same order values of - objects). -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Compares two objects and returns a value indicating whether one is less than, - equal to or greater than the other. - - -

- Uses direct evaluation instead of - to avoid unnecessary boxing. -

-
- The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - -
- - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - Provides additional data for the PropertyChanged event. - - -

- Provides some additional properties over and above the name of the - property that has changed (which is inherited from the - base class). - This allows calling code to determine whether or not a property has - actually changed (i.e. a PropertyChanged event may have been - raised, but the value itself may be equivalent). -

-
- -
- - - Create a new instance of the - class. - - - The name of the property that was changed. - The old value of the property. - the new value of the property. - - - - Get the old value for the property. - - - - - - Get the new value of the property. - - - - - - A base class for all - implementations that are regular expression based. - - Rick Evans - - - - The default pattern... matches absolutely anything. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The regular expression pattern to be applied. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Convenience method that calls the - - on the supplied . - - The input to match against. - True if the matches. - - - - The regular expression pattern to be applied. - - - - - The regular expression options to be applied. - - - - - The regular expression to be applied. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default event name pattern... matches pretty much any event name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default method name pattern... matches pretty much any method name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Exception thrown on a mismatch when trying to set a property - or resolve an argument to a method invocation. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the TypeMismatchException class. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the TypeMismatchException class describing the - property and required type that could not used to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - - - - Creates a new instance of the TypeMismatchException class describing the - property, required type, and underlying exception that could not be used - to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - The underlying exception. - - - - Creates a new instance of the TypeMismatchException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The string error code used to classify the exception. - - - - - Abstract base class for implementations. - - Aleksandar Seovic - - - - An interface that defines the methods that have to be implemented by all data bindings. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - The name of the always filled error provider - - - - - Gets or sets a flag specifying whether this binding is valid. - - - true if this binding evaluated without errors; - false otherwise. - - - - - Marks this binding's state as invalid for this validationErrors collection. - Returns false if is null. - - - false, if validationErrors is null - - - - Initializes a new instance of the class. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets the unique ID of this binding instance. - - - - - Gets or sets the . - - The binding direction. - - - - Gets the error message. - - The error message. - - - - Gets the error providers. - - - - - Abstract base class for simple, one-to-one implementations. - - Aleksandar Seovic - - - - Initialize a new instance of without any - - - - - Initialize a new instance of with the - specified . - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation if source to target binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation of target to source binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets or sets the to use. - - The formatter to use. - - - - Base implementation of the . - - Aleksandar Seovic - - - - An interface that has to be implemented by all data binding containers. - - Aleksandar Seovic - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Gets a value indicating whether this data binding container - has bindings. - - - true if this data binding container has bindings; - false otherwise. - - - - - Creates a new instance of . - - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Implemented as a NOOP for containers. - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Gets a list of bindings for this container. - - - A list of bindings for this container. - - - - - Gets a value indicating whether this instance has bindings. - - - true if this instance has bindings; otherwise, false. - - - - - BaseBindingManager keeps track of all registered bindings and - represents an entry point for the binding and unbinding process. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Enumeration that defines possible values for data binding direction. - - Aleksandar Seovic - - - - Specifies that value from the control property should be bound to a data model. - - - - - Specifies that value from the data model should be bound to control property. - - - - - Specifies that binding is bidirectional. - - - - - Represents an ErrorMessage specific to a binding instance. - - Erich Eichinger - - - - Represents a single validation error message. - - Aleksandar Seovic - Goran Milosavljevic - - - - Default constructor. - - - - - Initializes a new instance of the class. - - Error message resource identifier. - Parameters that should be used for message resolution. - - - - Initializes a new instance of the class copying values from another instance. - - Another Error message instance to copy values from. - - - - This property is reserved, apply the - - to the class instead. - - - An - that describes the XML representation of the object that - is produced by the - - method and consumed by the - - method. - - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Resolves the message against specified . - - Message source to resolve this error message against. - Resolved error message. - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets or sets the resource identifier for this message. - - The resource identifier for this message. - - - - Gets or sets the message parameters. - - The message parameters. - - - - Initializes a new instance of the class. - - the id of the binding this error message is associated with - the message id - optional parameters to this message - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Get the ID of the binding this message instance relates to. - - - - - Interface that should be implemented by data bound objects, such as - web pages, user controls, windows forms, etc. - - Aleksandar Seovic - - - - Gets the binding manager. - - The binding manager. - - - - implementation that allows - data binding between collections that implement - interface. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Simple, expression-based implementation of that - binds source to target one-to-one. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - The formatter to use. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the source expression. - - The source expression. - - - - Gets the target expression. - - The target expression. - - - - Minimal AST node interface used by ANTLR AST generation and tree-walker. - - - - - Add a (rightmost) child to this node - - - - - - Get the first child of this node; null if no children - - - - - Get the next sibling in line after this one - - - - - Get the token text for this node - - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Set the first child of a node. - - - - - - Set the next sibling after this one. - - - - - - Set the token text for this node - - - - - - Set the token type for this node - - - - - - Get the token type for this node - - - - - Event type. - - - - Used for creating Token instances. - - - Used for caching lookahead characters. - - - - This method is executed by ANTLR internally when it detected an illegal - state that cannot be recovered from. - The previous implementation of this method called - and writes directly to , which is usually not - appropriate when a translator is embedded into a larger application. - - Error message. - - - - A creator of Token object instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of Token objects. - - - Since Lexers in ANTLR use a single Token type, each TokenCreator can - create one class of Token objects (that's why it's not called TokenFactory). - - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - The fully qualified name of the Token type to create. - - - - - Type object used as a template for creating tokens by reflection. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - This type was created in VisualAge. - - - - Report exception errors caught in nextToken() - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - - Represents a stream of characters fed to the lexer from that can be rewound - via mark()/rewind() methods. - - - - A dynamic array is used to buffer up all the input characters. Normally, - "k" characters are stored in the buffer. More characters may be stored - during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. - Consumption of characters is deferred. In other words, reading the next - character is not done by conume(), but deferred until needed by LA or LT. - - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "CharConsumed" event. - - Event source object - Event data object - - - - Handle the "CharLA" event. - - Event source object - Event data object - - - - Handle the "Mark" event. - - Event source object - Event data object - - - - Handle the "Rewind" event. - - Event source object - Event data object - - - charBufferConsume method comment. - - - - charBufferLA method comment. - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Specify an object with support code (shared by Parser and TreeParser. - Normally, the programmer does not play with this, using - instead. - - - - - - Specify the type of node to create during tree building. - - Fully qualified AST Node type name. - - - - Specify the type of node to create during tree building. - use now to be consistent with - Token Object Type accessor. - - Fully qualified AST Node type name. - - - - - - - - Get another token object from the token stream - - - - Return the token type of the ith token of lookahead where i=1 - is the current token being examined by the parser (i.e., it - has not been matched yet). - - - - Make sure current lookahead symbol matches token type t. - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Make sure current lookahead symbol matches the given set - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Parser error-reporting function can be overridden in subclass - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - User can override to do their own debugging - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Specifies the behaviour required (i.e. parser modifications) - specifically to support parse tree debugging and derivation. - - - - Override the standard matching and rule entry/exit routines - to build parse trees. This class is useful for 2.7.3 where - you can specify a superclass like - - - class TinyCParser extends Parser(ParseTreeDebugParser); - - - - - - Each new rule invocation must have it's own subtree. Tokens are - added to the current root so we must have a stack of subtree roots. - - - - - Track most recently created parse subtree so that when parsing - is finished, we can get to the root. - - - - - For every rule replacement with a production, we bump up count. - - - - - Adds LT(1) to the current parse subtree. - - - - Note that the match() routines add the node before checking for - correct match. This means that, upon mismatched token, there - will a token node in the tree corresponding to where that token - was expected. For no viable alternative errors, no node will - be in the tree as nothing was matched() (the lookahead failed - to predict an alternative). - - - - - - Create a rule node, add to current tree, and make it current root - - - - - - Pop current root; back to adding to old root - - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - AST Support code shared by TreeParser and Parser. - - - - We use delegation to share code (and have only one - bit of code to maintain) rather than subclassing - or superclassing (forces AST support code to be - loaded even when you don't want to do AST stuff). - - - Typically, is used to specify the - homogeneous type of node to create, but you can override - to make heterogeneous nodes etc... - - - - - - Constructs an ASTFactory with the default AST node type of - . - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - Name of default AST node type for this factory. - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - MetaType of default AST node type for this factory. - - - - - Stores the Type of the default AST node class to be used during tree construction. - - - - - Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass - and ASTNodeCreator. - - - - - Stores the mapping between AST node typenames and their token ID. - - - - - Specify an "override" for the type created for - the specified Token type. - - - This method is useful for situations that ANTLR cannot oridinarily deal - with (i.e., when you create a token based upon a nonliteral token symbol - like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token - type (and hence the AST) statically. - - Token type to override. - - Fully qualified AST typename (or null to specify - the factory's default AST type). - - - - - Register an AST Node Type for a given Token type ID. - - The Token type ID. - The AST Node Type to register. - - - - Register an ASTNodeCreator for a given Token type ID. - - The Token type ID. - The creater to register. - - - - Register an ASTNodeCreator to be used for creating node by default. - - The ASTNodeCreator. - - - - Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings - to the specified size. - This is primarily a convenience method that can be used to prevent - unnecessary and costly re-org of the mappings list. - - Maximum Token Type ID. - - - - Add a child to the current AST - - The AST to add a child to - The child AST to be added - - - - Creates a new uninitialized AST node. Since a specific AST Node Type - wasn't indicated, the new AST node is created using the current default - AST Node type - - - An uninitialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. Once created, - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - Fully qualified name of the Type to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. - - Token instance to be used to initialize the new AST Node. - - Fully qualified name of the Type to be used for creating the new AST Node. - - A newly created and initialized AST node object. - - Once created, the new AST node is initialized with the specified Token - instance. The used for creating this new AST - node is determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - - - - Creates and initializes a new AST node using the specified AST Node instance. - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by aNode. - The AST Node type must have a default/parameterless constructor. - - AST Node instance to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token instance. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token instance to be used to create new AST Node. - An initialized AST node object. - - - - Returns a copy of the specified AST Node instance. The copy is obtained by - using the method Clone(). - - AST Node to copy. - An AST Node (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node and all of it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Make a tree from a list of nodes. The first element in the - array is the root. If the root is null, then the tree is - a simple list not a tree. Handles null children nodes correctly. - For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) - yields tree (nil a b). - - List of Nodes. - AST Node tree. - - - - Make a tree from a list of nodes, where the nodes are contained - in an ASTArray object. - - List of Nodes. - AST Node tree. - - - - Make an AST the root of current AST. - - - - - - - Sets the global default AST Node Type for this ASTFactory instance. - This method also attempts to load the instance - for the specified typename. - - Fully qualified AST Node Type name. - - - - To change where error messages go, can subclass/override this method - and then setASTFactory in Parser and TreeParser. This method removes - a prior dependency on class antlr.Tool. - - - - - - A creator of AST node instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of AST node objects. - - - Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever - they need to create an AST node objeect. What this class does is to support - performant extensibility of the basic ASTFactory. The ASTFactory can now be - extnded as run-time to support more new AST node types without using needing - to use reflection. - - - - - - Constructs an instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Summary description for ASTVisitor. - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Small buffer used to avoid reading individual chars - - - - - Small buffer used to avoid reading individual chars - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - A token is minimally a token type. Subclasses can add the text matched - for the token and line info. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Summary description for DumpASTVisitor. - - Simple class to dump the contents of an AST to the output - - - - Append a char to the msg buffer. If special, then show escaped version - - Message buffer - Char to append - - - - Walk parse tree and return requested number of derivation steps. - If steps less-than 0, return node text. If steps equals 1, return derivation - string at step. - - derivation steps - - - - - Get derivation and return how many you did (less than requested for - subtree roots. - - string buffer - derivation steps - - - - - Do a step-first walk, building up a buffer of tokens until - you've reached a particular step and print out any rule subroots - insteads of descending. - - derivation buffer - derivation steps - - - - - This token stream tracks the *entire* token stream coming from - a lexer, but does not pass on the whitespace (or whatever else - you want to discard) to the parser. - - - - This class can then be asked for the ith token in the input stream. - Useful for dumping out the input stream exactly after doing some - augmentation or other manipulations. Tokens are index from 0..n-1 - - - You can insert stuff, replace, and delete chunks. Note that the - operations are done lazily--only if you convert the buffer to a - string. This is very efficient because you are not moving data around - all the time. As the buffer of tokens is converted to strings, the - toString() method(s) check to see if there is an operation at the - current index. If so, the operation is done and then normal string - rendering continues on the buffer. This is like having multiple Turing - machine instruction streams (programs) operating on a single input tape. :) - - - Since the operations are done lazily at toString-time, operations do not - screw up the token index values. That is, an insert operation at token - index i does not change the index values for tokens i+1..n-1. - - - Because operations never actually alter the buffer, you may always get - the original token stream back without undoing anything. Since - the instructions are queued up, you can easily simulate transactions and - roll back any changes if there is an error just by removing instructions. - For example, - - For example: - - TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); - JavaRecognizer parser = new JavaRecognizer(rewriteEngine); - ... - rewriteEngine.insertAfter("pass1", t, "foobar");} - rewriteEngine.insertAfter("pass2", u, "start");} - System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); - System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); - - - - You can also have multiple "instruction streams" and get multiple - rewrites from a single pass over the input. Just name the instruction - streams and use that name again when printing the buffer. This could be - useful for generating a C file and also its header file--all from the - same buffer. - - - If you don't use named rewrite streams, a "default" stream is used. - - - Terence Parr, parrt@cs.usfca.edu - University of San Francisco - February 2004 - - - - - - Track the incoming list of tokens - - - - - You may have multiple, named streams of rewrite operations. - I'm calling these things "programs." - Maps string (name) -> rewrite (List) - - - - - Map string (program name) -> Integer index - - - - - track index of tokens - - - - - Who do we suck tokens from? - - - - - Which (whitespace) token(s) to throw out - - - - - Rollback the instruction stream for a program so that - the indicated instruction (via instructionIndex) is no - longer in the stream. - - - UNTESTED! - - - - - - - Reset the program so that no instructions exist - - - - - - If op.index > lastRewriteTokenIndexes, just add to the end. - Otherwise, do linear - - - - - - Execute the rewrite operation by possibly adding to the buffer. - - rewrite buffer - The index of the next token to operate on. - - - - This token tracks it's own index 0..n-1 relative to the beginning - of the stream. It is designed to work with - in TokenStreamRewriteEngine.cs - - - - - Index into token array indicating position in input stream - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Implementation of the average aggregator. - - Aleksandar Seovic - - - - Defines an interface that should be implemented - by all collection processors and aggregators. - - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Returns the average of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The average of the numeric values in the source collection. - - - - - Converts all elements in the input list to a given target type. - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the count aggregator. - - Aleksandar Seovic - - - - Returns the number of items in the source collection. - - - The source collection to process. - - - Ignored. - - - The number of items in the source collection, - or zero if the collection is empty or null. - - - - - Converts a string literal to a instance. - - Erich Eichinger - - - - - Erich Eichinger - - - - Implementation of the distinct processor. - - Aleksandar Seovic - - - - Returns distinct items from the collection. - - - The source collection to process. - - - 0: boolean flag specifying whether to include null - in the results or not. Default is false, which means that - null values will not be included in the results. - - - A collection containing distinct source collection elements. - - - If there is more than one argument, or if the single optional argument - is not Boolean. - - - - - Implementation of the maximum aggregator. - - Aleksandar Seovic - - - - Returns the largest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The largest item in the source collection. - - - - - Implementation of the minimum aggregator. - - Aleksandar Seovic - - - - Returns the smallest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The smallest item in the source collection. - - - - - Implementation of the non-null processor. - - Aleksandar Seovic - - - - Returns non-null items from the collection. - - - The source collection to process. - - - Ignored. - - - A collection containing non-null source collection elements. - - - - - Implementation of the 'order by' processor. - - Aleksandar Seovic - Erich Eichinger - - - - Sorts the source collection using custom sort criteria. - - - Please note that your compare function needs to take care about - proper conversion of types to be comparable! - - - The source collection to sort. - - - Sort criteria to use. - - - A sorted array containing collection elements. - - - - - Reverts order of elements in the list - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the sort processor. - - Aleksandar Seovic - - - - Sorts the source collection. - - - Please not that this processor requires that collection elements - are of a uniform type and that they implement - interface. -

- If you want to perform custom sorting based on element properties - you should consider using instead. - - - The source collection to sort. - - - Ignored. - - - An array containing sorted collection elements. - - - If collection is not empty and it is - neither nor . - - - -

- Implementation of the sum aggregator. - - Aleksandar Seovic -
- - - Returns the sum of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The sum of the numeric values in the source collection. - - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Base type for nodes that accept arguments. - - Aleksandar Seovic - - - - Base type for all expression nodes. - - Aleksandar Seovic - - - - For internal purposes only. Use for expression node implementations. - - - This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST - unfortunately is not marked as [Serializable].
-
- Note:Since SpringAST implements , deriving classes - have to explicitely override if they need to persist additional - data during serialization. -
-
- - - The global SpringAST node factory - - - - - Create an instance - - - - - Create an instance from a token - - - - - initialize this instance from an AST - - - - - initialize this instance from an IToken - - - - - initialize this instance from a token type number and a text - - - - - sets the text of this node - - - - - gets the text of this node - - - - - Create a new instance from SerializationInfo - - - - - populate SerializationInfo from this instance - - - - - gets or sets the token type of this node - - - - - gets or sets the text of this node - - - - - Interface that all navigation expression nodes have to implement. - - Aleksandar Seovic - - - - Returns expression value. - - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Expression variables map. - Value of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - New value for the last node of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - Expression variables map. - New value for the last node of the expression. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value. - - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Expression variables map. - Node's value. - - - - Returns node's value for the given context. - - Node's value. - - - - Evaluates this node for the given context, switching local variables map to the ones specified in . - - - - - Sets node's value for the given context. - - Object to evaluate node against. - New value for this node. - - - - Sets node's value for the given context. - - Object to evaluate node against. - Expression variables map. - New value for this node. - - - - Sets node's value for the given context. - - -

- This is a default implementation of Set method, which - simply throws . -

-

- This was done in order to avoid redundant Set method implementations, - because most of the node types do not support value setting. -

-
-
- - - Returns a string representation of this node instance. - - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Holds the state during evaluating an expression. - - - - - Gets/Sets the root context of the current evaluation - - - - - Gets/Sets the current context of the current evaluation - - - - - Gets/Sets global variables of the current evaluation - - - - - Gets/Sets local variables of the current evaluation - - - - - Initializes a new EvaluationContext instance. - - The root context for this evaluation - dictionary of global variables used during this evaluation - - - - Switches current ThisContext. - - - - - Switches current LocalVariables. - - - - - Gets the type of the - - - - - Create a new instance - - - - - Create a new instance - - - - - Append an argument node to the list of child nodes - - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - - - - Asserts the argument count. - - The required count. - - - - Resolves the arguments. - - Current expression evaluation context. - An array of argument values - - - - Resolves the named arguments. - - Current expression evaluation context. - A dictionary of argument name to value mappings. - - - - Resolves the argument. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the argument without ensuring was called. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the named argument. - - Argument name. - Current expression evaluation context. - Resolved named argument value. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed assignment node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed attribute node in the navigation expression. - - Aleksandar Seovic - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Determines the type of object that should be instantiated. - - - The type name to resolve. - - - The type of object that should be instantiated. - - - If the type cannot be resolved. - - - - - Initializes this node by caching necessary constructor and property info. - - - - - - - Sets the named arguments (properties). - - Instance to set property values on. - Argument (property) name to value mappings. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Tries to determine attribute type based on the specified - attribute type name. - - - Attribute type name to resolve. - - - Resolved attribute type. - - - If type cannot be resolved. - - - - - Base class for binary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance with the supplied operands - - - - - - - Create a new instance from SerializationInfo - - - - - Evaluate the left operand - - - - - Evaluate the left operand - - - - - Gets the left operand. - - The left operand. - - - - Gets the right operand. - - The right operand. - - - - Represents parsed boolean literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the boolean literal node. - - - This is the entrypoint into evaluating this expression. - - Node's value. - - - - Represents parsed default node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns left operand if it is not null, or the right operand if it is. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Container object for the parsed expression. - - -

- Preparing this object once and reusing it many times for expression - evaluation can result in significant performance improvements, as - expression parsing and reflection lookups are only performed once. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of the class - by parsing specified expression string. - - Expression to parse. - - - - Registers lambda expression under the specified . - - Function name to register expression as. - Lambda expression to register. - Variables dictionary that the function will be registered in. - - - - Initializes a new instance of the class - by parsing specified primary expression string. - - Primary expression to parse. - - - - Initializes a new instance of the class - by parsing specified property expression string. - - Property expression to parse. - - - - Initializes a new instance of the class. - - - - - Create a new instance from SerializationInfo - - - - - Evaluates this expression for the specified root object and returns - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value of the last node. - - - - Evaluates this expression for the specified root object and sets - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value to set last node to. - If navigation expression is empty. - - - - Evaluates this expression for the specified root object and returns - of the last node, if possible. - - Context to evaluate expression against. - Expression variables map. - Value of the last node. - - - - Contains a list of reserved variable names. - You must not use any variable names with the reserved prefix! - - - - - Variable Names using this prefix are reserved for internal framework use - - - - - variable name of the currently processed object factory, if any - - - - - Converts string representation of expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Utility class that enables easy expression evaluation. - - -

- This class allows users to get or set properties, execute methods, and evaluate - logical and arithmetic expressions. -

-

- Methods in this class parse expression on every invocation. - If you plan to reuse the same expression many times, you should prepare - the expression once using the static method, - and then call to evaluate it. -

-

- This can result in significant performance improvements as it avoids expression - parsing and node resolution every time it is called. -

-

-

-
- Aleksandar Seovic -
- - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Value of the last node in the expression. - - - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Expression variables map. - Value of the last node in the expression. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Value to set last node to. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Expression variables map. - Value to set last node to. - - - - Represents parsed expression list node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a result of the last expression in a list. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the last expression in a list - - - - Represents parsed function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed hexadecimal integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the hexadecimal integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed indexer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - - Context to resolve property against. - Expression variables map. - PropertyInfo for this node. - - - - Represents parsed integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents lambda expression. - - Aleksandar Seovic - - - - caches argumentNames of this instance - - - - - caches body expression of this lambda function - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Gets argument names for this lambda expression. - - - - - Represents parsed list initializer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the list defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents local function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Represents parsed map entry node. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map entry defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed map initializer node in the navigation expression. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Static constructor. Initializes a map of special collection processor methods. - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Gets the best method given the name, argument values, for a given type. - - The type on which to search for the method. - Name of the method. - The binding flags. - The arg values. - Best matching method or null if none found. - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed null literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the null literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic addition operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic addition operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents AND operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical BETWEEN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents arithmetic division operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic division operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical equality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical equality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical IN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical IS operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IS operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical "less than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "less than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents VB-style logical LIKE operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical LIKE operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents logical MATCHES operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical MATCHES operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents arithmetic modulus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic modulus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic multiplication operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic multiplication operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents NOT operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Base class for unary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Gets the operand. - - The operand. - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical NOT operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical inequality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical inequality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents OR operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical OR operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic exponent operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic exponent operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic subtraction operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic subtraction operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary minus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary plus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - - Erich Eichinger - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed projection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of projection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents node that navigates to object's property or public field. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - The parent. - - - - Attempts to resolve property or field. - - - Type to search for a property or a field. - - - Property or field name. - - - Binding flags to use. - - - Resolved property or field accessor, or null - if specified cannot be resolved. - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Retrieves property or field value. - - Context to evaluate expressions against. - Current expression evaluation context. - Property or field value. - - - - Sets property value, doing any type conversions that are necessary along the way. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Sets property or field value using either dynamic or standard reflection. - - Object to evaluate node against. - New value for this node, converted to appropriate type. - - - - In the case of read only collections or custom collections that are not assignable from - IList, try to add to the collection. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - true if was able add to IList, IDictionary, or ISet - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... - - Context to resolve property against. - PropertyInfo for this node. - - - - Gets a value indicating whether this node represents a property. - - - true if this node is a property; otherwise, false. - - - - - Gets a value indicating whether this node represents a field. - - - true if this node is a field; otherwise, false. - - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified identifier. - - - Fully qualified identifier as a string. - - - - - Represents parsed real literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the real literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents a reference to a Spring-managed object. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the first context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the last context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of selection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed string literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Exception thrown when detecting invalid SpEL syntax - - Erich Eichinger - - - - TODO - - - - - TODO - - - - - - - - - - - - - - - - - - - - Gets a message that provides details on the syntax error. - - - - - The expression that caused the error - - - - - Represents ternary expression node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed type node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified typename. - - - Fully qualified typename as a string. - - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Implementation of that can be used to - format and parse boolean values. - - Erich Eichinger - - - - Interface that should be implemented by all formatters. - - - - Formatters assume that source value is a string, and make no assumptions - about the target value's type, which means that Parse method can return - object of any type. - - - Aleksandar Seovic - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Initializes a new instance of the class - using default values - - - - - Initializes a new instance of the class - - - - - Formats the specified boolean value. - - The value to format. - Formatted boolean value. - If is null. - If is not of type . - - - - Parses the specified boolean value according to settings of and - - The boolean value to parse. - Parsed boolean value as a . - If does not match or . - - - - Set/Get value to control casesensitivity of - - - Defaults to true - - - - - Set/Get value to recognize as boolean "true" value - - - Defaults to - - - - - Set/Get value to recognize as boolean "false" value - - - Defaults to - - - - - Implementation of that can be used to - format and parse currency values. - - - - CurrencyFormatter uses currency related properties of the - to format and parse currency values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of CurrencyFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the CurrencyFormatter in order - to override some of the default currency formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - currency values are formatted. - - - - - Formats the specified currency value. - - The value to format. - Formatted currency . - If is null. - If is not a number. - - - - Parses the specified currency value. - - The currency value to parse. - Parsed currency value as a . - - - - Gets or sets the currency decimal digits. - - The currency decimal digits. - - - - - Gets or sets the currency decimal separator. - - The currency decimal separator. - - - - - Gets or sets the currency group sizes. - - The currency group sizes. - - - - - Gets or sets the currency group separator. - - The currency group separator. - - - - - Gets or sets the currency symbol. - - The currency symbol. - - - - - Gets or sets the currency negative pattern. - - The currency negative pattern. - - - - - Gets or sets the currency positive pattern. - - The currency positive pattern. - - - - - Implementation of that can be used to - format and parse values. - - - - DateTimeFormatter uses properties of the - to format and parse values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of DateTimeFormatter, default DateTimeFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the DateTimeFormatter in order - to override some of the default formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - Date/time format string. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture. - - - - Formats the specified value. - - The value to format. - Formatted value. - If is null. - If is not an instance of . - - - - Parses the specified value. - - The string to parse. - Parsed value. - - - - Provides base functionality for filtering values before they actually get parsed/formatted. - - Erich Eichinger - - - - Creates a new instance of this FilteringFormatter. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Allows to rewrite a value before it gets parsed by the underlying formatter - - - - - Allows to change a value before it gets formatted by the underlying formatter - - - - - Implementation of that can be used to - format and parse floating point numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign, decimal point, exponent). - - - Aleksandar Seovic - - - - Default format string. - - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and current thread's culture. - - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and specified culture. - - The culture. - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - The culture name. - - - - Initializes a new instance of the class, - using specified format string and culture. - - The format string. - The culture. - - - - Formats the specified float value. - - The value to format. - Formatted floating point number. - If is null. - If is not a number. - - - - Parses the specified float value. - - The float value to parse. - Parsed float value as a . - - - - Replaces input strings with a given default value, - if they are null or contain whitespaces only, - - Erich Eichinger - - - - Creates a new instance of this HasTextFilteringFormatter using null as default value. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Creates a new instance of this HasTextFilteringFormatter. - - the default value to be returned, if input text doesn't contain text - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - If value contains no text, it will be replaced by a defaultValue. - - - - - Implementation of that can be used to - format and parse integer numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign). - - - Aleksandar Seovic - - - - Initializes a new instance of the class, - using default format string of '{0:D}'. - - - - - Initializes a new instance of the class, - using specified format string. - - - - - Formats the specified integer value. - - The value to format. - Formatted integer number. - If is null. - If is not an integer number. - - - - Parses the specified integer value. - - The integer value to parse. - Parsed number value as a . - - - - Implementation of that simply calls . - - - This formatter is a no-operation implementation. - - Erich Eichinger - - - - Initializes a new instance of the class. - - - - - Converts the passed value to a string by calling . - - The value to convert. - to string converted value. - - - - Returns the passed string "as is". - - The value to return. - The value passed into this method. - - - - Implementation of that can be used to - format and parse numbers. - - - - NumberFormatter uses number-related properties of the - to format and parse numbers. - - - This formatter works with both integer and decimal numbers and allows - you to format and parse numbers that conform to - number style (leading and trailing white space and/or sign, thousands separator, - decimal point) - - - If you use one of the constructors that accept culture as a parameter - to create an instance of NumberFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the NumberFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified number value. - - The value to format. - Formatted number . - If is null. - If is not a number. - - - - Parses the specified number value. - - The number value to parse. - Parsed number value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the number group sizes. - - The number group sizes. - - - - - Gets or sets the number group separator. - - The number group separator. - - - - - Gets or sets the negative pattern. - - The number negative pattern. - - - - - Implementation of that can be used to - format and parse numbers. - - - - PercentFormatter uses percent-related properties of the - to format and parse percentages. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of PercentFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the PercentFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified percentage value. - - The value to format. - Formatted percentage. - If is null. - If is not a number. - - - - Parses the specified percentage value. - - The percentage value to parse. - Parsed percentage value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the percent group sizes. - - The percent group sizes. - - - - - Gets or sets the percent group separator. - - The percent group separator. - - - - - Gets or sets the negative pattern. - - The percent negative pattern. - - - - - Gets or sets the positive pattern. - - The percent positive pattern. - - - - - Gets or sets the percent symbol. - - The percent symbol. - - - - - Gets or sets the per mille symbol. - - The per mille symbol. - - - - - Loads a list of resources that should be applied from the .NET . - - -

- This implementation will iterate over all resource managers - within the message source and return a list of all the resources whose name starts with '$this'. -

-

- All other resources will be ignored, but you can retrieve them by calling one of - GetMessage methods on the message source directly. -

-
- Aleksandar Seovic -
- - - Abstract base class that all localizers should extend - - -

- This class contains the bulk of the localizer logic, including implementation - of the ApplyResources methods that are defined in - interface. -

-

- All specific localizers need to do is inherit this class and implement - GetResources method that will return a list of - objects that should be applied to a specified target. -

-

- Custom implementations can use whatever type of resource storage they want, - such as standard .NET resource sets, custom XML files, database, etc. -

-
- Aleksandar Seovic -
- - - Defines an interface that localizers have to implement. - - -

- Localizers are used to automatically apply resources to object's members - using reflection. -

-
- Aleksandar Seovic -
- - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's culture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's uiCulture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Returns a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - implementation - that simply returns the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . - - Aleksandar Seovic - - - - Strategy interface for - resolution. - - Aleksandar Seovic - - - - Resolves the - from some context. - - -

- The 'context' is determined by the appropriate implementation class. - An example of such a context might be a thread local bound - , or a - sourced from an HTTP - session. -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - -

- This is an optional operation and does not need to be implemented - such that it actually does anything useful (i.e. it can be a no-op). -

-
- - The new or - to clear the current . - -
- - - Returns the default . - - -

- It tries to get the - from the value of the - - property and falls back to the of the - current thread if the - - is . -

-
- - The default - -
- - - Resolves the - from some context. - - -

- The 'context' in this implementation is the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - - The new or - to clear the current . - - - - - - - The default . - - - The default . - - - - - Abstract base class that all resource cache implementations should extend. - - Aleksandar Seovic - - - - Defines an interface that resource cache adapters have to implement. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Gets the list of resources from the cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Crates resource cache key for the specified target object and culture. - - Target object to apply resources to. - Resource culture to use for resource lookup. - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Resource cache implementation that doesn't cache resources. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - Always returns null. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - - - - Holds mapping between control property and it's value - as read from the resource file. - - Aleksandar Seovic - - - - Creates instance of resource mapper. - - Target property. - Resource value. - - - - Gets parsed target property expression. See - for more information on object navigation expressions. - - - - - Value of the resource that target property should be set to. - - - - - Utility class to aid in the manipulation of events and delegates. - - Griffin Caprio - - - - Returns a new instance of the requested . - - -

- Often used to wire subscribers to event publishers. -

-
- - The of delegate to create. - - - The target subscriber object that contains the delegate implementation. - - - referencing the delegate method on the subscriber. - - - A delegate handler that can be added to an events list of handlers, or called directly. - -
- - - Queries the input type for a signature matching the input - signature. - - - Typically used to query a potential subscriber to see if they implement an event handler. - - to match against - to query - - matching input - signature, or if there is no match. - - - - - Creates a new instance of the EventManipulationUtilities class. - - -

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

-
-
- - - Default implementation of the - interface. - - Griffin Caprio - - - - Creates a new instance of the EventRegistry class. - - - - - Adds the input object to the list of publishers. - - - This publishes all events of the source object to any object - wishing to subscribe - - The source object to publish. - - - - Subscribes to all events published, if the subscriber implements - compatible handler methods. - - The subscriber to use. - - - - Subscribes to published events of all objects of a given type, if the - subscriber implements compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - The target to unsubscribe from - - - - The list of event publishers. - - The list of event publishers. - - - - To be implemented by any object that wishes to receive a reference to - an . - - -

- This interface only applies to objects that have been instantiated - within the context of an - . This interface does - not typically need to be implemented by application code, but is rather - used by classes internal to Spring.NET. -

-
- Mark Pollack - Rick Evans -
- - - Set the - associated with the - that created this - object. - - -

- This property will be set by the relevant - after all of this - object's dependencies have been resolved. This object can use the - supplied - immediately to publish or subscribe to one or more events. -

-
-
- - - Marks a property as being 'required': that is, the setter property - must be configured to be dependency-injected with a value. - - Consult the SDK documentation for , - which, by default, checks for the presence of this annotation. - - Rob Harrop - Mark Pollack - - - - A implementation that enforces required properties to have been configured. - Required properties are detected through an attribute, by default, Spring's - attribute. - - - The motivation for the existence of this IObjectPostProcessor is to allow - developers to annotate the setter properties of their own classes with an - arbitrary attribute to indicate that the container must check - for the configuration of a dependency injected value. This neatly pushes - responsibility for such checking onto the container (where it arguably belongs), - and obviates the need (in part) for a developer to code a method that - simply checks that all required properties have actually been set. - - Please note that an 'init' method may still need to implemented (and may - still be desirable), because all that this class does is enforce that a - 'required' property has actually been configured with a value. It does - not check anything else... In particular, it does not check that a - configured value is not null. - - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Adapter that implements all methods on - as no-ops, which will not change normal processing of each object instantiated - by the container. Subclasses may override merely those methods that they are - actually interested in. - - - Note that this base class is only recommendable if you actually require - functionality. If all you need - is plain functionality, prefer a straight - implementation of that (simpler) interface. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Extension of the interface, - adding a callback for predicting the eventual type of a processed object. - - This interface is a special purpose interface, mainly for - internal use within the framework. In general, application-provided - post-processors should simply implement the plain - interface or derive from the - class. New methods might be added to this interface even in point releases. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Subinterface of - - that adds a before-instantiation callback and a callback after instantiation but before - explicit properties are set or autowiring occurs. - - - - Typically used to suppress default instantiation for specific target objects, - for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, - lazily initializing targets, etc), or to implement additional injection strategies such as field - injection. - - - This interface is a special purpose interface, mainly for internal use within the framework. - It is recommended to implement the plain interface as far as - possible, or to derive from in order to be shielded - from extension to this interface. - - - Juergen Hoeller - Rick Evans (.NET) - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Predicts the type of the object to be eventually returned from this - processors callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Predicts the type of the object to be eventually returned from this - processors PostProcessBeforeInstantiation callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Cache for validated object names, skipping re-validation for the same object - - - - - Post-process the given property values before the factory applies them - to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. - - The property values that the factory is about to apply (never null). - The 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances or null to skip property population. - - If a required property value has not been specified - in the configuration metadata. - - - - Determines whether the supplied property is required to have a value, that is to be dependency injected. - - - This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that - the property has a setter method. - - The target PropertyInfo - - true if the supplied property has been marked as being required;; otherwise, false if - not or if the supplied property does not have a setter method - - - - - Builds an exception message for the given list of invalid properties. - - The list of names of invalid properties. - Name of the object. - The exception message - - - - Sets the type of the required attribute, to be used on a property setter - - - The default required attribute type is the Spring-provided attribute. - This setter property exists so that developers can provide their own - (non-Spring-specific) annotation type to indicate that a property value is required. - - The type of the required attribute. - - - - Base class that provides common functionality needed for several IObjectFactoryPostProcessor - implementations - - Mark Pollack - - - - Allows for custom modification of an application context's object - definitions, adapting the object property values of the context's - underlying object factory. - - -

- Application contexts can auto-detect - IObjectFactoryPostProcessor objects in their object definitions and - apply them before any other objects get created. -

-

- Useful for custom config files targeted at system administrators that - override object properties configured in the application context. -

-

- See PropertyResourceConfigurer and its concrete implementations for - out-of-the-box solutions that address such configuration needs. -

-
- Juergen Hoeller - Rick Evans (.Net) -
- - - Modify the application context's internal object factory after its - standard initialization. - - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - The object factory used by the application context. - - - In case of errors. - -
- - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Resolves the supplied into a - instance. - - The object that is to be resolved into a - instance. - The error context source. - The error context string. - A resolved . - -

- This (default) implementation supports resolving - s and s. - Only override this method if you want to key your type alias - on something other than s - and s. -

-
- - If the supplied is , - or the supplied cannot be resolved. - -
- - - Return the order value of this object, with a higher value meaning - greater in terms of sorting. - - The order value. - - - - - Simple template superclass for - implementations that allows for the creation of a singleton or a prototype - instance (depending on a flag). - - - If the value of the - - property is (this is the default), this class - will create a single instance of it's object upon initialization and - subsequently return the singleton instance; else, this class will - create a new instance each time (prototype mode). Subclasses must - implement the - - template method to actually create objects. - - Juergen Hoeller - Keith Donald - Simon White (.NET) - - - - Interface to be implemented by objects used within an - that are themselves - factories. - - -

- If an object implements this interface, it is used as a factory, - not directly as an object. s - can support singletons and prototypes - ()... - please note that an - itself can only ever be a singleton. It is a logic error to configure an - itself to be a prototype. -

- - An object that implements this interface cannot be used as a normal object. - -
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - - If this method is being called in the context of an enclosing IoC container and - returns , the IoC container will consider this factory - object as not being fully initialized and throw a corresponding (and most - probably fatal) exception. - - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - 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? - - - - - Invoked by an - after it has injected all of an object's dependencies. - - - In the event of misconfiguration (such as the failure to set a - required property) or if initialization fails. - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - Template method that subclasses must override to construct - the object returned by this factory. - - - Invoked once immediately after the initialization of this - in the case of - a singleton; else, on each call to the - - method. - - - If an exception occured during object creation. - - - A distinct instance of the object created by this factory. - - - - - Performs cleanup on any cached singleton object. - - -

- Only makes sense in the context of a singleton object. -

-
- - -
- - - Is the object managed by this factory a singleton or a prototype? - - -

- Please note that changing the value of this property after - this factory object instance has been created by an enclosing - Spring.NET IoC container really is a programming error. This - property should really only be set once, prior to the invocation - of the - - callback method. -

-
- -
- - - Return the of object that this - creates, or - if not known in advance. - - - - - - The various autowiring modes. - - Rick Evans - - - - Do not autowire. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Implementation of that - resolves variable name against command line arguments. - - Aleksandar Seovic - - - - Defines contract that different variable sources have to implement. - - -

- The "variable sources" are objects containing name-value pairs - that allow a variable value to be retrieved for the given name.

-

- Out of the box, Spring.NET supports a number of variable sources, - that allow users to obtain variable values from .NET config files, - Java-style property files, environment, registry, etc.

-

- Users can always write their own variable sources implementations, - that will allow them to load variable values from the database or - other proprietary data source.

-
- - - - - - - Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Default constructor. - Initializes command line arguments from the environment. - - - - - Constructor that allows arguments to be passed externally. - Useful for testing. - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes command line arguments dictionary. - - - - - Gets or sets a prefix that should be used to - identify arguments to extract values from. - - - A prefix that should be used to identify arguments - to extract values from. Defaults to slash ("/"). - - - - - Gets or sets a character that should be used to - separate argument name from its value. - - - A character that should be used to separate argument - name from its value. Defaults to colon (":"). - - - - - Implementation of that - resolves variable name against name-value sections in - the standard .NET configuration file. - - Aleksandar Seovic - - - - Initializes a new instance of - - - - - Initializes a new instance of from the given - - - - - Initializes a new instance of from the given - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets a list of section names variables should be loaded from. - - - All sections specified need to be handled by the - in order to be processed successfully. - - - A list of section names variables should be loaded from. - - - - - Convinience property. Gets or sets a single section - to read properties from. - - - The section specified needs to be handled by the - in order to be processed successfully. - - - A section to read properties from. - - - - - Implementation of that - resolves variable name against provided variables. - - - Variable name resolution is case insensitive. - - Bruno Baia - - - - Initializes a new instance of . - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets variables. - - - - - Various utility methods for .NET style .config files. - - -

- Currently supports reading custom configuration sections and returning them as - objects. -

-
- Simon White - Mark Pollack -
- - - Initializes the type members - - - - - Reads the specified configuration section into a - . - - The resource to read. - The section name. - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - The populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Read from the specified configuration from the supplied XML - into a - . - - - - Does not support section grouping. The supplied XML - must already be loaded. - - - - The to read from. - - - The configuration section name to read. - - - A newly populated - . - - - If any errors are encountered while reading (this only applies to - v1.1 and greater of the .NET Framework). - - - If any errors are encountered while reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Returns the section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed result of evaluating the specified . - - if the result's type does not match the expected type - - - - Reads the specified configuration section from the given - - - - - - - - Reads the specified configuration section from the given - - - - - - - - - Determine the configuration section handler type - - - - - Populates the supplied with values from - a .NET application configuration file. - - - The - to add any key-value pairs to. - - - The configuration section name in the a .NET application configuration - file. - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - if the supplied - was found. - - - - - Creates a new instance of the ConfigurationReader class. - - -

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

-
-
- - - Implementation of that - resolves variable name connection strings defined in - the standard .NET configuration file. - - -

- When the <connectionStrings> configuration section is processed by this class, - two variables are defined for each connection string: one for connection string and - the second one for the provider name.

-

- Variable names are generated by appending '.connectionString' and '.providerName' - literals to the value of the name attribute of the connection string element. - For example:

-
-            
-               
-            
-            
-

- will result in two variables being created: myConn.connectionString and myConn.providerName. - You can reference these variables within your object definitions, just like any other variable.

-
- Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Holder for constructor argument values for an object. - - -

- Supports values for a specific index or parameter name (case - insensitive) in the constructor argument list, and generic matches by - . -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Can be used as an argument filler for the - - overload when one is not looking for an argument by index. - - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Add argument value for the given index in the constructor argument list. - - - The index in the constructor argument list. - - - The argument value. - - - - - Add argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - The argument value. - - The of the argument - . - - - - - Add argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - The argument value. - - If the supplied is - or is composed wholly of whitespace. - - - - - Get argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - - The required of the argument. - - - The - - for the argument, or if none set. - - - - - Get argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - - The - - for the argument, or if none set. - - - - - Does this set of constructor arguments contain a named argument matching the - supplied name? - - - - The comparison is performed in a case-insensitive fashion. - - - The named argument to look up. - - if this set of constructor arguments - contains a named argument matching the supplied - name. - - - - - Add generic argument value to be matched by type. - - - The argument value. - - - - - Add generic argument value to be matched by type. - - The argument value. - - The of the argument - . - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - The - - for the argument, or if none set. - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list, or to the named argument, or - generically matches by . - - - The index of the argument in the constructor argument list. May be - negative, to denote the fact that we are not looking for an - argument by index (see - . - - - The name of the argument in the constructor argument list. May be - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Return the map of indexed argument values. - - - An with - indices as keys and - s - as values. - - - - - Return the map of named argument values. - - - An with - named arguments as keys and - s - as values. - - - - - Return the set of generic argument values. - - - A of - s. - - - - - Return the number of arguments held in this instance. - - - - - Returns true if this holder does not contain any argument values, - neither indexed ones nor generic ones. - - - - - Holder for a constructor argument value, with an optional - attribute indicating the target - of the actual constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - The of the argument - . Can also be one of the common - aliases (int, bool, - float, etc). - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Gets and sets the value for the constructor argument. - - -

- Only necessary for manipulating a registered value, for example in - s. -

-
-
- - - Return the of the constructor - argument. - - - - - - implementation that allows for convenient registration of custom - s. - - - - The use of this class is typically not required; the .NET - mechanism of associating a - with a - via the use of the - is the - recommended (and standard) way. This class primarily exists to cover - those cases where third party classes to which one does not have the - source need to be exposed to the type conversion mechanism. - -

- Because the - - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever type conversion is required. If - one is using a - - object definition within the scope of an - , no such automatic - pickup of the - - is performed (custom converters will have to be added manually using the - - method). For most application scenarios, one will get better - mileage using the - abstraction. -

-
- -

- The following examples all assume XML based configuration, and use - inner object definitions to define the custom - objects (nominally to - avoid polluting the object name space, but also because the - configuration simply reads better that way). -

- - - - - - - - - - - - - - - - -

- The following example illustrates a complete (albeit naieve) use case - for this class, including a custom - implementation, said - converters domain class, and the XML configuration that hooks the - converter in place and makes it available to a Spring.NET container for - use during object resolution. -

-

- The domain class is a simple data-only object that contains the data - required to send an email message (such as the host and user account - name). A developer would prefer to use a string of the form - UserName=administrator,Password=r1l0k1l3y,Host=localhost to - configure the mail settings and just let the container take care of the - conversion. -

- - namespace ExampleNamespace - { - public sealed class MailSettings - { - private string _userName; - private string _password; - private string _host; - - public string Host - { - get { return _host; } - set { _host = value; } - } - - public string UserName - { - get { return _userName; } - set { _userName = value; } - } - - public string Password - { - get { return _password; } - set { _password = value; } - } - } - - public sealed class MailSettingsConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (typeof (string) == sourceType) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - string text = value as string; - if(text != null) - { - MailSettings mailSettings = new MailSettings(); - string[] tokens = text.Split(','); - for (int i = 0; i < tokens.Length; ++i) - { - string token = tokens[i]; - string[] settings = token.Split('='); - typeof(MailSettings).GetProperty(settings[0]) - .SetValue(mailSettings, settings[1], null); - } - return mailSettings; - } - return base.ConvertFrom(context, culture, value); - } - } - - // a very naieve class that uses the MailSettings class... - public sealed class ExceptionLogger - { - private MailSettings _mailSettings; - - public MailSettings MailSettings { - { - set { _mailSettings = value; } - } - - public void Log(object value) - { - Exception ex = value as Exception; - if(ex != null) - { - // use _mailSettings instance... - } - } - } - } - -

- The attendant XML configuration for the above classes would be... -

- - - - - - - - - - - - - - - - Juergen Hoeller - Simon White (.NET) - - - - - - - Registers any custom converters with the supplied - . - - - The object factory to register the converters with. - - - In case of errors. - - - - - Resolves the supplied into a - instance. - - - The object that is to be resolved into a - instance. - - - A resolved instance. - - - If the supplied is , - or the supplied cannot be resolved. - - - - - The custom converters to register. - - -

- The uses the type name - of the class that requires conversion as the key, and an - instance of the - that will effect - the conversion. Alternatively, the actual - of the class that requires conversion - can be used as the key. -

-
- -

- - IDictionary converters = new Hashtable(); - converters.Add( "System.Date", new MyCustomDateConverter() ); - // a System.Type instance can also be used as the key... - converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); - -

-
-
- - - implementation that - creates delegates. - - -

- Supports the creation of s for both - instance and methods. -

-
- Rick Evans -
- - - Callback method called once all factory properties have been set. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Creates the delegate. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - The of - created by this factory. - - -

- Returns the - if accessed prior to the method - being called. -

-
-
- - - The of the - created by this factory. - - - - - The name of the method that is to be invoked by the created - delegate. - - - - - The target if the - refers to a method. - - - - - The target object if the - refers to an instance method. - - - - - A generic implementation of an , that delegates post processing to a passed delegate - - - This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. - - - The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on - the context instance: - - IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); - ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => - { - of.RegisterSingleton("someObject", someObject); - })); - - - Erich Eichinger - - - - Get or Set the handler to delegate configuration to - - - - - Descriptor for a specific dependency that is about to be injected. - Wraps a constructor parameter, a method parameter or a field, - allowing unified access to their metadata. - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for a method or constructor parameter. - Considers the dependency as 'eager' - - The MethodParameter to wrap. - if set to true if the dependency is required. - - - - Initializes a new instance of the class for a method or a constructor parameter. - - The MethodParameter to wrap. - if set to true the dependency is required. - if set to true the dependency is 'eager' in the sense of - eagerly resolving potential target objects for type matching. - - - - Gets a value indicating whether this dependency is required. - - true if required; otherwise, false. - - - - Determine the declared (non-generic) type of the wrapped parameter/field. - - The type of the dependency (never null - - - - Gets a value indicating whether this is eager in the sense of - eagerly resolving potential target beans for type matching. - - true if eager; otherwise, false. - - - - Gets the wrapped MethodParameter, if any. - - The method parameter. - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
- - If the value is . - - - If the value is an . - - - If the value is an interface. - -
- - - The of objects created by this factory. - - - Always returns the . - - - - - A very simple, hashtable-based implementation of - - Erich Eichinger - - - - Creates a new, empty variable source - - - - - Creates a new, empty and case-insensitive variable source - - - - - Create a new variable source from a list of paired string values. - - - - The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: - - new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) - - - - the argument list containing pairs, or null - - - - Initializes a new instance of the DictionaryVariableSource class. - - - - - Creates a new variable source, reading values from another dictionary - and converting them to strings if necessary - - - - - Adds a key/value pair - - this dictionary. allows for fluent config - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Performs a variable name lookup - - - - - Specifies how instances of the - - class must apply environment variables when replacing values. - - Mark Pollack - - - - Never replace environment variables. - - - - - If properties are not specified via a resource, - then resolve using environment variables. - - - - - Apply environment variables first before applying properties from a - resource. - - - - - Implementation of that - resolves variable name against environment variables. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Holder for event handler values for an object. - - Rick Evans (.NET) - - - - The empty array of s. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Adds the supplied handler to the collection of event handlers. - - The handler to be added. - - - - The mapping of event names to an - of - s. - - - - - Gets the of events - that have handlers associated with them. - - - - - Gets the of - s for the supplied - event name. - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to a Spring that should be evaluated at runtime. - - Aleksandar Seovic - - - - Creates a new instance of the - - class. - - The expression to resolve. - - - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Gets or sets the expression string. Setting the expression string will cause - the expression to be parsed. - - The expression string. - - - - Return the expression. - - - - - Properties for this expression node. - - - - - implementation that - retrieves a static or non-static public field value. - - -

- Typically used for retrieving public constants. -

-
- -

- The following example retrieves the field value... -

- - - - - - -

- The previous example could also have been written using the convenience - - property, like so... -

- - - - - -

- This class also implements the - interface - (). - If the id (or name) of one's - - object definition is set to the - of the field to be retrieved, then the id (or - name) of one's object definition will be used for the name of the - field lookup. See below for an example of this - concise style of definition. -

- - - - - - - -

- The usage for retrieving instance fields is similar. No example is shown - because public instance fields are generally bad practice; but if - you have some legacy code that exposes public instance fields, or if you - just really like coding public instance fields, then you can use this - implementation to - retrieve such field values. -

- - Juergen Hoeller - Rick Evans (.NET) - - - - Interface to be implemented by objects that wish to be aware of their object - name in an . - - -

- Note that most objects will choose to receive references to collaborating - objects via respective properties. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. -

-
-
- - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - -

- This method allows the object instance to perform initialization only - possible when all object properties have been set and to throw an - exception in the event of misconfiguration. -

-
- - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The of the - field to be retrieved. - - - - - Set the name of the object in the object factory that created this object. - - - The name of the object in the factory. - - -

- In the context of the - - class, the - - value will be interepreted as the value of the - - property if no value has been explicitly assigned to the - - property. This allows for concise object definitions with just an id or name; - see the class documentation for - - for an example of this style of usage. -

-
-
- - - The name of the field the value of which is to be retrieved. - - -

- If the - - has been set (and is not ), then the value of this property - refers to an instance field name; it otherwise refers to a - field name. -

-
-
- - - The object instance on which the field is defined. - - - - - The on which the field is defined. - - - - - The of object that this - creates, or - if not known in advance. - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - Extension of the - interface to be implemented by object factories that are capable of - autowiring and expose this functionality for existing object instances. - - Juergen Hoeller - Rick Evans (.NET) - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - the resolved object, or null if none found - if dependency resolution failed - - - - Extension of the interface - that injects dependencies into the object managed by the factory. - - Bruno Baia - - - - Gets the template object definition that should be used - to configure the instance of the object managed by this factory. - - - - - SPI interface to be implemented by most if not all listable object factories. - - -

- Allows for framework-internal plug'n'play, e.g. in - . -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Configuration interface to be implemented by most if not all object - factories. - - -

- Provides the means to configure an object factory in addition to the - object factory client methods in the - interface. -

-

- Allows for framework-internal plug'n'play even when needing access to object - factory configuration methods. -

-

- When disposed, it will destroy all cached singletons in this factory. Call - when you want to shutdown - the factory. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Interface that defines a registry for shared object instances. - - - Can be implemented by - implementations in order to expose their singleton management facility - in a uniform manner. - - The interface extends this interface. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Registers the given existing object as singleton in the object registry, - under the given object name. - - - - The given instance is supposed to be fully initialized; the registry - will not perform any initialization callbacks (in particular, it won't - call IInitializingObject's AfterPropertiesSet method). - The given instance will not receive any destruction callbacks - (like IDisposable's Dispose method) either. - - - If running within a full IObjectFactory: Register an object definition - instead of an existing instance if your object is supposed to receive - initialization and/or destruction callbacks. - - - Typically invoked during registry configuration, but can also be used - for runtime registration of singletons. As a consequence, a registry - implementation should synchronize singleton access; it will have to do - this anyway if it supports a BeanFactory's lazy initialization of singletons. - - - Name of the object. - The singleton object. - - - - - - Return the (raw) singleton object registered under the given name. - - - - Only checks already instantiated singletons; does not return an Object - for singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to access manually registered singletons - . Can also be used to access a singleton - defined by an object definition that already been created, in a raw fashion. - - - Name of the object to look for. - the registered singleton object, or null if none found - - - - - Check if this registry contains a singleton instance with the given name. - - - - Only checks already instantiated singletons; does not return true - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check whether a - singleton defined by an object definition has already been created. - - - To check whether an object factory contains an object definition with a given name, - use ListableBeanFactory's ContainsObjectDefinition. Calling both - ContainsObjectDefinition and ContainsSingleton answers - whether a specific object factory contains an own object with the given name. - - - Use IObjectFactory's ContainsObject for general checks whether the - factory knows about an object with a given name (whether manually registered singleton - instance or created by bean definition), also checking ancestor factories. - - - Name of the object to look for. - - true if this bean factory contains a singleton instance with the given name; otherwise, false. - - - - - - - - Gets the names of singleton objects registered in this registry. - - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - The list of names as String array (never null). - - - - - - - Gets the number of singleton beans registered in this registry. - - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - The number of singleton objects. - - - - - - - Ignore the given dependency type for autowiring. - - -

- To be invoked during factory configuration. -

-

- This will typically be used for dependencies that are resolved - in other ways, like - through . -

-
- - The to be ignored. - -
- - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - -

- To be invoked during factory configuration. -

-
- - The - to register. - -
- - - Given an object name, create an alias. - - -

- This is typically used to support names that are illegal within - XML ids (which are used for object names). -

-

- Typically invoked during factory configuration, but can also be - used for runtime registration of aliases. Therefore, a factory - implementation should synchronize alias access. -

-
- The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - -
- - - Register the given custom - for all properties of the given . - - -

- To be invoked during factory configuration. -

-
- - The required of the property. - - - The to register. - -
- - - Set the parent of this object factory. - - -

- Note that the parent shouldn't be changed: it should only be set outside - a constructor if it isn't available when an object of this class is - created. -

-
-
- - - Returns the current number of registered - s. - - - The current number of registered - s. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - -

- Typically invoked at the end of factory setup, if desired. -

-

- As this is a startup method, it should destroy already created singletons if - it fails, to avoid dangling resources. In other words, after invocation - of that method, either all or no singletons at all should be - instantiated. -

-
- - If one of the singleton objects could not be created. - -
- - - Register a special dependency type with corresponding autowired value. - - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the BeanFactory interface itself. - - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - May be used to store custom value references in object definition properties. - - - Erich Eichinger - - - - - - the object factory holding the given object definition - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Subinterface of - that adds - a before-destruction callback. - - - The typical usage will be to invoke custom destruction callbacks on - specific object types, matching corresponding initialization callbacks. - - Juergen Hoeller - Simon White (.NET) - - - - Apply this - to the - given new object instance before its destruction. Can invoke custom - destruction callbacks. - - The new object instance. - The name of the object. - - In case of errors. - - - - - Denotes a special placeholder collection that may contain - s or - other placeholder objects that will need to be resolved. - - -

- 'A special placeholder collection' means that the elements of this - collection can be placeholders for objects that will be resolved later by - a Spring.NET IoC container, i.e. the elements themselves will be - resolved at runtime by the enclosing IoC container. -

-

- The core Spring.NET library already provides three implementations of this interface - straight out of the box; they are... -

- - - - . - - - - - . - - - - - . - - - -

- If you have a custom collection class (i.e. a class that either implements the - directly or derives from a class that does) - that you would like to expose as a special placeholder collection (i.e. one that can - have s as elements - that will be resolved at runtime by an appropriate Spring.NET IoC container, just - implement this interface. -

-
- -

- Lets say one has a Bag class (i.e. a collection that supports bag style semantics). -

- - using System; - - using Spring.Objects.Factory.Support; - - namespace MyNamespace - { - public sealed class Bag : ICollection - { - // ICollection implementation elided for clarity... - - public void Add(object o) - { - // implementation elided for clarity... - } - } - - public class ManagedBag : Bag, IManagedCollection - { - public ICollection Resolve( - string objectName, RootObjectDefinition definition, - string propertyName, ManagedCollectionElementResolver resolver) - { - Bag newBag = new Bag(); - string elementName = propertyName + "[bag-element]"; - foreach(object element in this) - { - object resolvedElement = resolver(objectName, definition, elementName, element); - newBag.Add(resolvedElement); - } - return newBag; - } - } - } - -
- Rick Evans -
- - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Resolves a single element value of a managed collection. - - -

- If the does not need to be resolved or - converted to an appropriate , the - will be returned as-is. -

-
- - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - That element of a managed collection that may need to be resolved - to a concrete value. - - A fully resolved element. -
- - - Describes an object instance, which has property values, constructor - argument values, and further information supplied by concrete implementations. - - -

- This is just a minimal interface: the main intention is to allow - - (like PropertyPlaceholderConfigurer) to access and modify property values. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - Return the event handlers for any events exposed by this object. - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The name of the parent definition of this object definition, if any. - - - - - The target scope for this object. - - - - - Get the role hint for this object definition - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition. - - Note that this does not have to be the actual type name used at runtime, - in case of a child definition overrding/inheriting the the type name from its - parent. It can be modifed during object factory post-processing, typically - replacing the original class name with a parsed variant of it. - Hence, do not consider this to be the definitive bean type at runtime - but rather only use it for parsing purposes at the individual object - definition level. - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - implementation that - creates instances of the class. - - -

- Typically used for retrieving shared - instances for common topics (such as the 'DAL', 'BLL', etc). The - - property determines the name of the - Common.Logging logger. -

-
- Rick Evans - -
- - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The name of the instance served up by - this factory. - - - If the supplied is - or contains only whitespace character(s). - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object - managed by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The name of the instance served up by - this factory. - - - The name of the instance served up by - this factory. - - - If the supplied to the setter is - or contains only whitespace character(s). - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Tag subclass used to hold a dictionary of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Interface representing an object whose value set can be merged with that of a parent object. - - Rob Harrop - Mark Pollack (.NET) - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. - - - - - Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. - - The approximate number of elements that the object can initially contain. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the keys of this managed dictionary. - - The unresolved name for the type of the keys of this managed dictionary. - - - - Gets or sets the unresolved name for the - of the values of this managed dictionary. - - The unresolved name for the type of the values of this managed dictionary. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a list of managed elements. - - Rod Johnson - Rick Evans (.NET) - - - - Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. - - - - - Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. - - The number of elements that the new list can initially store. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed list. - - The unresolved name for the type of the elements of this managed list. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag class which represent a Spring-managed instance that - supports merging of parent/child definitions. - - - - - Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - - - - Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - The initial number of entries that the can contain. is less than zero. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a set of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed set. - - The unresolved name for the type of the elements of this managed set. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - An that returns a value - that is the result of a or instance method invocation. - - -

- Note that this class generally is expected to be used for accessing factory methods, - and as such defaults to operating in singleton mode. The first request to - - by the owning object factory will cause a method invocation, the return - value of which will be cached for all subsequent requests. The - property may be set to - , to cause this factory to invoke the target method each - time it is asked for an object. -

-

- A target method may be specified by setting the - property to a string representing - the method name, with specifying - the that the method is defined on. - Alternatively, a target instance method may be specified, by setting the - property as the target object, and - the property as the name of the - method to call on that target object. Arguments for the method invocation may be - specified by setting the property. -

-

- Another (esoteric) use case for this factory object is when one needs to call a method - that doesn't return any value (for example, a class method to - force some sort of initialization to happen)... this use case is not supported by - factory-methods, since a return value is needed to become the object. -

-

- - This class depends on the - - method being called after all properties have been set, as per the - contract. If you are - using this class outside of a Spring.NET IoC container, you must call one of either - or - yourself to ready the object's internal - state, or you will get a nasty . - -

-
- -

- The following example uses an instance of this class to call a - factory method... -

- - - - - - - - 1st - 2nd - and 3rd arguments - - - - -

- The following example is similar to the preceding example; the only pertinent difference is the fact that - a number of different objects are passed as arguments, demonstrating that not only simple value types - are valid as elements of the argument list... -

- - - - - - - - - - - 1st - - - - - - - http://www.springframework.net/ - - - - - -

- Named parameters are also supported... this next example yields the same results as - the preceding example (that did not use named arguments). -

- - - - - - - - - - 1st - and 3rd arguments - 2nd - - - - -

- Similarly, the following example uses an instance of this class to call an instance method... -

- - - - - - - - - -

- The above example could also have been written using an anonymous inner object definition... if the - object on which the method is to be invoked is not going to be used outside of the factory object - definition, then this is the preferred idiom because it limits the scope of the object on which the - method is to be invoked to the surrounding factory object. -

- - - - - - - - - - Colin Sampaleanu - Juergen Hoeller - Rick Evans (.NET) - Simon White (.NET) - - - - - - Specialisation of the class that tries - to convert the given arguments for the actual target method via an - appropriate implementation. - - Juergen Hoeller - Rick Evans - - - - - Helper class allowing one to declaratively specify a method call for later invocation. - - -

- Typically not used directly but via its subclasses such as - . -

-

- Usage: specify either the and - or the - and - properties respectively, and - (optionally) any arguments to the method. Then call the - method to prepare the invoker. - Once prepared, the invoker can be invoked any number of times. -

-
- -

- The following example uses the class to invoke the - ToString() method on the Foo class using a mixture of both named and unnamed - arguments. -

- - public class Foo - { - public string ToString(string name, int age, string address) - { - return string.Format("{0}, {1} years old, {2}", name, age, address); - } - - public static void Main() - { - Foo foo = new Foo(); - MethodInvoker invoker = new MethodInvoker(); - invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; - invoker.AddNamedArgument("age", 29); - invoker.Prepare(); - // at this point, the arguments that will be passed to the method invocation - // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} - string details = (string) invoker.Invoke(); - Console.WriteLine (details); - // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' - } - } - -
- Colin Sampaleanu - Juergen Hoeller - Simon White (.NET) -
- - - The used to search for - the method to be invoked. - - - - - The value returned from the invocation of a method that returns void. - - - - - The method that will be invoked. - - - - - Creates a new instance of the class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set, or a matching argument could not be found - for a named argument (typically down to a typo). - - - If the specified method could not be found. - -
- - - Searches for and returns the method that is to be invoked. - - - The return value of this method call will subsequently be returned from the - . - - The method that is to be invoked. - - If no method could be found. - - - If more than one method was found. - - - - - Adds the named argument to this instances mapping of argument names to argument values. - - - The name of an argument on the method that is to be invoked. - - - The value of the named argument on the method that is to be invoked. - - - - - Returns the prepared object that - will be invoked. - - -

- A possible use case is to determine the return of the method. -

-
- - The prepared object that - will be invoked. - -
- - - Invoke the specified method. - - -

- The invoker needs to have been prepared beforehand (via a call to the - method). -

-
- - The object returned by the method invocation, or - if the method returns void. - - - If at least one of the arguments passed to this - was incompatible with the signature of the invoked method. - -
- - - The target on which to call the target method. - - -

- Only necessary when the target method is ; - else, a target object needs to be specified. -

-
-
- - - The target object on which to call the target method. - - -

- Only necessary when the target method is not ; - else, a target class is sufficient. -

-
-
- - - The name of the method to be invoked. - - -

- Refers to either a method - or a non- method, depending on - whether or not a target object has been set. -

-
- -
- - - Arguments for the method invocation. - - -

- Ordering is significant... the order of the arguments in this - property must match the ordering of the various parameters on the target - method. There does however exist a small possibility for confusion when - the arguments in this property are supplied in addition to one or more named - arguments. In this case, each named argument is slotted into the index position - corresponding to the named argument... once once all named arguments have been - resolved, the arguments in this property are slotted into any remaining (empty) - slots in the method parameter list (see the example in the overview of the - class if this is not clear). -

-

- If this property is not set, or the value passed to the setter invocation - is or a zero-length array, a method with no (un-named) arguments is assumed. -

-
- -
- - - The resolved arguments for the method invocation. - - - - This property is not set until the target method has been resolved via a call to the - method). It is a combination of the - named and plain vanilla arguments properties, and it is this object array that - will actually be passed to the invocation of the target method. - -

- Setting the value of this property to results in basically clearing out any - previously prepared arguments... another call to the - method will then be required to prepare the arguments again (or the prepared arguments - can be set explicitly if so desired). -

-
- - -
- - - Named arguments for the method invocation. - - -

- The keys of this dictionary are the () names of the - method arguments, and the () values are the actual - argument values themselves. -

-

- If this property is not set, or the value passed to the setter invocation - is a reference, a method with no named arguments is assumed. -

-
- -
- - - Creates a new instance of the - class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set. - - - If the specified method could not be found. - -
- - - Register the given custom - for all properties of the given . - - - The of property. - - - The to register. - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - -

- Returns the return value of the method that is to be invoked. -

-

- Will return the same value each time if the - - property value is . -

-
- - An instance (possibly shared or independent) of the object managed by - this factory. - - -
- - - Prepares this method invoker. - - - If all required properties are not set. - - - If the specified method could not be found. - - - - - - If a singleton should be created, or a new object on each request. - Defaults to . - - - - - Return the return value of the method - that this factory invokes, or if not - known in advance. - - -

- If the return value of the method that this factory is to invoke is - , then the - will be returned (in accordance with the - contract that - treats a value as a configuration error). -

-
- -
- - - Holder for an with - name and aliases. - - -

- Recognized by - - for inner object definitions. Registered by - , - which also uses it as general holder for a parsed object definition. -

-

- Can also be used for programmatic registration of inner object - definitions. If you don't care about the functionality offered by the - interface and the like, - registering - or is good enough. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - - The name of the object definition. - - - - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - The name of the object. - - Any aliases for the supplied - - - - - The held by this - instance. - - - - - The name of the object definition. - - - - - Any aliases for the object definition. - - -

- Guaranteed to never return ; if the associated - - does not have any aliases associated with it, then an empty - array will be returned. -

-
-
- - - Visitor class for traversing objects, in particular - the property values and constructor arguments contained in them resolving - object metadata values. - - - Used by and - to parse all string values contained in a ObjectDefinition, resolving any placeholders found. - - Mark Pollack - - - - Initializes a new instance of the class. - - The handler to be called for resolving variables contained in a string. - - - - Initializes a new instance of the class - for subclassing - - Subclasses should override the ResolveStringValue method - - - - Traverse the given ObjectDefinition object and the MutablePropertyValues - and ConstructorArgumentValues contained in them. - - The object definition to traverse. - - - - Visits the ObjectDefinition property ObjectTypeName, replacing string values using - the specified IVariableSource. - - The object definition. - - - - Visits the property values of the ObjectDefinition, replacing string values - using the specified IVariableSource. - - The object definition. - - - - Visits the indexed constructor argument values, replacing string values using the - specified IVariableSource. - - The indexed argument values. - - - - Visits the named constructor argument values, replacing string values using the - specified IVariableSource. - - The named argument values. - - - - Visits the generic constructor argument values, replacing string values using - the specified IVariableSource. - - The genreic argument values. - - - - Configures the constructor argument ValueHolder. - - The vconstructor alue holder. - - - - Resolves the given value taken from an object definition according to its type - - the value to resolve - the resolved value - - - - Visits the ManagedList property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet properties KeyTypeName and ValueTypeName and - calls for dictionary's value element. - - - - - Visits the elements of a NameValueCollection and calls - for value of each element. - - - - - calls the to resolve any variables contained in the raw string. - - the raw string value containing variable placeholders to be resolved - If no has been configured. - the resolved string, having variables being replaced, if any - - - - Returns a value that is an - that - returns an object from an - . - - -

- The primary motivation of this class is to avoid having a client object - directly calling the - - method to get a prototype object out of an - , which would be a - violation of the inversion of control principle. With the use of this - class, the client object can be fed an - as a property - that directly returns one target prototype object. -

-

- The object referred to by the value of the - - property does not have to be a prototype object, but there is little - to no point in using this class in conjunction with a singleton object. -

-
- -

- The following XML configuration snippet illustrates the use of this - class... -

- - - - - - - - - - - - - - - - Colin Sampaleanu - Simon White (.NET) - - - - Interface to be implemented by objects that wish to be aware of their owning - . - - -

- For example, objects can look up collaborating objects via the factory. -

-

- Note that most objects will choose to receive references to collaborating - objects via respective properties and / or an appropriate constructor. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - 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. - -
- - - Returns an instance of the object factory. - - The object factory. - - - - Invoked by an - after it has set all supplied object properties. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Sets the name of the target object. - - - - - 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 of object created by this factory. - - - - - Interface defining a factory which can return an object instance - (possibly shared or independent) when invoked. - - - This interface is typically used to encapsulate a generic factory - which returns a new instance (prototype) on each invocation. - It is similar to the , but - implementations of the aforementioned interface are normally meant to be defined - as instances by the user in an , - while implementations of this class are normally meant to be fed as a property to - other objects; as such, the - method - has different exception handling behavior. - - Colin Sampaleanu - Simon White (.NET) - - - - Return an instance (possibly shared or independent) - of the object managed by this factory. - - - An instance of the object (should never be ). - - - - - Creates a new instance of the GenericObjectFactory class. - - - The enclosing - . - - - - - Returns the object created by the enclosed object factory. - - The created object. - - - - An implementation - that exposes an arbitrary target object under a different name. - - -

- Usually, the target object will reside in a different object - definition file, using this - to link it in - and expose it under a different name. Effectively, this corresponds - to an alias for the target object. -

- - For XML based object definition files, a <alias> - tag is available that effectively achieves the same. - -
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Initialize a new default instance - - - - - Initialize this instance with the predefined and . - - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The name of the target object. - - -

- The target object may potentially be defined in a different object - definition file. -

-
- The name of the target object. -
- - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Callback that supplies the owning factory to an object instance. - - - The owning - (may not be ). The object can immediately - call methods on the factory. - - - In case of initialization errors. - - - - - - - Erich Eichinger - - - - Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. - - - - - Role hint indicating that a is a supporting - part of some larger configuration, typically an outer ComponentDefinition - SUPPORT objects are considered important enough to be aware - of when looking more closely at a particular ComponentDefinition, - but not when looking at the overall configuration of an application. - - - - - Role hint indicating that a is providing an - entirely background role and has no relevance to the end-user. This hint is - used when registering objects that are completely part of the internal workings - of a ComponentDefinition. - - - - - Implementation of that - resolves variable name against Java-style property file. - - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets the locations of the property files - to read properties from. - - - The locations of the property files - to read properties from. - - - - - Convinience property. Gets or sets a single location - to read properties from. - - - A location to read properties from. - - - - - Sets a value indicating whether to ignore resource locations that do not exist. This will call - the Exists property. - - - true if one should ignore missing resources; otherwise, false. - - - - - Overrides default values in one or more object definitions. - - -

- Instances of this class override already existing values, and is - thus best suited to replacing defaults. If you need to replace - placeholder values, consider using the - - class instead. -

-

- In contrast to the - - class, the original object definition can have default - values or no values at all for such object properties. If an overriding - configuration file does not have an entry for a certain object property, - the default object value is left as is. Also note that it is not - immediately obvious to discern which object definitions will be mutated by - one or more - s - simply by looking at the object configuration. -

-

- Each line in a referenced configuration file is expected to take the - following form... -

- - - -

- The name.property key refers to the object name and the - property that is to be overridden; and the value is the overridding - value that will be inserted into the appropriate object definition's - named property. -

-

- Please note that in the case of multiple - s - that define different values for the same object definition value, the - last overridden value will win (due to the fact that the values - supplied by previous - s - will be overridden). -

-
- -

- The following XML context definition defines an object that has a number - of properties, all of which have default values... -

- - - - - - - - -

- What follows is a .NET config file snippet for the above example (assuming - the need to override one of the default values)... -

- - - - - - -
- Juergen Hoeller - Simon White (.NET) - - - -
- - - Allows for the configuration of individual object property values from - a .NET .config file. - - -

- Useful for custom .NET .config files targetted at system administrators - that override object properties configured in the application context. -

-

- Two concrete implementations are provided in the Spring.NET core library: - - - - - for <add key="placeholderKey" value="..."/> style - overriding (pushing values from a .NET .config file into object - definitions). - - - - - - for replacing "${...}" placeholders (pulling values from a .NET .config - file into object definitions). - - - -

-

- Please refer to the API documentation for the concrete implementations - listed above for example usage. -

-
- Juergen Hoeller - Simon White (.NET) - - -
- - - The default configuration section name to use if none is explictly supplied. - - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Modify the application context's internal object factory after its - standard initialization. - - - The object factory used by the application context. - - - In case of errors. - - - - - - Loads properties from the configuration sections - specified in into . - - The instance to be filled with properties. - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Validates the supplied . - - -

- Basically, if external locations are specified, ensure that either - one or a like number of config sections are also specified. -

-
- - The to be validated. - -
- - - Simply initializes the supplied - collection with this instances default - (if any). - - - The collection to be so initialized. - - - - - The policy for resolving conflicting property overrides from - several resources. - - -

- When merging conflicting property overrides from several resources, - should append an override with the same key be appended to the - current value, or should the property override from the last resource - processed override previous values? -

-

- The default value is ; i.e. a property - override from the last resource to be processed overrides previous - values. -

-
- - if the property override from the last resource - processed overrides previous values. - -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - The default properties to be applied. - - -

- These are to be considered defaults, to be overridden by values - loaded from other resources. -

-
-
- - - The location of the .NET .config file that contains the property - overrides that are to be applied. - - - - - The locations of the .NET .config files containing the property - overrides that are to be applied. - - - - - The configuration sections to look for within the .config files. - - - - - - - Should a failure to find a .config file be ignored? - - -

- is only appropriate if the .config file is - completely optional. The default is . -

-
- - if a failure to find a .config file is to be - ignored. - -
- - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Process the given key as 'name.property' entry. - - - The object factory containing the object definitions that are to be - processed. - - The key. - The value. - - If an error occurs. - - - If the property was not well formed (i.e. not in the format "name.property"). - - - - - implementation that - evaluates a property path on a given target object. - - -

- The target object can be specified directly or via an object name (see - example below). -

-

- Please note that the - is an implementation, and as such has - to comply with the contract of the - interface; more specifically, this means that the end result of the property lookup path - evaluation cannot be ( - implementations are not permitted to return ). If the resut of a - property lookup path evaluates to , an exception will be thrown. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Juergen Hoeller - Rick Evans (.NET) - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The target object that the property path lookup is to be applied to. - - -

- This would most likely be an inner object, but can of course be - any object reference. -

-
- - The target object that the property path lookup is to be applied to. - - -
- - - The (object) name of the target object that the property path lookup - is to be applied to. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this name prior to resolution. The implication of this is that - one cannot use the - class in conjunction with object names that start or end with whitespace. -

-
- - The (object) name of the target object that the property path lookup - is to be applied to. - - -
- - - The property (lookup) path to be applied to the target object. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this path prior to resolution. Whitespace is not a valid - identifier for property names (in part or whole) in CLS-based languages, - so this is a not unreasonable action. Please also note that whitespace - that is embedded within the property path will be left as-is (which may - or may not result in an error being thrown, depending on the context of - the whitespace). -

-
- -

- Examples of such property lookup paths can be seen below; note that - property lookup paths can be nested to an arbitrary level. -

- - name.length - accountManager.account['the key'].name - accounts[0].name - -
- - The property (lookup) path to be applied to the target object. - -
- - - The 'expected' of the result from evaluating the - property path. - - -

- This is not necessary for directly specified target objects, or - singleton target objects, where the can - be determined via reflection. Just specify this in case of a - prototype target, provided that you need matching by type (for - example, for autowiring). -

-

- It is permissable to set the value of this property to - (which in any case is the default value). -

-
- - The 'expected' of the result from evaluating the - property path. - -
- - - 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? - - - - - - Set the name of the object in the object factory that created this object. - - -

- The object name of this - - will be interpreted as "objectName.property" pattern, if neither the - - - have been supplied (set). -

-

- This allows for concise object definitions with just an id or name. -

-
- - The name of the object in the factory. - -
- - - 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. - - - - - Resolves placeholder values in one or more object definitions. - - -

- The default placeholder syntax follows the NAnt style: ${...}. - Instances of this class can be configured in the same way as any other - object in a Spring.NET container, and so custom placeholder prefix - and suffix values can be set via the - and properties. -

- -

- The following example XML context definition defines an object that has - a number of placeholders. The placeholders can easily be distinguished - by the presence of the ${} characters. -

- - - - - - - - -

- The associated XML configuration file for the above example containing the - values for the placeholders would contain a snippet such as .. -

- - - - - - - - -

- The preceding XML snippet listing the various property keys and their - associated values needs to be inserted into the .NET config file of - your application (or Web.config file for your ASP.NET web application, - as the case may be), like so... -

- - - - - - - - -
-

- - checks simple property values, lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. -

- - - - - - - - -

- In contrast to the - - class, this configurer only permits the replacement of explicit - placeholders in object definitions. Therefore, the original definition - cannot specify any default values for its object properties, and the - placeholder configuration file is expected to contain an entry for each - defined placeholder. That is, if an object definition contains a - placeholder ${foo}, there should be an associated - <add key="foo" value="..."/> entry in the - referenced placeholder configuration file. Default property values - can be defined via the inherited - - collection to overcome any perceived limitation of this feature. -

-

- If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. If you want to resolve properties from multiple configuration - resources, simply specify multiple resources via the - - property. Finally, please note that you can also define multiple - - instances, each with their own custom placeholder syntax. -

-
- Juergen Hoeller - Simon White (.NET) - - - -
- - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Initializes the new instance - - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Parse values recursively to be able to resolve cross-references between - placeholder values. - - - The map of constructor arguments / property values. - - The string to be resolved. - The placeholders that have already been visited - during the current resolution attempt (used to detect circular references - between placeholders). Only non-null if we're parsing a nested placeholder. - - If an error occurs. - - The resolved string. - - - - Resolve the given placeholder using the given name value collection, - performing an environment variables check according to the given mode. - - -

- The default implementation delegates to - - before/afer the environment variable check. Subclasses can override - this for custom resolution strategies, including customized points - for the environment properties check. -

-
- The placeholder to resolve - - The merged name value collection of this configurer. - - The environment variable mode. - - The resolved value or if none. - - -
- - - Resolve the given placeholder using the given name value collection. - - -

- This (the default) implementation simply looks up the value of the - supplied key. -

-

- Subclasses can override this for customized placeholder-to-key - mappings or custom resolution strategies, possibly just using the - given name value collection as fallback. -

-
- The placeholder to resolve. - - The merged name value collection of this configurer. - - The resolved value. -
- - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Controls how environment variables will be used to - replace property placeholders. - - -

- See the overview of the - - enumeration for the available options. -

-
-
- - - implementation that - retrieves a or non-static public property value. - - -

- Typically used for retrieving public property values. -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - Template method that subclasses must override to construct the object - returned by this factory. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - The of the static property - to be retrieved. - - - - - Arguments for the property invocation. - - -

- If this property is not set, or the value passed to the setter invocation - is a null or zero-length array, a property with no arguments is assumed. -

-
-
- - - The name of the property the value of which is to be retrieved. - - -

- Refers to either a property or a non-static property, - depending on a target object being set. -

-
-
- - - The object instance on which the property is defined. - - - - - The on which the property is defined. - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - Implementation of that - resolves variable name against registry key. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, - strings are concatenated to a comma-separated list following - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets the registry key to obtain variable values from. - - - The registry key to obtain variable values from. - - - - - - implementation that allows for convenient registration of custom - IResource implementations. - - -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of IResources is required. -

-
- Mark Pollack - - -
- - - Registers custom IResource implementations. The supplied - is not used since IResourse implementations - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The IResource implementations, i.e. resource handlers, to register. - - -

- The has the - contains the resource protocol name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - The value can be the fully qualified name of the IResource - implementation, a string, or - an actual of the IResource class - -

-
-
- - - A convenience class to create a - given the resource base - name and assembly name. - - -

- This is currently the preferred way of injecting resources into view - tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). - A GUI component (typically a Windows Form) is injected with - an instance, and can - then proceed to use the various GetXxx() methods on the - to retrieve images, - strings, custom resources, etc. -

-
- Mark Pollack - - - -
- - - Creates a . - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The root name of the resources. - - -

- For example, the root name for the resource file named - "MyResource.en-US.resources" is "MyResource". -

- - The namespace is also prefixed before the resource file name. - -
-
- - - The string representation of the assembly that contains the resource. - - - - - The . - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to another object in this factory to be resolved at runtime. - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - -

- This does not mark this object as being a reference to - another object in any parent factory. -

-
- The name of the target object. -
- - - Creates a new instance of the - - class. - - -

- This variant constructor allows a client to specifiy whether or not - this object is a reference to another object in a parent factory. -

-
- The name of the target object. - - Whether this object is an explicit reference to an object in a - parent factory. - -
- - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Return the target object name. - - - - - Is this is an explicit reference to an object in the parent - factory? - - - if this is an explicit reference to an - object in the parent factory. - - - - - Simple factory object for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target set. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - Configure all ISharedStateAware objects, delegating concrete handling to the list of . - - - - - Creates a new empty instance. - - - - - Creates a new preconfigured instance. - - - priority value affecting order of invocation of this processor. See interface. - - - - Iterates over configured list of s until - the first provider is found that
- a) true == provider.CanProvideState( instance, name )
- b) null != provider.GetSharedState( instance, name )
-
-
- - - A NoOp for this processor - - - The new object instance. - - - The name of the object. - - - the original . - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Get/Set the (already ordererd!) list of instances. - - - If this list is not set, the containing object factory will automatically - be scanned for instances. - - - - - Implementation of that - resolves variable name against special folders (as defined by - enumeration). - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves specified special folder to its full path. - - - The name of the special folder to resolve. Should be one of the values - defined by the enumeration. - - - The folder path if able to resolve, null otherwise. - - - - - - implementation that allows for convenient registration of custom - type aliases. - - - Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of type aliases is required. -

-
- Mark Pollack - - -
- - - Registers any type aliases. The supplied - is not used since type aliases - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The type aliases to register. - - -

- The has the - contains the alias name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - the value can be the fully qualified name of the type as a string or - an actual of the class that - being aliased. -

-
-
- - - Holder for a typed value. - - -

- Can be added to object definitions to explicitly specify - a target type for a value, - for example for collection - elements. -

-

- This holder just stores the value and the target - . The actual conversion will be performed by - the surrounding object factory. -

-
- Juergen Hoeller - Rick Evans (.NET) - Bruno Baia (.NET) -
- - - Creates a new instance of the - - class. - - - - - Initializes a new instance of the class. - - The value. - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The to convert to. - - - If the supplied is - . - - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The unresolved type to convert to. - - - If the supplied is a - or an empty string. - - - - - Determine the type to convert to, resolving it from a specified type name if necessary. - - The resolved type to convert to. - - - - The value that is to be converted. - - -

- Obviously if the - - is the , no conversion - will actually be performed. -

-
-
- - - The to convert to. - - - If the setter is supplied with a value. - - - - - The unresolved type to convert to. - - - If the setter is supplied with a value or an empty string. - - - - - Gets a value indicating whether this instance has target type. - - - true if this instance has target type; otherwise, false. - - - - - Provides methods for type-safe accessing s. - - Erich Eichinger - - - - Initialize a new instance of an - - The underlying to read values from. - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - An of 's type that contains the value of the specified variable - or , if returns null. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - An of 's type that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns or . - - A that contains the value of the specified variable - or , if returns null. - - - - - Resolves placeholder values in one or more object definitions - - - The placeholder syntax follows the NAnt style: ${...}. - Placeholders values are resolved against a list of - s. In case of multiple definitions - for the same property placeholder name, the first one in the - list is used. - Variable substitution is performed on simple property values, - lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. - - - - - - - - - - If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. - - Mark Pollack - - - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Create a new instance without any variable sources - - - - - Create a new instance and initialize with the given variable source - - - - - - Create a new instance and initialize with the given list of variable sources - - - - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Apply the property replacement using the specified s for all - object in the supplied - . - - - The - used by the application context. - - - If an error occured. - - - - - Sets the list of s that will be used to resolve placeholder names. - - A list of s. - - - - Sets that will be used to resolve placeholder names. - - A instance. - - - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - Initializes a new instance of the Location class. - - - - - - - Initializes a new instance of the Location class. - - - - - - Thrown when an - encounters an internal error, and its definitions are invalid. - - -

- An example of a situation when this exception would be thrown is - in the case of an XML document containing object definitions being - malformed. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectDefinitionStoreException class. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The description of the resource associated with the object - - - - - The name of the object that trigger the exception. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Initializes a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Initializes a new instance of the class. - - The message. - The location. - - - - Initializes a new instance of the Problem class. - - - - - - - - Context that gets passed along an object definition reading process, - encapsulating all relevant configuraiton as well as state. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The resource. - - - - Gets the resource. - - The resource. - - - - Abstract superclass - that implements default object creation. - - -

- Provides object creation, initialization and wiring, supporting - autowiring and constructor resolution. Handles runtime object - references, managed collections, and object destruction. -

-

- The main template method to be implemented by subclasses is - , - used for autowiring by type. Note that this class does not implement object - definition registry capabilities - ( - does). -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Abstract superclass for - implementations. - - -

- This class provides singleton / prototype determination, singleton caching, - object definition aliasing, - handling, and object definition merging for child object definitions. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Marker object to be temporarily registered in the singleton cache, - while instantiating an object (in order to be able to detect circular references). - - - - - Used as value in hashtable that keeps track of singleton names currently in the - process of being created. Would not be necessary if we created a case insensitive implementation of - ISet. - - - - - The instance for this class. - - - - - Cache of singleton objects created by s: FactoryObject name -> product - - - - - Creates a new instance of the - class. - - -

- This constructor implicitly creates an - - that treats the names of objects in this factory in a case-sensitive fashion. -

-

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - -
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - - - Any parent object factory; may be . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - In case of errors. - -
- - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - In case of errors. - -
- - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Create instance only - suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself, - nor throw an exception. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Does this object factory contain an object definition with the - supplied ? - - -

- Does not consider any hierarchy this factory may participate in. - Invoked by - - when no cached singleton instance is found. -

-
- - The name of the object to look for. - - - if this object factory contains an object - definition with the supplied . - -
- - - Adds the supplied (object) to this factory's - singleton cache. - - -

- To be called for eager registration of singletons, e.g. to be able to - resolve circular references. -

- - If a singleton has already been registered under the same name as - the supplied , then the old singleton will - be replaced. - -
- The name of the object. - The singleton object. - - If the argument is - or consists wholly of whitespace characters; or if the - is . - -
- - - Return the object name, stripping out the factory dereference prefix if - necessary, and resolving aliases to canonical names. - - - The transformed name of the object. - - - - - Ensures, that the given name is prefixed with - if it incidentially already starts with this prefix. This avoids troubles when dereferencing - the object name during - - - - - Determines whether the specified name is defined as an alias as opposed - to the name of an actual object definition. - - The object name to check. - - true if the specified name is alias; otherwise, false. - - - - - Return a , - even by traversing parent if the parameter is a child definition. - - - The name of the object. - - - Are ancestors to be included in the merge? - - -

- Will ask the parent object factory if not found in this instance. -

-
- - A merged - with overridden properties. - -
- - - Return a , - even by traversing parent if the parameter is a child definition. - - - A merged - with overridden properties. - - - - - Creates the root object definition. - - The template definition to base root definition on. - Root object definition. - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Gets the type for the given FactoryObject. - - The factory object instance to check. - the FactoryObject's object type - - - - Gets the object type for the given FactoryObject definition, as far as possible. - Only called if there is no singleton instance registered for the target object already. - - - The default implementation creates the FactoryObject via GetObject - to call its ObjectType property. Subclasses are encouraged to optimize - this, typically by just instantiating the FactoryObject but not populating it yet, - trying whether its ObjectType property already returns a type. - If no type found, a full FactoryObject creation as performed by this implementation - should be used as fallback. - - Name of the object. - The merged object definition for the object. - The type for the object if determinable, or null otherwise - - - - Predict the eventual object type (of the processed object instance) for the - specified object. - - - Does not need to handle FactoryObjects specifically, since it is only - supposed to operate on the raw object type. - This implementation is simplistic in that it is not able to - handle factory methods and InstantiationAwareBeanPostProcessors. - It only predicts the object type correctly for a standard object. - To be overridden in subclasses, applying more sophisticated type detection. - - Name of the object. - The merged object definition to determine the type for. May be null - The type of the object, or null if not predictable - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - - The name that may include the factory dereference prefix. - - The object instance. - - The singleton instance of the object. - - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - The object instance. - - The name that may include the factory dereference prefix (=the requested name). - - - The canonical object name - - the merged object definition - - The singleton instance of the object. - - - - - Obtain an object to expose from the given IFactoryObject. - - The IFactoryObject instance. - Name of the object. - The merged object definition. - The object obtained from the IFactoryObject - If IFactoryObject object creation failed. - - - - Post-process the given object that has been obtained from the FactoryObject. - The resulting object will be exposed for object references. - - The default implementation simply returns the given object - as-is. Subclasses may override this, for example, to apply - post-processors. - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Convenience method to pull an - from this factory. - - - The name of the factory object to be retrieved. If this name is not a valid - name, it will be converted - into one. - - - The associated with the - supplied . - - - - - Is the supplied a factory object dereference? - - - - - Determines whether the type of the given object definition matches the - specified target type. - - Allows for lazy load of the actual object type, provided that the - type match can be determined otherwise. - The default implementation simply delegates to the standard - ResolveObjectType method. Subclasses may override this to use - a differnt strategy. - - Name of the object (for error handling purposes). - The merged object definition to determine the type for. - Type to match against (never null). - - true if object definition matches tye specified target type; otherwise, false. - - if we failed to load the type." - - - - Resolves the type of the object for the specified object definition resolving - an object type name to a Type (if necessary) and storing the resolved Type - in the object definition for further use. - - The merged object definition to dertermine the type for. - Name of the object (for error handling purposes). - - - - - Is the object (definition) with the supplied an - ? - - The name of the object to be checked. - - the object (definition) with the supplied - an ? - - - - - Remove the object identified by the supplied - from this factory's singleton cache. - - - The name of the object that is to be removed from the singleton - cache. - - - If the argument is or - consists wholly of whitespace characters. - - - - - Return the names of objects in the singleton cache that match the given - object type (including subclasses). - - - The class or interface to match, or for all object names. - - -

- Will not consider s - as the type of their created objects is not known before instantiation. -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of objects in the singleton cache that match the given - object type (including subclasses), or an empty array if none. - -
- - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determines the of the object with the - supplied . - - -

- More specifically, checks the of object that - would return. - For an , returns the - of object that the - creates. -

-

- Please note that (prototype) objects created via a factory method or - objects are handled - slightly differently, in that we don't want to needlessly create - instances of such objects just to determine the - of object that they create. -

-
- The name of the object to query. - - The of the object or - if not determinable. - -
- - - Determines the of the object defined - by the supplied object . - - -

- This, the default, implementation returns - to indicate that the type cannot be determined. Subclasses are - encouraged to try to determine the actual return - here, matching their strategy of resolving - factory methods in the - Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject - implementation. -

-
- - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - -
- - - Returns the names of the objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The names of the objects in the singleton cache. -
- - - Returns the number of objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The number of objects in the singleton cache. -
- - - Destroys the named singleton object. - - -

- Delegates to - - if a corresponding singleton instance is found. -

-
- - The name of the singleton object that is to be destroyed. - - -
- - - Check the supplied merged object definition for any possible - validation errors. - - - The object definition to be checked for validation errors. - - - The name of the object associated with the supplied object definition. - - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - - In the case of object validation errors. - - - - - Parent object factory, for object inheritance support - - - - - Dependency types to ignore on dependency check and autowire, as Set of - Type objects: for example, string. Default is none. - - - - - ObjectPostProcessors to apply in CreateObject - - - - - Indicates whether any IInstantiationAwareBeanPostProcessors have been registered - - - - - Indicates whether any IDestructionAwareBeanPostProcessors have been registered - - - - - Set of registered singletons, containing the bean names in registration order - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Is this object a singleton? - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Does this object factory or one of its parent factories contain an object with the given name? - - - This method scans the object factory hierarchy starting with the current factory instance upwards. - Use if you want to explicitely check just this object factory instance. - - . - - - - Return the aliases for the given object name, if defined. - - . - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Return an instance (possibly shared or independent) of the given object name. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name, - optionally injecting dependencies. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - whether to inject dependencies or not. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - - Checks, if the passed instance is of the required type. - - the name of the object - the actual instance - the type contract the given instance must adhere. - the object instance passed in via (for more fluent usage) - - if is null or not assignable to . - - - - - Creates a singleton instance for the specified object name and definition. - - - The object name (will be used as the key in the singleton cache key). - - The object definition. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The created object instance. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - - - - Destroy all cached singletons in this factory. - - - - - Ignore the given dependency type for autowiring - - . - - - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - - The - to register. - - . - - - - Given an object name, create an alias. - - . - - - - Register the given custom - for all properties of the given . - - . - - - - Register the given existing object as singleton in the object factory, - under the given object name. - - . - - - - Does this object factory contains a singleton instance with the - supplied ? - - - - - - Tries to find a cached object for the specified name. - - Teh object name to look for. - The cached object if found, otherwise. - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - Name of the object to check. - - true if is object name in use; otherwise, false. - - - - - Gets the singleton lock for a given object name. - - Name of the object. - lock object - - - - Returns, whether this factory treats object names case sensitive or not. - - - - - Gets the of - s - that will be applied to objects created by this factory. - - - - - Gets the set of classes that will be ignored for autowiring. - - -

- The elements of this are - s. -

-
-
- - - Returns, whether this object factory instance contains objects. - - - - - Returns, whether this object factory instance contains objects. - - - - - Gets the temporary object that is placed - into the singleton cache during object resolution. - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - The parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Returns the current number of registered - s. - - - The current number of registered - s. - - . - - - - Gets the names of singleton objects registered in this registry. - - The list of names as String array (never null). - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - - - - - - - Gets the number of singleton beans registered in this registry. - - The number of singleton objects. - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - - - - - - - Makes a distinction between sort order and object identity. - This is important when used with , since most - implementations assume Order == Identity - - - - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - The used during the invocation and - searching for of methods. - - - - - The instance for this class. - - - - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. -
- - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. - The parent object factory, or if none. -
- - - Predict the eventual object type (of the processed object instance) for the - specified object. - - Name of the object. - The merged object definition to determine the type for. May be null - - The type of the object, or null if not predictable - - - - - Determines the of the object defined - by the supplied object . - - - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - - - Apply any - s. - - -

- The returned instance may be a wrapper around the original. -

-
- - The of the object that is to be - instantiated. - - - The name of the object that is to be instantiated. - - - An instance to use in place of the original instance. - - - In case of errors. - -
- - - Apply the given property values, resolving any runtime references - to other objects in this object factory. - - - The object name passed for better exception information. - - - The definition of the named object. - - - The wrapping the target object. - - - The new property values. - - -

- Must use deep copy, so that we don't permanently modify this property. -

-
-
- - - Create the value resolver strategy to use for resolving raw property values - - - - - Return an array of object-type property names that are unsatisfied. - - -

- These are probably unsatisfied references to other objects in the - factory. Does not include simple properties like primitives or - s. -

-
- - An array of object-type property names that are unsatisfied. - - - The definition of the named object. - - - The wrapping the target object. - -
- - - Destroy all cached singletons in this factory. - - -

- To be called on shutdown of a factory. -

-
-
- - - Populate the object instance in the given - with the property values from the - object definition. - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Wires up any exposed events in the object instance in the given - with any event handler - values from the . - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Fills in any missing property values with references to - other objects in this factory if autowire is set to - . - - - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - - - - - Defines "autowire by type" (object properties by type) behavior. - - -

- This is like PicoContainer default, in which there must be exactly one object - of the property type in the object factory. This makes object factories simple - to configure for small namespaces, but doesn't work as well as standard Spring - behavior for bigger applications. -

-
- - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - -
- - - Ignore the given dependency type for autowiring - - - This will typically be used by application contexts to register - dependencies that are resolved in other ways, like IOjbectFactory through - IObjectFactoryAware or IApplicationContext through IApplicationContextAware. - By default, IObjectFactoryAware and IObjectName interfaces are ignored. - For further types to ignore, invoke this method for each type. - - . - - - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Add the created, but yet unpopulated singleton to the singleton cache - to be able to resolve circular references - - the name of the object to add to the cache. - the definition used to create and populated the object. - the raw object instance. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Remove the specified singleton from the singleton cache that has - been added before by a call to - - the name of the object to remove from the cache. - the definition used to create and populated the object. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Creates an instance from the passed in - using constructor - - The name of the object to create - used for error messages. - The describing the object to be created. - optional arguments to pass to the constructor - An wrapping the already instantiated object - - - - Instantiates the given object using its default constructor - - Name of the object. - The definition. - IObjectWrapper for the new instance - - - - Determines candidate constructors to use for the given object, checking all registered - - - Raw type of the object. - Name of the object. - the candidate constructors, or null if none specified - In case of errors - - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - "autowire constructor" (with constructor arguments by type) behaviour. - - The name of the object to autowire by type. - The object definition to update through autowiring. - The chosen candidate constructors. - The argument values passed in programmatically via the GetObject method, - or null if none (-> use constructor argument values from object definition) - - An for the new instance. - - - - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: in this mode, a Spring.NET - object factory is able to host components that expect constructor-based - dependency resolution. - - - - - - Perform a dependency check that all properties exposed have been set, if desired. - - -

- Dependency checks can be objects (collaborating objects), simple (primitives - and ), or all (both). -

-
- - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - The property values to be checked. - - - If all of the checked dependencies were not satisfied. - -
- - - Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding - ignored dependency types. - - The object wrapper the object was created with. - The filtered PropertyInfos - - - - Determine whether the given bean property is excluded from dependency checks. - This implementation excludes properties whose type matches an ignored dependency type - or which are defined by an ignored dependency interface. - - - - the of the object property - whether the object property is excluded - - - - Give an object a chance to react now all its properties are set, - and a chance to know about its owning object factory (this object). - - -

- This means checking whether the object implements - and / or - , and invoking the - necessary callback(s) if it does. -

-

- Custom init methods are resolved in a case-insensitive manner. -

-
- - The new object instance we may need to initialise. - - - The name the object has in the factory. Used for logging output. - - - The definition of the target object instance. - -
- - - Invoke the specified custom destroy method on the given object. - - -

- This implementation invokes a no-arg method if found, else checking - for a method with a single boolean argument (passing in "true", - assuming a "force" parameter), else logging an error. -

-

- Can be overridden in subclasses for custom resolution of destroy - methods with arguments. -

-

- Custom destroy methods are resolved in a case-insensitive manner. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself. - Should not throw any exceptions. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Destroys all of the objects registered as dependant on the - object (definition) identified by the supplied . - - - The name of the root object (definition) that is itself being destroyed. - - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - Find object instances that match the required . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The of the objects to look up. - - - An of object names and object - instances that match the required , or - if none are found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - Called by DestroyObject, to be able to destroy depending objects first. - - - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Configures object instance by injecting dependencies, satisfying Spring lifecycle - interfaces and applying object post-processors. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - A wrapped object instance that is to be so configured. - - - - - - Applies the PostProcessAfterInitialization callback of all - registered IObjectPostProcessors, giving them a chance to post-process - the object obtained from IFactoryObjects (for example, to auto-proxy them) - - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - If the supplied is not one of the - or - - values. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Cache of filtered PropertyInfos: object Type -> PropertyInfo array - - - - - Dependency interfaces to ignore on dependency check and autowire, as Set of - Class objects. By default, only the IObjectFactoryAware and IObjectNameAware - interfaces are ignored. - - - - - The - implementation to be used to instantiate managed objects. - - - - - An - implementation that provides some convenience support for - derived classes. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Permits the (re)implementation of an arbitrary method on a Spring.NET - IoC container managed object. - - -

- Encapsulates the notion of the Method-Injection form of Dependency - Injection. -

-

- Methods that are dependency injected with implementations of this - interface may be (but need not be) , in which - case the container will create a concrete subclass of the - class prior to instantiation. -

-

- Do not use this mechanism as a means of AOP. See the reference - manual for examples of appropriate usages of this interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Reimplement the supplied . - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the (re)implementation of the method call. - - - - - Creates a new instance of the - - class. - - -

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

-
- - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - -
- - - Is ; derived classes must supply an implementation. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - The result of the object lookup. - - - - Helper method for subclasses to retrieve the appropriate - for the - supplied . - - - The to use to retrieve - the appropriate - . - - - The appropriate - . - - - - - Helper method for subclasses to lookup an object from an enclosing - IoC container. - - - The name of the object that is to be looked up. - - - The named object. - - - - - Common base class for object definitions, factoring out common - functionality from - and - . - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Describes a configurable object instance, which has property values, - constructor argument values, and further information supplied by concrete - implementations. - - Rick Evans - - - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - The method overrides (if any) for this object. - - - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - - - - - Return the event handlers for any events exposed by this object. - - - - - Get or set the role hint for this object definition - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition (if any). - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The dependency check code. - - - - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The object definition used to initialise the member fields of this - instance. - - -

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

-
-
- - - Resolves the type of the object, resolving it from a specified - object type name if necessary. - - - A resolved instance. - - - If the type cannot be resolved. - - - - - Validate this object definition. - - - In the case of a validation failure. - - - - - Validates all - - - - - Validate the supplied . - - - The - to be validated. - - - - - Override settings in this object definition from the supplied - object definition. - - - The object definition used to override the member fields of this instance. - - - - - Returns a that represents the current - . - - - A that represents the current - . - - - - - The name of the parent definition of this object definition, if any. - - - - - The property values that are to be applied to the object - upon creation. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The property values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - Does this definition have any - ? - - - if this definition has at least one - . - - - - - The constructor argument values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The constructor argument values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The event handler values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The event handler values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The method overrides (if any) for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The name of the target scope for the object. - Defaults to "singleton", ootb alternative is "prototype". Extended object factories - might support further scopes. - - - - - Get or set the role hint for this object definition - - - - - Is this definition a singleton, with - a single, shared instance returned on all calls to an enclosing - container (typically an - or - ). - - -

- If , an object factory will apply the - prototype design pattern, with each caller requesting an - instance getting an independent instance. How this is defined - will depend on the object factory implementation. singletons - are the commoner type. -

-
- -
- - - Gets a value indicating whether this instance is prototype, with an independent instance - returned for each call. - - - true if this instance is prototype; otherwise, false. - - - - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup - by object factories that perform eager initialization of - singletons. -

-
-
- - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be - instantiated itself but rather just serving as a parent for concrete - child object definitions. - - - if this object definition is "abstract". - - - - - The of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - - Is the of the object definition a resolved - ? - - - - - Returns the of the - of the object definition (if any). - - - - - A description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. The default is - , - which means that no autowiring will be performed. -

-
-
- - - Gets the resolved autowire mode. - - -

- This resolves - - to one of - - or - . -

-
-
- - - The dependency checking mode. - - -

- The default is - . -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before this object definition. -

- - Dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - The name of the initializer method. - - -

- The default value is the constant, - in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default value is the constant, - in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The - method will be invoked on the specified - . -

-
-
- - - The name of the factory object to use (if any). - - - - - Does this object definition have any constructor argument values? - - - if his object definition has at least one - element in it's - - property. - - - - - Abstract base class for object definition readers. - - -

- Provides common properties like the object registry to work on. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Simple interface for object definition readers. - - Juergen Hoeller - Rick Evans - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The against which any class names - will be resolved into instances. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - Gets the resource loader to use for resource locations. - - There is also a method - available for loading object definitions from a resource location. This is - a convenience to avoid explicit ResourceLoader handling. - The resource loader. - - - - The instance for this class (and derived classes). - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - The against which any class names - will be resolved into instances. - - -

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

-
-
- - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - - The against which any class names - will be resolved into instances. - - - - - Gets or sets the resource loader to use for resource locations. - - The resource loader. - - - - Utility class that contains various methods useful for the implementation of - autowire-capable object factories. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the AutowireUtils class. - - -

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

-
-
- - - Gets those s - that are applicable for autowiring the supplied . - - - The - (definition) that is being autowired by constructor. - - - The absolute minimum number of arguments that any returned constructor - must have. If this parameter is equal to zero (0), then all constructors - are valid (regardless of their argument count), including any default - constructor. - - - Those s - that are applicable for autowiring the supplied . - - - - - Determine a weight that represents the class hierarchy difference between types and - arguments. - - -

- A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase - the result - all direct matches means weight zero (0). A match between the argument type - and a MyInteger instance argument would increase the weight by - 1, due to the superclass () being one (1) steps up in the - class hierarchy being the last one that still matches the required type. -

-

- Therefore, with an argument of type , a - constructor taking a argument would be - preferred to a constructor taking an argument - which would be preferred to a constructor taking an - argument which would in turn be preferred - to a constructor taking an argument. -

-

- All argument weights get accumulated. -

-
- - The argument s to match. - - The arguments to match. - The accumulated weight for all arguments. -
- - - Algorithm that judges the match between the declared parameter types of a candidate method - and a specific list of arguments that this method is supposed to be invoked with. - - - Determines a weight that represents the class hierarchy difference between types and - arguments. The following a an example based on the Java class hierarchy for Integer. - A direct match, i.e. type Integer -> arg of class Integer, does not increase - the result - all direct matches means weight 0. A match between type Object and arg of - class Integer would increase the weight by 2, due to the superclass 2 steps up in the - hierarchy (i.e. Object) being the last one that still matches the required type Object. - Type Number and class Integer would increase the weight by 1 accordingly, due to the - superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. - Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a - constructor (Number) which would in turn be preferred to a constructor (Object). - All argument weights get accumulated. - - The param types. - The args. - - - - - Determines whether the given object property is excluded from dependency checks. - - The PropertyInfo of the object property. - - true if is excluded from dependency check; otherwise, false. - - - - - Sorts the supplied , preferring - public constructors and "greedy" ones (that have lots of arguments). - - -

- The result will contain public constructors first, with a decreasing number - of arguments, then non-public constructors, again with a decreasing number - of arguments. -

-
- - The array to be sorted. - -
- - - Determines whether the setter property is defined in any of the given interfaces. - - The PropertyInfo of the object property - The ISet of interfaces. - - true if setter property is defined in interface; otherwise, false. - - - - - Creates the autowire candidate resolver. - - A SimpleAutowireCandidateResolver - - - - Returns the list of that are not satisfied by . - - the filtered list. Is never null - - - - Object definition for definitions that inherit settings from their - parent (object definition). - - -

- Will use the - of the parent object definition if none is specified, but can also - override it. In the latter case, the child's - - must be compatible with the parent, i.e. accept the parent's property values - and constructor argument values (if any). -

-

- A will - inherit all of the , - , and - from it's parent - object definition, with the option to add new values. If the - , - , - and / or - - properties are specified, they will override the corresponding parent settings. -

-

- The remaining settings will always be taken from the child definition: - , - , - , - , - and - -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - - class. - - - The name of the parent object. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The class of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The of the object to - instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Validate this object definition. - - -

- A common cause of validation failures is a missing value for the - - property; by - their very nature require that the - - be set. -

-
- - In the case of a validation failure. - -
- - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Helper class for resolving constructors and factory methods. - Performs constructor resolution through argument matching. - - - Operates on a and an . - Used by . - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for the given factory - and instantiation strategy. - - The object factory to work with. - The object factory as IAutowireCapableObjectFactory. - The instantiation strategy for creating objects. - the resolver to resolve property value placeholders if any - - - - "autowire constructor" (with constructor arguments by type) behavior. - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: In this mode, a Spring - object factory is able to host components that expect constructor-based - dependency resolution. - - Name of the object. - The merged object definition for the object. - The chosen chosen candidate constructors (or null if none). - The explicit argument values passed in programmatically via the getBean method, - or null if none (-> use constructor argument values from object definition) - An IObjectWrapper for the new instance - - - - Gets the constructor instantiation info given the object definition. - - Name of the object. - The RootObjectDefinition - The explicitly chosen ctors. - The explicit chose ctor args. - A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or - one based on type matching. - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - Create an array of arguments to invoke a constructor or static factory method, - given the resolved constructor arguments values. - - When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain - information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using - exceptions for flow control as in the original implementation. - - - - Resolves the - of the supplied . - - The name of the object that is being resolved by this factory. - The rod. - The wrapper. - The cargs. - Where the resolved constructor arguments will be placed. - - The minimum number of arguments that any constructor for the supplied - must have. - - -

- 'Resolve' can be taken to mean that all of the s - constructor arguments is resolved into a concrete object that can be plugged - into one of the s constructors. Runtime object - references to other objects in this (or a parent) factory are resolved, - type conversion is performed, etc. -

-

- These resolved values are plugged into the supplied - object, because we wouldn't want to touch - the s constructor arguments in case it (or any of - its constructor arguments) is a prototype object definition. -

-

- This method is also used for handling invocations of static factory methods. -

-
-
- - - Returns an array of all of those - methods exposed on the - that match the supplied criteria. - - - Methods that have this name (can be in the form of a regular expression). - - - Methods that have exactly this many arguments. - - - Methods that are static / instance. - - - The on which the methods (if any) are to be found. - - - An array of all of those - methods exposed on the - that match the supplied criteria. - - - - - Concrete implementation of the - and - - interfaces. - - -

- This class is a full-fledged object factory based on object definitions - that is usable straight out of the box. -

-

- Can be used as an object factory in and of itself, or as a superclass - for custom object factory implementations. Note that readers for - specific object definition formats are typically implemented separately - rather than as object factory subclasses. -

-

- For an alternative implementation of the - interface, - have a look at the - - class, which manages existing object instances rather than creating new - ones based on object definitions. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - - - - Creates a new instance of the - class. - - The parent object factory. - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory. - - - - Find object instances that match the . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The type of the objects to look up. - - - An of object names and object - instances that match the , or - if none is found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - - -

- Called by the - - so that dependant objects are able to be disposed of first. -

-
- - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - -
- - - Check whether the specified object matches the supplied . - - The name of the object to check. - - The to check for. - - - if the object matches the supplied , - or if the supplied is . - - - - - The instance for this class. - - - - - Whether to allow re-registration of a different definition with the - same name. - - - - - The mapping of object definition objects, keyed by object name. - - - - - List of object definition names, in registration order. - - - - - Resolver to use for checking if an object definition is an autowire candidate - - - - - IDictionary from dependency type to corresponding autowired value - - - - - Check if this registry contains a object definition with the given - name. - - - The name of the object to look for. - - - if this object factory contains an object - definition with the given name. - - - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - - If one of the singleton objects could not be created. - - - - - - Register a special dependency type with corresponding autowired value. - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the IObjectFactory interface itself. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Check whether the specified bean would need to be eagerly initialized - in order to determine its type. - - a factory-bean reference that the bean definition defines a factory method for - whether eager initialization is necessary - - - - Check whether the given bean is defined as a . - - the name of the object - the corresponding object definition - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Raises the no such object definition exception for an unresolvable dependency - - The type. - The dependency description. - The descriptor. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - Determine whether the specified object definition qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - - Name of the object definition to check. - The merged object definiton to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - - - - Should object definitions registered under the same name as an - existing object definition be allowed? - - -

- If , then the new object definition will - replace (override) the existing object definition. If - , an exception will be thrown when - an attempt is made to register an object definition under the same - name as an already existing object definition. -

-

- The default is . -

-
- - is the registration of an object definition - under the same name as an existing object definition is allowed. - -
- - - Get or set custom autowire candidate resolver for this IObjectFactory to use - when deciding whether a bean definition should be considered as a - candidate for autowiring. Never null - - - - - Return the number of objects defined in this registry. - - - The number of objects defined in this registry. - - - - - - Default implementation of the - - interface. - - -

- Does not support per - loading. -

-
- Aleksandar Seovic -
- - - Central interface for factories that can create - - instances. - - -

- Allows for replaceable object definition factories using the Strategy - pattern. -

-
- Aleksandar Seovic -
- - - Factory style method for getting concrete - - instances. - - - The FullName of the of the defined object. - - The name of the parent object definition (if any). - - The against which any class names - will be resolved into instances. It can be null to register the - object class just by name. - - - An - - instance. - - - - - Factory style method for getting concrete - - instances. - - /// If no parent is specified, a RootObjectDefinition is created, otherwise a - ChildObjectDefinition. - The of the defined object. - The name of the parent object definition (if any). - The against which any class names - will be resolved into instances. - - An - - instance. - - - - - Default implementation of the interface, deleagting to - 's GenerateObjectName. - - Note that this implementation is only able to handle - subclasses such as - and - - Juergen Hoeller - Mark Pollack (.NET) - - - - Strategy interface for generating object names for object definitions - - Juergen Hoeller - Mark Pollack (.NET) - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - An - implementation that delegates to an - that is - obtained as the result of a lookup in an associated IoC container. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by delegating to - another - looked up in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the delegated call to the looked up - . - - - - - The various modes of dependency checking. - - Rick Evans (.NET) - - - - DO not do any dependency checking. - - - - - Check object references. - - - - - Just check primitive (string, int, etc) values. - - - - - Check everything. - - - - - GenericObjectDefinition is a one-stop shop for standard object definition purposes. - Like any object definition, it allows for specifying a class plus optionally - constructor argument values and property values. Additionally, deriving from a - parent bean definition can be flexibly configured through the "parentName" property. - - In general, use this class for the purpose of - registering user-visible object definitions (which a post-processor might operate on, - potentially even reconfiguring the parent name). - Use / - where parent/child relationships happen to be pre-determined. - - - - Juergen Hoeller - Erich Eichinger - - - - Creates a new to be configured through its - object properties and configuration methods. - - - - - Creates a new as deep copy of the given - object definition. - - the original object definition to copy from - - - - Returns a representation of this - for debugging purposes. - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Strategy interface for determining whether a specific object definition - qualifies as an autowire candidate for a specific dependency. - - Mark Fisher - Juergen hoeller - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Responsible for creating instances corresponding to a - . - - Rod Johnson - Rick Evans (.NET) - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Represents an override of a method that looks up an object in the same IoC context. - - -

- Methods eligible for lookup override must not have arguments. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Represents the override of a method on a managed object by the IoC container. - - -

- Note that the override mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - -

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

-
- - The name of the method that is to be overridden. - - - If the supplied is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - -

- By 'match' one means does this particular - - instance apply to the supplied ? -

-

- This allows for argument list checking as well as method name checking. -

-
- The method to be checked. - - if this override matches the supplied - . - -
- - - The name of the method that is to be overridden. - - - - - Is the method that is ot be injected - () - to be considered as overloaded? - - -

- If (the default), then argument type matching - will be performed (because one would not want to override the wrong - method). -

-

- Setting the value of this property to can be used - to optimize runtime performance (ever so slightly). -

-
-
- - - Creates a new instance of the - class. - - -

- Methods eligible for lookup override must not have arguments. -

-
- - The name of the method that is to be overridden. - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - If either of the supplied arguments is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - - - An - implementation that simply returns the result of a lookup in an - associated IoC container. - - -

- This class is Spring.NET's implementation of Dependency Lookup via - Method Injection. -

-

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by returning the - result of an object lookup in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the object lookup. - - - - - An - implementation that supports method injection. - - -

- Classes that want to take advantage of method injection must meet some - stringent criteria. Every method that is to be method injected - must be defined as either or - . An - will be thrown if these criteria are not met. -

-
- Rick Evans -
- - - Simple object instantiation strategy for use in - implementations. - - -

- Does not support method injection, although it provides hooks for subclasses - to override to add method injection support, for example by overriding methods. -

-
- Rod Johnson - Rick Evans (.NET) - -
- - - The shared instance for this class (and derived classes). - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type does not have a zero-arg constructor. - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use a no-arg constructor. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be a - or zero length string if we're autowiring an object that - doesn't belong to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - -
- - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use the supplied - and attendant . -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - -
- - - The name of the dynamic assembly that holds dynamically created code - - - - - A cache of generated instances, keyed on - the object name for which the was generated. - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- This method dynamically generates a subclass that supports method - injection for the supplied . It then - instantiates an new instance of said type using the constructor - identified by the supplied , - passing the supplied to said - constructor. It then manually injects (generic) method replacement - and method lookup instances (of - ) into - the new instance: those methods that are 'method-injected' will - then delegate to the approriate - - instance to effect the actual method injection. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The parameter s to use to find the - appropriate constructor to invoke. - - - The aguments that are to be passed to the appropriate constructor - when the object is being instantiated. - - - A new instance of the defined by the - supplied . - -
- - - A factory that generates subclasses of those - classes that have been configured for the Method-Injection form of - Dependency Injection. - - -

- This class is designed as for one-shot usage; i.e. it must - be used to generate exactly one method injected subclass and - then discarded (it maintains state in instance fields). -

-
-
- - - The name of the generated - property (for method replacement). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - The name of the generated - property (for method lookup). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - Creates a new instance of the - class. - - - The in which - the generated is to be defined. - - - The object definition that is the target of the method injection. - - - If either of the supplied arguments is . - - - - - Builds a suitable for Method-Injection. - - - A suitable for Method-Injection. - - - - - Defines overrides for those methods that are configured with an appropriate - . - - - The overarching that is defining - the generated . - - - - - Override the supplied with the logic - encapsulated by the - - defined by the supplied . - - - The builder for the subclass that is being generated. - - - The method on the superclass that is to be overridden. - - - The field defining the - - that the overridden method will delegate to to do the 'actual' - method injection logic. - - - - - Generates the MSIL for actually returning a return value if the - supplied is not - . - - - The definition of the return value; if , it - means that no return value is to required (a void - return type). - - - The to emit - the MSIL to. - - - - - Generates the MSIL for a return value if the supplied - returns a value. - - - The method to be checked. - - - The to emit - the MSIL to. - - - The return value, or if the method does not - return a value (has a void return type). - - - - - Pushes (sets up) the arguments for a call to the - - method of an appropriate - . - - - The parameters to the original method (will be bundled - up into a generic object[] and passed as the third - argument to the - - invocation. - - - The to emit - the MSIL to. - - - - - Simply generates the IL for a write only property for the - . - - - The in which the property is defined. - - - The name of the (to be) generated property. - - - The (instance) field that the property is to 'set'. - - - - - A collection (with set semantics) of method overrides, determining which, if any, - methods on a managed object the Spring.NET IoC container will override at runtime. - - Rod Johnson - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- Deep copy constructoe. -

-
- - The instance supplying initial overrides for this new instance. - -
- - - Copy all given method overrides into this object. - - - The overrides to be copied into this object. - - - - - Adds the supplied to the overrides contained - within this instance. - - - The to be - added. - - - - - Adds the supplied to the overloaded method names - contained within this instance. - - - The overloaded method name to be added. - - - - - Returns true if the supplied is present within - the overloaded method names contained within this instance. - - - The overloaded method name to be checked. - - - True if the supplied is present within - the overloaded method names contained within this instance. - - - - - Return the override for the given method, if any. - - - The method to check for overrides for. - - - the override for the given method, if any. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - The collection of method overrides. - - - - - Returns true if this instance contains no overrides. - - - - - Programmatic means of constructing a using the builder pattern. Intended primarily - for use when implementing custom namespace parsers. - - Set methods are used instead of properties, so that chaining of methods can be used to create - 'one-liner'definitions that set multiple properties at one. - Rod Johnson - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class, private - to force use of factory methods. - - - - - Creates a new used to construct a . - - - - - Creates a new used to construct a . - - the of the object that the definition is being created for - - - - Creates a new used to construct a . - - the name of the of the object that the definition is being created for - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - The type name of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Name of the object type. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a child object definition.. - - The object definition factory. - Name of the parent object. - - - - - Adds the property value under the given name. - - The name. - The value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the specified object name under the property specified. - - The name. - Name of the object. - The current ObjectDefinitionBuilder. - - - - Adds an index constructor arg value. The current index is tracked internally and all addtions are - at the present point - - The constructor arg value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the named object as a constructor argument. - - Name of the object. - - - - - Sets the name of the factory method to use for this definition. - - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the factory object to use for this definition. - - The factory object. - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets whether or not this definition describes a singleton object. - - if set to true [singleton]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects or not this definition is abstract. - - if set to true [flag]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects for this definition should be lazily initialized or not. - - if set to true [lazy]. - The current ObjectDefinitionBuilder. - - - - Sets the autowire mode for this definition. - - The autowire mode. - The current ObjectDefinitionBuilder. - - - - Sets the dependency check mode for this definition. - - The dependency check. - The current ObjectDefinitionBuilder. - - - - Sets the name of the destroy method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the init method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the resource description for this definition. - - The resource description. - The current ObjectDefinitionBuilder. - - - - Adds the specified object name to the list of objects that this definition depends on. - - Name of the object. - The current ObjectDefinitionBuilder. - - - - Gets the current object definition in its raw (unvalidated) form. - - The raw object definition. - - - - Validate and gets the object definition. - - The object definition. - - - - Utility methods that are useful for - - implementations. - - Juergen Hoeller - Rick Evans (.NET) - - - - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Registers the supplied with the - supplied . - - -

- This is a convenience method that registers the - - of the supplied under the - - property value of said . If the - supplied has any - , - then those aliases will also be registered with the supplied - . -

-
- - The object definition holder containing the - that - is to be registered. - - - The registry that the supplied - is to be registered with. - - - If either of the supplied arguments is . - - - If the could not be registered - with the . - -
- - - Generates an object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied . - - The - that requires a generated name. - The - - that the supplied is to be - registered with (needed so that the uniqueness of any generated - name can be guaranteed). - if set to true if the given object - definition will be registed as an inner object or as a top level objener objects - verses top level objects. - - An object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied and - never . - - - If either of the or - arguments is . - - - If a unique name cannot be generated. - - - - - Generates the name of the object for a top-level object definition unique within the given object factory. - - The object definition to generate an object name for. - The registry to check for existing names. - The generated object name - if no unique name can be generated for the given - object definition - - - - Factory method for getting concrete - instances. - - - The name of the event handler method. This may be straight text, a regular - expression, , or empty. - - - The name of the event being wired. This too may be straight text, a regular - expression, , or empty. - - - A concrete - instance. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Thrown when the validation of an object definition failed. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - The detail message. - - - - Creates a new instance of the - - class. - - - The detail message. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Helper class for use in object factory implementations, - resolving values contained in object definition objects - into the actual values applied to the target object instance. - - - Used by . - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The object factory. - - - - Given a property value, return a value, resolving any references to other - objects in the factory if necessary. - - -

- The value could be : - - -

- An , - which leads to the creation of a corresponding new object instance. - Singleton flags and names of such "inner objects" are always ignored: inner objects - are anonymous prototypes. -

- - -

- A , which must - be resolved. -

-
- -

- An . This is a - special placeholder collection that may contain - s or - collections that will need to be resolved. -

-
- -

- An ordinary object or , in which case it's left alone. -

-
- -

-
- - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - -
- - - TODO - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Resolve the target type of the passed . - - The who's target type is to be resolved - The resolved target type, if any. otherwise. - - - - Resolves an inner object definition. - - - The name of the object that surrounds this inner object definition. - - - The name of the inner object definition... note: this is a synthetic - name assigned by the factory (since it makes no sense for inner object - definitions to have names). - - - The name of the property the value of which is being resolved. - - - The definition of the inner object that is to be resolved. - - - if the owner of the property is a singleton. - - - The resolved object as defined by the inner object definition. - - - - - Checks the given bean name whether it is unique. If not already unique, - a counter is added, increasing the counter until the name is unique. - - Original Name of the inner object. - The Adapted name for the inner object - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - The possible object scope values. - - Aleksandar Seovic - - - - - - - - - Application scope. - - - - - Session scope. - - - - - Request scope. - - - - - - - - - - Default scope (currently - ). - - - - - - Object definition reader for a simple properties format. - - - Provides object definition registration methods for - and - instances. Typically applied to a - . - - Rod Johnson - Juergen Hoeller - Simon White (.NET) - - - - Value of a T/F attribute that represents true. - Anything else represents false. Case seNsItive. - - - - - Separator between object name and property name. - - - - - Prefix for the class property of a root object definition. - - - - - Special string added to distinguish if the object will be - a singleton. - - -

- Default is true. -

-
- -

- owner.(singleton)=true -

-
-
- - - Special string added to distinguish if the object will be - lazily initialised. - - -

- Default is false. -

-
- -

- owner.(lazy-init)=true -

-
-
- - - Reserved "property" to indicate the parent of a child object definition. - - - - - Property suffix for references to other objects in the current - : e.g. - owner.dog(ref)=fido. - - -

- Whether this is a reference to a singleton or a prototype - will depend on the definition of the target object. -

-
-
- - - Prefix before values referencing other objects. - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the specified properties file. - - - The resource descriptor for the properties file. - - - The match or filter for object definition names, e.g. 'objects.' - - in case of loading or parsing errors - the number of object definitions found - - - - Register object definitions contained in a - , using all property keys (i.e. - not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Similar syntax as for an . - This method is useful to enable standard .NET internationalization support. -

-
- - The containing object definitions. - - - The match or filter for object definition names, e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions registered. -
- - - Register object definitions contained in an - , using all property keys - (i.e. not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Registers object definitions contained in an - using all property keys ( i.e. not filtering by prefix ) - - The containing - object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Get all property values, given a prefix (which will be stripped) - and add the object they define to the factory with the given name - - The name of the object to define. - - The containing string pairs. - - The prefix of each entry, which will be stripped. - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - - - - Name of default parent object - - - - - Gets or sets object definition factory to use. - - - - - A plain-vanilla object definition. - - -

- This is the most common type of object definition; - instances - do not derive from a parent - , and usually - (but not always - see below) have an - - and (optionally) some - and - . -

-

- Note that - instances do not have to specify an - : - This can be useful for deriving - instances - from such definitions, each with it's own - , - inheriting common property values and other settings from the parent. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - - The of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - Whether to perform a dependency check for objects (not - applicable to autowiring a constructor, thus ignored there) - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - -

- Takes an object class name to avoid eager loading of the object class. -

-
- - The assembly qualified of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - The - to be applied to a new instance of the object. - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. -

-
- - The definition that is to be copied. - -
- - - Validate this object definition. - - - In the case of a validation failure. - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Is always null for a . - - - It is safe to request this property's value. Setting any other value than null will - raise an . - - Raised on any attempt to set a non-null value on this property. - - - - A implementation to use that checks - the object definitions only (no attributes) - - Mark Fisher - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Static factory that permits the registration of existing singleton instances. - - -

- Does not have support for prototype objects, aliases, and post startup object - configuration. -

-

- Serves as a simple example implementation of the - interface, that manages existing object instances as opposed to creating new ones - based on object definitions. -

-

- The - method is not supported by this class; this class deals exclusively with - existing singleton instances, thus the methods mentioned previously make little sense in this context. -

-
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Map from object name to object instance. - - - - - This method is not supported by . - - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - is not currently supported. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - True if an object with the given name is defined. - - - - Is this object a singleton? - - -

- That is, will - or - always return the same object? -

-
- The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Determine the type of the object with the given name. - - -

- More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. -

-
- The name of the object to query. - - The of the object or if - not determinable. - -
- - - Determines whether the object with the given name matches the specified type. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Not supported. - - The name of the object. - - The registered - . - - - Always, as object definitions are not supported by this - implementation. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Will not consider s, - as the type of their created objects is not known before instantiation. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Since this implementation of the - - interface does not support the notion of ptototype objects, the - parameter is ignored. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). Ignored. - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - -
- - - Tests whether this object factory contains an object definition for the - specified object name. - - The object name to query. - - True if an object defintion is contained within this object factory. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Add a new singleton object. - - - The name to be associated with the object name. - - The singleton object. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - This feature is not currently supported. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Defines a method to release allocated unmanaged resources. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - - - - Abstract implementation providing - a number of convenience methods and a - template method - that subclasses must override to provide the actual parsing logic. - - - Use this implementation when you want - to parse some arbitrarily complex XML into one or more - ObjectDefinitions. If you just want to parse some - XML into a single IObjectDefinition, you may wish to consider - the simpler convenience extensions of this class, namely - and - - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Interface used to handle custom, top-level tags. - - Implementations are free to turn the metadata in the custom tag into as - many as required. - - Rob Harrop - Mark Pollack (.NET) - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - -

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

-
- - The element to be parsed. - - - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - - - The primary object definition. - -
- - - Constant for the ID attribute - - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Resolves the ID for the supplied . - - - When using generation, a name is generated automatically. - Otherwise, the ID is extracted from the "id" attribute, potentially with a - fallback to a generated id. - - The element that the object definition has been built from. - The object definition to be registered. - The the object encapsulating the current state of the parsing process; - provides access to a - the resolved id - - if no unique name could be generated for the given object definition - - - - - Registers the supplied with the supplied - . - - Subclasses can override this method to control whether or not the supplied - is actually even registered, or to - register even more objects. - - The default implementation registers the supplied - with the supplied only if the IsNested - parameter is false, because one typically does not want inner objects - to be registered as top level objects. - - - - The object definition to be registered. - The registry that the bean is to be registered with. - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - Gets a value indicating whether an ID should be generated instead of read - from the passed in XmlElement. - - Note that this flag is about always generating an ID; the parser - won't even check for an "id" attribute in this case. - - true if should generate id; otherwise, false. - - - - Gets a value indicating whether an ID should be generated instead if the - passed in XmlElement does not specify an "id" attribute explicitly. - - Disabled by default; subclasses can override this to enable ID generation - as fallback: The parser will first check for an "id" attribute in this case, - only falling back to a generated ID if no value was specified. - - true if should generate id if no value was specified; otherwise, false. - - - - - Convenient base class for when there exists a one-to-one mapping - between attribute names on the element that is to be parsed and - the property names on the Type being configured. - - - - - Mark Pollack - - - - Base Type for those implementations that - need to parse and define just a single IObjectDefinition. - - - Extend this parser Type when you want to create a single object definition - from an arbitrarily complex XML element. You may wish to consider extending - the when you want to create a - single Object definition from a relatively simple custom XML element. - The resulting ObjectDefinition will be automatically registered - with the ObjectDefinitionRegistry. Your job simply is to parse the - custom XML element into a single ObjectDefinition - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - - Determine the name for the parent of the currently parsed object, - in case of the current object being defined as a child object. - The default implementation returns null - indicating a root object definition. - - - the name of the parent object for the currently parsed object. - - - - Gets the type of the object corresponding to the supplied XmlElement. - - Note that, for application classes, it is generally preferable to override - GetObjectTypeName instad, in order to avoid a direct - dependence on the object implementation class. The ObjectDefinitionParser - and its IXmlObjectDefinitionParser (namespace parser) can be used within an - IDE add-in then, even if the application classses are not available in the add-ins - AppDomain. - - The element. - The Type of the class that is being defined via parsing the supplied - Element. - - - - Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. - - The element. - The type name of the object that is being defined via parsing the supplied - XmlElement. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation delegates to the DoParse version without - ParameterContext argument. - The element. - The parser context. - The builder used to define the IObjectDefinition. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation does nothing. - The element. - The builder used to define the IObjectDefinition. - - - - Default implementation of the interface. - Resolves namespace URIs to implementation types based on mappings. - - Erich Eichinger - - - - - - Used by to locate - implementations for a particular namespace URI. - - TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now - Erich Eichinger - - - - - - - Lookup a for the given namespace URI. - - the namespace URI - the located namespace handler or null - - - - Resolve the namespace URI and return the corresponding - implementation. - - the namespace URI to get the matching parser for. - the matching parser or null - - - - XML resource reader. - - -

- Navigates through an XML resource and invokes parsers registered - with the . -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - SPI for parsing an XML document that contains Spring object definitions. - Used by for actually parsing a DOM - document. - - Instantiated per document to parse: Implementations can hold state in - instance variables during the execution of the RegisterObjectDefinitions - method, for example global settings that are defined for all object definitions - in the document. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the DefaultObjectDefinitionDocumentReader class. - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - Parses object definitions starting at the given - using the passed . - - The root element to start parsing from. - The instance to use. - - in case an error happens during parsing and registering object definitions - - - - - Process an alias element. - - - - - Process the object element - - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - - If the resource could not be imported. - - - - - Parses the given alias element, registering the alias with the registry. - - The alias element. - The registry. - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The helper. - - - - - - Allow the XML to be extensible by processing any custom element types last, - after we finished processing the objct definitions. This method is a natural - extension point for any other custom post-processing of the XML. - - The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. - - - The root. - - - - Allow the XML to be extensible by processing any custom element types first, - before we start to process the object definitions. - - This method is a natural - extension point for any other custom pre-processing of the XML. -

The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. -

-
- The root element of the XML document. -
- - - Creates an instance for the given and element. - - the to create the - the root to start reading from - a new instance - - - - Gets the reader context. - - The reader context. - - - - Simple class that holds the defaults specified at the <objects> - level in a standard Spring XML object definition document: - default-lazy-init, default-autowire, etc. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Gets or sets the autowire setting for the document that's currently parsed. - - The autowire. - - - - Gets or sets the dependency-check setting for the document that's currently parsed - - The dependency check. - - - - Gets or sets the lazy-init flag for the document that's currently parsed. - - The lazy init. - - - - Gets or sets the merge setting for the document that's currently parsed. - - The merge. - - - - Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. - - -

- Used by - for actually parsing a DOM document or - fragment. -

-
- Juergen Hoeller - Rick Evans (.NET) - Sandu Turcan (.NET) -
- - - Invoked by after construction but before any - elements have been parsed. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Attribute that should be used to specify the default namespace - and schema location for a custom namespace parser. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Gets or sets the default namespace for the configuration parser. - - - The default namespace for the configuration parser. - - - - - Gets or sets the default schema location for the configuration parser. - - - The default schema location for the configuration parser. - - - If the property is set, the will always resolve to an assembly-resource - and the set will be interpreted relative to this assembly. - - - - - Gets or sets a type from the assembly containing the schema - - - If this property is set, the will always resolve to an assembly-resource - and the will be interpreted relative to this assembly. - - - - - Provides a resolution mechanism for configuration parsers. - - -

- The uses this registry - class to find the parser handling a specific namespace. -

-
- Aleksandar Seovic -
- - - Name of the .Net config section that contains definitions - for custom config parsers. - - - - - Creates a new instance of the NamespaceParserRegistry class. - - - - - Reset the list of registered parsers to "factory"-setting - - use for unit tests only - - - - Registers the type for wellknown namespaces - - true if the parser could be registered, false otherwise - - - - Constructs a "assembly://..." qualified schemaLocation url using the given type - to obtain the assembly name. - - - - - Returns a parser for the given namespace. - - - The namespace for which to lookup the parser implementation. - - - A parser for a given , or - if no parser was found. - - - - - Returns a schema collection containing validation schemas for all registered parsers. - - - A schema collection containing validation schemas for all registered parsers. - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The of the parser that will be activated - when an element in its default namespace is encountered. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The of the parser that will be activated - when the attendant is - encountered. - - - The namespace with which to associate instance of the parser. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If the is not a - that implements the - interface. - - - If is . - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The parser instance. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The namespace with which to associate instance of the parser. - - - The parser instance. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If is , or if - is not specified and parser class - does not have default value defined using . - - - - - Register a schema as well-known - - - - - - - Returns default values for the parser namespace and schema location as - defined by the . - - - A type of the parser. - - - A instance containing - default values for the parser namsepace and schema location - - - - - Resolves xml entities by using the infrastructure. - - - - - Adapts the interface to . - Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 - - - - - Support class for implementing custom namespace parsers. - - Parsing of individual elements is done via a ObjectDefintionParser. - Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser - to handle a specific element. - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Invoked by after construction but before any - elements have been parsed. - - - - - Parses an element under the root node, typically - an object definition or import statement. - - - The element to be parsed. - - - The parser context. - - - The number of object defintions created from this element. - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Register the specified for the given - - - - - Constants defining the structure and values associated with the - Spring.NET XML object definition format. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Value of a boolean attribute that represents - . - - -

- Anything else represents . -

-
-
- - - Signifies that a default value is to be applied. - - - - - Defines an external XML object definition resource. - - - - - Specifies the relative path to an external XML object definition - resource. - - - - - Defines an alias for an object definition. - - - - - Specifies the alias of an object definition. - - - - - Specifies the default lazy initialization mode. - - - - - Specifies the default dependency checking mode. - - - - - Specifies the default autowire mode. - - - - - Specifies the default collection merge mode. - - - - - Defines a single named object. - - - - - Element containing informative text describing the purpose of the - enclosing element. - - -

- Always optional. -

-

- Used primarily for user documentation of XML object definition - documents. -

-
-
- - - Specifies a . - - -

- Does not have to be fully assembly qualified, but it is recommended - that the names of one's objects are - specified explicitly. -

-
-
- - - The name or alias of the parent object definition that a child - object definition inherits from. - - - - - Objects can be identified by an id, to enable reference checking. - - -

- There are constraints on a valid XML id: if you want to reference - your object in .NET code using a name that's illegal as an XML id, - use the optional "name" attribute - (). - If neither given, the objects name is - used as id. -

-
-
- - - Can be used to create one or more aliases illegal in an id. - - -

- Multiple aliases can be separated by any number of spaces, - semicolons, or commas - (). -

-

- Always optional. -

-
-
- - - Is this object a "singleton" (one shared instance, which will - be returned by all calls to - with the id), or a - "prototype" (independent instance resulting from each call to - ). - - -

- Singletons are most commonly used, and are ideal for multi-threaded - service objects. -

-
- -
- - - Controls object scope. Only applicable to ASP.NET web applications. - - -

- Scope can be defined as either application, session or request. It - defines when "singleton" instances are initialized, but has no - effect on prototype definitions. -

-
-
- - - The names of the objects that this object depends on being - initialized. - - -

- The object factory will guarantee that these objects - get initialized before this object definition. -

- - Dependencies are normally expressed through object properties or - constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Optional attribute for the name of the custom initialization method - to invoke after setting object properties. - - -

- The method must have no arguments. -

-
-
- - - Optional attribute for the name of the custom destroy method to - invoke on object factory shutdown. - - -

- Valid destroy methods have either of the following signatures... - - void MethodName() - void MethodName(bool force) - -

- - Only invoked on singleton objects! - -
-
- - - A constructor argument : the constructor-arg tag can have an - optional type attribute, to specify the exact type of the - constructor argument - - -

- Only needed to avoid ambiguities, e.g. in case of 2 single - argument constructors that can both be converted from a - . -

-
-
- - - The constructor-arg tag can have an optional index attribute, - to specify the exact index in the constructor argument list. - - -

- Only needed to avoid ambiguities, e.g. in case of 2 arguments of - the same type. -

-
-
- - - The constructor-arg tag can have an optional named parameter - attribute, to specify a named parameter in the constructor - argument list. - - - - - Is this object "abstract", i.e. not meant to be instantiated itself - but rather just serving as parent for concrete child object - definitions? - - -

- Default is . Specify - to tell the object factory to not try to instantiate that - particular object in any case. -

-
-
- - - A property definition : object definitions can have zero or more - properties. - - -

- Spring.NET supports primitives, references to other objects in the - same or related factories, lists, dictionaries, and name value - collections. -

-
-
- - - A reference to another managed object or static - . - - - - - ID refs must specify a name of the target object. - - - - - A reference to the name of another managed object in the same - context. - - - - - A reference to the name of another managed object in the same - context. - - -

- Local references, using the "local" attribute, have to use object - ids; they can be checked by a parser, thus should be preferred for - references within the same object factory XML file. -

-
-
- - - Alternative to type attribute for factory-method usage. - - -

- If this is specified, no type attribute should be used. This should - be set to the name of an object in the current or ancestor - factories that contains the relevant factory method. This allows - the factory itself to be configured using Dependency Injection, and - an instance (rather than static) method to be used. -

-
-
- - - Optional attribute specifying the name of a factory method to use - to create this object. - - -

- Use constructor-arg elements to specify arguments to the factory - method, if it takes arguments. Autowiring does not apply to - factory methods. -

-

- If the "type" attribute is present, the factory method will be a - static method on the type specified by the "type" attribute on - this object definition. Often this will be the same type as that - of the constructed object - for example, when the factory method - is used as an alternative to a constructor. However, it may be on - a different type. In that case, the created object will *not* be - of the type specified in the "type" attribute. This is analogous - to behaviour. -

-

- If the "factory-object" attribute is present, the "type" attribute - is not used, and the factory method will be an instance method on - the object returned from a - - call with the specified object name. The factory object may be - defined as a singleton or a prototype. -

-

- The factory method can have any number of arguments. Use indexed - constructor-arg elements in conjunction with the factory-method - attribute. -

-

- Setter Injection can be used in conjunction with a factory method. - Method Injection cannot, as the factory method returns an instance, - which will be used when the container creates the object. -

-
-
- - - A list can contain multiple inner object, ref, collection, or - value elements. - - -

- Lists are untyped, pending generics support, although references - will be strongly typed. -

-

- A list can also map to an array type. The necessary conversion is - automatically performed by the - . -

-
-
- - - A set can contain multiple inner object, ref, collection, or value - elements. - - -

- Sets are untyped, pending generics support, although references - will be strongly typed. -

-
-
- - - A Spring.NET map is a mapping from a string key to object (a .NET - ). - - -

- Dictionaries may be empty. -

-
-
- - - A lookup key (for a dictionary or name / value collection). - - - - - A lookup key (for a dictionary or name / value collection). - - - - - Contains a string representation of a value. - - -

- This is used by name-value, ctor argument, and property elements. -

-
-
- - - Contains delimiters that should be used to split delimited string values. - - -

- This is used by name-value element. -

-
-
- - - A reference to another objects. - - -

- Used as a convenience shortcut on property and constructor-arg - elements to refer to other objects. -

-
-
- - - Contains a string representation of an expression. - - -

- This is used by ctor argument and property elements. -

-
-
- - - A map entry can be an inner object, ref, collection, or value. - - -

- The name of the property is given by the "key" attribute. -

-
-
- - - Contains a string representation of a property value. - - -

- The property may be a string, or may be converted to the - required using the - - machinery. This makes it possible for application developers to - write custom - implementations that can convert strings to objects. -

- - This is recommended for simple objects only. Configure more complex - objects by setting properties to references to other objects. - -
-
- - - Contains a string representation of an expression. - - - - - Denotes value. - - -

- Necessary because an empty "value" tag will resolve to an empty - , which will not be resolved to - value unless a special - does so. -

-
-
- - - 'name-values' elements differ from dictionary elements in that - values must be strings. - - -

- May be empty. -

-
-
- - - Element content is the string value of the property. - - -

- The "key" attribute is the name of the property. -

-
-
- - - The lazy initialization mode for an individual object definition. - - - - - The dependency checking mode for an individual object definition. - - - - - Defines a subscription to one or more events published by one or - more event sources. - - - - - The name of an event handling method. - - -

- Defaults to On${event}. - Note : this default will probably change before the first 1.0 - release. -

-
-
- - - The name of an event. - - - - - The autowiring mode for an individual object definition. - - - - - Shortcut alternative to specifying a key element in a - dictionary entry element with <ref object="..."/>. - - - - - Shortcut alternative to specifying a value element in a - dictionary entry element with <ref object="..."/>. - - - - - Specify if the collection values should be merged with the parent. - - - - - The string of characters that delimit object names. - - - - - A lookup method causes the IoC container to override a given method and return - the object with the name given in the attendant object attribute. - - -

- This is a form of Method Injection. -

-

- It's particularly useful as an alternative to implementing the - interface, - in order to be able to make - - calls for non-singleton instances at runtime. In this case, Method Injection - is a less invasive alternative. -

-
-
- - - The name of a lookup method. This method must take no arguments. - - - - - The name of the object in the IoC container that the lookup method - must resolve to. - - -

- Often this object will be a prototype, in which case the lookup method - will return a distinct instance on every invocation. This is useful - for single-threaded objects. -

-
-
- - - A replaced method causes the IoC container to override a given method - with an (arbitrary) implementation at runtime. - - -

- This (again) is a form of Method Injection. -

-
-
- - - Name of the method whose implementation should be replaced by the - IoC container. - - -

- If this method is not overloaded, there's no need to use arg-type - subelements. -

-

- If this method is overloaded, arg-type subelements must be - used for all override definitions for the method. -

-
-
- - - The object name of an implementation of the - interface. - - -

- This may be a singleton or prototype. If it's a prototype, a new - instance will be used for each method replacement. Singleton usage - is the norm. -

-
-
- - - Subelement of replaced-method identifying an argument for a - replaced method in the event of method overloading. - - - - - - Specification of the of an overloaded method - argument as a . - - -

- For convenience, this may be a substring of the FQN. E.g. all the following would match - : -

-

- - - System.String - - - string - - - str - - -

-
- -
- - - Check everything. - - - - - Just check primitive (string, int, etc) values. - - - - - Check object references. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Stateful class used to parse XML object definitions. - - Not all parsing code has been refactored into this class. See - BeanDefinitionParserDelegate in Java for how this class should evolve. - Rob Harrop - Juergen Hoeller - Rod Johnson - Mark Pollack (.NET) - - - - The shared instance for this class (and derived classes). - - - - - Initializes a new instance of the class. - - The reader context. - - - - Initializes a new instance of the class. - - The reader context. - The root element of the definition document to parse - - - - Initialize the default lazy-init, dependency check, and autowire settings. - - The root element - - - - Determines whether the Spring object namespace is equal to the the specified namespace URI. - - The namespace URI. - - true if is the default Spring namespace; otherwise, false. - - - - - Decorates the object definition if required. - - The element. - The holder. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The containing object definition if is a nested element. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Create an instance from the given and . - - - This method may be used as a last resort to post-process an object definition before it gets added to the registry. - - - - - Allows deriving classes to post process the name and aliases for the current element. By default - does nothing and returns the unmodified . - - - The list passed in may be modified by an implementation of this method to reflect special needs. - - the object name obtained by the default algorithm from 'id' and 'name' attributes so far. - the object aliases obtained by the default algorithm from 'name' attribute so far. - the currently processed element. - the containing object definition, may be null - the new object name to be used. - - - - Validate that the specified object name and aliases have not been used already. - - - - - Parses an element in a custom namespace. - - - the parsed object definition or null if not supported by the corresponding parser. - - - - Parses an element in a custom namespace. - - - if a nested element, the containing object definition - the parsed object definition or null if not supported by the corresponding parser. - - - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Determines whether the string represents a 'true' boolean value. - - The value. - - true if is 'true' string value; otherwise, false. - - - - - Convenience method to create a builder for a root object definition. - - Name of the object type. - A builder for a root object definition. - - - - Convenience method to create a builder for a root object definition. - - Type of the object. - a builder for a root object definition - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Report a parser error. - - - - - Gets the defaults definition object, or null if the - default have not yet been initialized. - - The defaults. - - - - Gets the reader context. - - The reader context. - - - - Creates an instance - populated with the object definitions supplied in the configuration - section. - - -

- Applications will typically want to use an - , and instantiate it - via the use of the - class (which is similar in functionality to this class). This class is - provided for those times when only an - is required. -

- Creates an instance of the class XmlObjectFactory -
- -

- -

-
- Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a - instance populated with the object definitions supplied in the - configuration section. - - - The configuration settings in a corresponding parent configuration - section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - A instance - populated with the object definitions supplied in the configuration - section. - - - - - Default implementation of the - interface. - - -

- Parses object definitions according to the standard Spring.NET schema. -

-

- This schema is typically located at - http://www.springframework.net/xsd/spring-objects.xsd. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The namespace URI for the standard Spring.NET object definition schema. - - - - - The shared instance for this class (and derived classes). - - - - - Invoked by after construction but before any - elements have been parsed. - - This is a NoOp - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - The parser context. - - If the resource could not be imported. - - - - Parses an event listener definition. - - The name associated with the object that the event handler is being defined on. - - The events being populated. - - The element containing the event listener definition. - - - The namespace-aware parser. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The parser context. - if set to true if we are processing an inner - object definition. - - The object (definition) wrapped within an - - instance. - - -

- Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. -

-

- If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. -

-
-
- - - Calculates an id for an object definition. - - -

- Called when an object definition has not been explicitly defined - with an id. -

-
- - The element containing the object definition. - - - The list of names defined for the object; may be - or even empty. - - - A calculated object definition id. - -
- - - Parse a standard object definition. - - The element containing the object definition. - The id of the object definition. - parsing state holder - The object (definition). - - - - Parse method override argument subelements of the given object element. - - - - - Parse element and add parsed element to - - - - - Parse element and add parsed element to - - - - - Parse constructor argument subelements of the given object element. - - - - - Parse event handler subelements of the given object element. - - - - - Parse property value subelements of the given object element. - - - The name of the object (definition) associated with the property element (s) - - - The element containing the top level object definition. - - - The namespace-aware parser. - - - The property (s) associated with the object (definition). - - - - - Parse a constructor-arg element. - - - The name of the object (definition) associated with the ctor arg. - - - The list of constructor args associated with the object (definition). - - - The name of the element containing the ctor arg definition. - - - The namespace-aware parser. - - - - - Parse a property element. - - - The name of the object (definition) associated with the property. - - - The list of properties associated with the object (definition). - - - The name of the element containing the property definition. - - - The namespace-aware parser. - - - - - Get the value of a property element (may be a list). - -

- Please note that even though this method is named GetPropertyValue, - it is called by both the property and constructor argument element - handlers. -

-
- The property element. - - The name of the object associated with the property. - - - The namespace-aware parser. - -
- - - Parse a value, ref or collection subelement of a property element. - - - Subelement of property element; we don't know which yet. - - - The name of the object (definition) associated with the top level property. - - - The namespace-aware parser. - - - - - Gets a list definition. - - - The element describing the list definition. - - - The name of the object (definition) associated with the list definition. - - - The namespace-aware parser. - - The list definition. - - - - Gets a set definition. - - - The element describing the set definition. - - - The name of the object (definition) associated with the set definition. - - - The namespace-aware parser. - - The set definition. - - - - Gets a dictionary definition. - - The element describing the dictionary definition. - The name of the object (definition) associated with the dictionary definition. - The namespace-aware parser. - The dictionary definition. - - - - Selects sub-elements with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child nodes to look for. - - - The child s of the supplied - with the supplied - . - -
- - - Selects a single sub-element with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child node to look for. - - - The first child of the supplied - with the supplied - . - -
- - - Gets a name value collection mapping definition. - - - The element describing the name value collection mapping definition. - - - The name of the object (definition) associated with the - name value collection mapping definition. - - the context carrying parsing state information - The name value collection definition. - - - - Returns the text of the supplied , - or the empty string value if said is empty. - - -

- If the supplied is , - then the empty string value will be returned. -

-
-
- - - Strips the dependency check value out of the supplied string. - - -

- If the supplied is an invalid dependency - checking mode, the invalid value will be logged and this method will - return the value. - No exception will be raised. -

-
- - The string containing the dependency check value. - - The dependency check value. - -
- - - Strips the autowiring mode out of the supplied string. - - -

- If the supplied is an invalid autowiring mode, - the invalid value will be logged and this method will return the - value. No exception will be raised. -

-
- - The string containing the autowiring mode definition. - - The autowiring mode. - -
- - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Context that gets passed along an object definition parsing process, encapsulating - all relevant configuraiton as well as state. - - - - - Initializes a new instance of the class. - - The parser helper. - - - - Initializes a new instance of the class. - - The parser helper. - The containing object definition. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - The containing object definition. - - - - Gets the reader context. - - The reader context. - - - - Gets the registry. - - The registry. - - - - Gets the parser helper. - - The parser helper. - - - - Gets the containing object definition. - - The containing object definition. - - - - Gets a value indicating whether this instance is nested. - - true if this instance is nested; otherwise, false. - - - - Gets a value indicating whether this instance is default lazy init. - - - true if this instance is default lazy init; otherwise, false. - - - - - Represents the replacement of a method on a managed object by the IoC - container. - - -

- Note that this mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The name of the method that is to be overridden. - - - The object name of the - instance in the surrounding IoC container. - - - If either of the supplied arguments is or - contains only whitespace character(s). - - - - - Add a fragment of a instance's - such as 'Exception or System.Excep to identify an argument - for a dependency injected method. - - - A (sub) string of a instance's . - - - If the supplied is or - contains only whitespace character(s). - - - - - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The object name of the - instance in the surrounding IoC container. - - - - - Object definition reader for Spring's default XML object definition format. - - -

- Typically applied to a - instance. -

-

- This class registers each object definition with the given object factory superclass, - and relies on the latter's implementation of the - interface. -

-

- It supports singletons, prototypes, and references to either of these kinds of object. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - the to use for creating new s - - - - Load object definitions from the supplied XML . - - - The XML resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Actually load object definitions from the specified XML file. - - The input stream to read from. - The resource for the XML data. - - - - - Validation callback for a validating XML reader. - - The source of the event. - Any data pertinent to the event. - - - - Register the object definitions contained in the given DOM document. - - The DOM document. - - The original resource from where the - was read. - - - The number of object definitions that were registered. - - - In case of parsing errors. - - - - - Creates the to use for actually - reading object definitions from an XML document. - - Default implementation instantiates the specified - or if no reader type is specified. - - - - - Creates the to be passed along - during the object definition reading process. - - The underlying that is currently processed. - A new - - - - Create a instance for handling custom namespaces. - - - TODO (EE): make protected virtual, see remarks on - - - - - The to be used for parsing. - - - - - Sets the IObjectDefinitionDocumentReader implementation to use, responsible for - the actual reading of the XML object definition document.stype of the document reader. - - The type of the document reader. - - - - Specify a to use. If none is specified a default - instance will be created by - - - - - Specify a for creating instances of . - - - - - For retrying the parse process - - - - - Convenience extension of - - that reads object definitions from an XML document or element. - - -

- Delegates to - - underneath; effectively equivalent to using a - for a - . -

- - objects doesn't need to be the root element of - the XML document: this class will parse all object definition elements in the - XML stream. - -

- This class registers each object definition with the - - superclass, and relies on the latter's implementation of the - interface. It supports - singletons, prototypes and references to either of these kinds of object. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Gets object definition reader to use. - - - - - Extension of specific to use with an XmlObjectDefinitionReader. - Provides access to configured in - - - - - The maximum length of any XML fragment displayed in the error message - reporting. - - -

- Hopefully this will display enough context so that a user - can pinpoint the cause of the error. -

-
-
- - - Initializes a new instance of the class. - - The resource. - The reader. - - - - Initializes a new instance of the class. - - The resource. - The reader. - The factory to use for creating new instances. - - - - Generates the name of the object. - - The object definition. - the generated object name - - - - Registers the name of the with generated. - - The object definition. - the generated object name - - - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - - -
- - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the error. - - - The root cause of the parse error (if any - may be ). - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - -
- - - This method can be overwritten in order to implement validators - capable of displaying a full list of errors found in the definition. - - - The node that triggered the parse error. - - - A message about the exception. - - - - - Gets the reader. - - The reader. - - - - Gets the resource loader. - - The resource loader. - - - - Gets the registry. - - The registry. - - - - Gets or sets the object definition factory. - - The object definition factory. - - - - Get the instance to lookup parsers for custom namespaces. - - - - - Exception thrown if an - is not fully - initialized, for example if it is involved in a circular reference. - - -

- This is usually indicated by any of the variants of the - - method returning . -

-

- A circular reference with an - cannot be solved by eagerly caching singleton instances (as is the - case with normal objects. The reason is that every - needs to be fully - initialized before it can return the created object, while only specific - normal objects need to be initialized - that is, if a collaborating object - actually invokes them on initialization instead of just storing the reference. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Thrown when an - encounters an error when attempting to create an object from an object - definition. - - Juergen Hoeller - Rick Evans (.NET) - - - - 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 name of the object that triggered 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. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Describes the creation failure trace of this exception. - - - - - Creates a new instance of the - FactoryObjectNotInitializedException class. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - FactoryObjectCircularReferenceException class. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectCircularReferenceException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - is asked for an object instance name for which it cannot find a definition. - - Rod Johnson - Rick Evans (.NET) - - - - 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. - - - Name of the missing object. - - - A further, detailed message describing the problem. - - - - - Initializes a new instance of the class. - - The required type of the object. - A description of the originating dependency. - A message describing the problem. - - - - Creates a new instance of the - class. - - - The of the missing object. - - - A further, detailed message describing the problem. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Return the required of object, if it was a - lookup by that failed. - - - - - Return the name of the missing object, if it was a lookup by name that - failed. - - - - - Thrown in case of a reference to an object that is currently in creation. - - -

- Typically happens when constructor autowiring matches the currently - constructed object. -

-
- Juergen Hoeller - Rick Evans -
- - - The default error message text to be used, if none is specified. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectCurrentlyInCreationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - encounters an error when attempting to parse an object - definition. - - Federico Spinazzi (.NET) - - - - Creates a new instance of the ObjectDefinitionException class. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The value of the xml class attribute thet can be resolved - as a type - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The message about the exception. - - - - - Convenience methods operating on object factories, returning object instances, - names, or counts. - - -

- The nesting hierarchy of an object factory is taken into account by the various methods - exposed by this class. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Used to dereference an - and distinguish it from managed objects created by the factory. - - -

- For example, if the managed object identified as foo is a - factory, getting &foo will return the factory, not the - instance returned by the factory. -

-
-
- - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Count all object definitions in any hierarchy in which this - factory participates. - - -

- Includes counts of ancestor object factories. -

-

- Objects that are "overridden" (specified in a descendant factory - with the same name) are counted only once. -

-
- The object factory. - - The count of objects including those defined in ancestor factories. - -
- - - Return all object names in the factory, including ancestor factories. - - The object factory. - The array of object names, or an empty array if none. - - - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s - if is set to true, - which means that s will get initialized. -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - The array of object names, or an empty array if none. - -
- - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - The array of object names, or an empty array if none. - -
- - - Return all objects of the given type or subtypes, also picking up objects - defined in ancestor object factories if the current object factory is an - . - - -

- The return list will only contain objects of this type. - Useful convenience method when we don't care about object names. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the objects could not be created. - - - The of object instances, or an - empty if none. - -
- - - Return a single object of the given type or subtypes, also picking up objects defined - in ancestor object factories if the current object factory is an - . - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If more than one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. - This version of ObjectOfType automatically includes prototypes and - instances. -

-
- The object factory. - The of object to match. - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return the object name, stripping out the factory dereference prefix if necessary. - - The name of the object. - The object name sans any factory dereference prefix. - - - - Given an (object) name, builds a corresponding factory object name such that - the return value can be used as a lookup name for a factory object. - - - The name to be used to build the resulting factory object name. - - - The transformed into its factory object name - equivalent. - - - - - - - Is the supplied a factory dereference? - - -

- That is, does the supplied begin with - the - ? -

-
- The name to check. - - if the supplied is a - factory dereference; if not, or the - aupplied is or - consists solely of the - - value. - - -
- - - Exception that an object implementation is suggested to throw if its own - factory-aware initialization code fails. - thrown by object factory methods - themselves should simply be propagated as-is. - - -

- Note that non-factory-aware initialization methods like AfterPropertiesSet () - or a custom "init-method" can throw any exception. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectInitializationException class. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectInitializationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to an attempt to lookup a factory object, and - the object identified by the lookup key is not a factory. - - -

- An object is a factory if it implements (either directly or indirectly - via inheritance) the - interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Thrown when an object doesn't match the required . - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - Name of the object requested. - - - The required of the actual object - instance that was retrieved. - - - The instance actually returned, whose class did not match the - expected . - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The actual of the actual object - instance that was retrieved. - - - - - The required of the actual object - instance that was retrieved. - - - - - The instance actually returned, whose class did not match the - expected . - - - - - The name of the object requested. - - - - - 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 name of the object that was being retrieved from the factory. - - - The object instance that was retrieved. - - - - - 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. - - - - - Exception thrown when an object depends on other objects or simple properties - that were not specified in the object factory definition, although dependency - checking was enabled. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The constructor argument index at which the dependency is - unsatisfied. - - - The of the constructor argument at - which the dependency is unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The name identifying the property on which the dependency is - unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Base class implementation for classes that describe an event handler. - - Rick Evans - - - - Describes an event handler. - - Rick Evans - - - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - The source of the event. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Returns a stringified representation of this object. - - A stringified representation of this object. - - - - The source of the event (may be unresolved, as in the case - of a - value). - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Convenience base class for implementations. - - - - - Abstracts the state sharing strategy used - by - - Erich Eichinger - - - - Indicate, whether the given instance can be served by this factory - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state can - be served for the given instance or not. - - - - - Returns the shared state for the given instance. - - the instance to obtain shared state for. - the name of this instance - a dictionary containing shared state for or null. - - - - Gets a dictionary acc. to the type of . - If no dictionary is found, create it according to - - the instance to obtain shared state for - the name of the instance. - - A dictionary containing the 's state, - or null if no state can be served by this provider. - - - - - Creates a dictionary to hold the shared state identified by . - - a key to create the dictionary for. - a dictionary according to and . - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Create the key used for obtaining the state dictionary for . - - the instance to create the key for - the name of the instance. - - the key identifying the state dictionary to be used for - or null, if this state manager doesn't serve the given instance. - - - - Implementations may choose to return null from this method to indicate, - that they won't serve state for the given instance. - - - Note:Keys returned by this method are always treated case-sensitive! - - - - - - Create shared state dictionaries case-sensitive or case-insensitive? - - - - - A number indicating the priority of this ( for more). - - - - - Base class for all - implemenations that actually perform event wiring. - - Rick Evans - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Resolves the method metadata that describes the method that is to be used - as the argument to a delegate constructor. - - - The exposing the method. - - - The of the delegate (e.g. System.EventHandler). - - - The custom binding flags to use when searching for the method. - - The method metadata. - - If the method could not be found. - - - - - Describes an implementation - that autowires events to handler methods. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Wires up the specified handler to the named event on the supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a , - etc). - - - - - The name of the method that is going to handle the event. - - - - - Performs the matching up of handler methods to one or more source events. - - -

- This class merely marshals the matching of handler methods to the events exposed - by an event source, and then delegates to a concrete - implementation (such as - or - ) to do the heavy lifting of - actually wiring a handler method to an event. -

-

- Note : the order in which handler's are wired up to events is non-deterministic. -

-
-
- - - Creates a new instance of the - class. - - - The object exposing the event (s) being wired up. - - - The name of the event that is being wired up. - - - The object exposing the method (s) being wired to the event. - - - The name of the method that is going to handle the event. - - - - - Wires up events on the source to methods exposed on the handler. - - - - - Wires up the supplied event to any handler methods that match the event - signature. - - The event being wired up. - - - - Only replaces the first occurrence of the placeholder. - - The event whose name is going to be used. - - The method name customised for the name of the supplied event. - - - - - The object exposing the event (s) being wired up. - - - - - The object exposing the method (s) being wired to an event source. - - - - - The of the object that is handling any events. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Serves shared state on a by-type basis. - - - - - Creates a new instance matching all types by default. - - - - - Creates a new instance matching only specified list of types. - - the list of types to serve. - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Returns the for the given . - - the instance to obtain the key for. - the name of the instance (ignored by this provider) - instance.GetType() if it matches the list. Null otherwise. - - This method will only be called if returned true previously. - - - - - Limit object types to be served by this state manager. - - - Only objects assignable to one of the types in this list - will be served state by this manager. - - - - - Describes an event handler for an object instance. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Definition for sorting object instances by a property. - - Juergen Hoeller - Simon White (.NET) - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Mutable implementation of the - interface that - supports toggling the ascending value on setting the same property again. - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using - the specified . - - - The to use - as a source for initial property values. - - - - - Creates a new instance of the - class. - - - The name of the property to sort by. - - - Whether upper and lower case in string values should be ignored. - - - Whether or not the sorting should be ascending or descending. - - - - - Creates a new instance of the - class. - - - Whether or not the - - property should be toggled if the same name is set on the - - property. - - - - - Overrides the default method - - - The object to test against this instance for equality. - - - True if the supplied is equal to this instance. - - - - - Overrides the default method. - - The hashcode for this instance. - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Performs a comparison of two objects, using the specified object property via - an . - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - The to use for any - sorting. - - - If the supplied is . - - - - - Compares two objects and returns a value indicating whether one is less - than, equal to or greater than the other. - - The first object to compare. - The second object to compare. - - - - - Get the 's property - value for the given object. - - The object to get the property value for. - The property value. - - - - Sort the given according to the - given sort definition. - - - The to be sorted. - - The parameters to sort by. - - In the case of a missing property name. - - - If the supplied is . - - - - - Gets the to - use for any sorting. - - - The to use for - any sorting. - - - - - Describes an event handler for a static class method. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - The central interface of Spring.NET's low-level object infrastructure. - - -

- Typically not directly used by application code but rather implicitly - via an . -

-

- Implementing classes have the ability to get and set property values - (individually or in bulk), get property descriptors and query the - readability and writability of properties. -

-

- This interface supports nested properties enabling the setting - of properties on subproperties to an unlimited depth. -

-

- If a property update causes an exception, a - will be thrown. Bulk - updates continue after exceptions are encountered, throwing an exception - wrapping all exceptions encountered during the update. -

-

- implementations can be used - repeatedly, with their "target" or wrapped object changed. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - Get the value of a property. - - The name of the property to get the value of. May be nested. - - The value of the property. - - if the property isn't readable, or if the getting the value throws - an exception. - - - - - Get the for a particular - property. - - - The property to be retrieved. - - - The for the particular - property. - - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Get all of the instances for - all of the properties of the wrapped object. - - - An array of instances. - - - - - Set a property value. - - -

- This is the preferred way to update an individual property. -

-
- The new property value. -
- - - Set a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new property value. -
- - Set a number of property values in bulk. - -

- This is the preferred way to perform a bulk update. -

-

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

- Does not allow the setting of unknown fields. Equivalent to - - with an argument of false for the second parameter. -

-
- - The collection of instances to - set on the wrapped object. - -
- - - Set a number of property values in bulk with full control over behavior. - - -

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

Does not allow the setting of unknown fields. -

-
- - The to set on the target object - - - Should we ignore unknown values (not found in the object!?) - -
- - - The object wrapped by the wrapper (cannot be ). - - -

- Implementations are required to allow the type of the wrapped - object to change. -

-
- The object wrapped by this wrapper. -
- - - Convenience method to return the - of the wrapped object. - - The of the wrapped object. - - - - A collection style container for - instances. - - Rod Johnson - Mark Pollack (.NET) - - - - Return the instance with the - given name. - - The name to search for. - the , or null if a - the with the supplied - did not exist in this collection. - - - - - Is there a instance for this - property name? - - The name to search for. - - True if there is a instance for - the supplied . - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - -

- Subclasses should also override Equals. -

-
- The old property values. - - An containing any changes, or - an empty instance if there were - no changes. - -
- - - Return an array of the objects - held in this object. - - An array of the objects held - in this object. - - - - - This interface should be implemented by classes that want to - have access to the shared state. - - -

- Shared state is very useful if you have data that needs to be shared by all instances - of e.g. the same webform (or other IHttpHandlers). -

-

- For example, Spring.Web.UI.Page class implements this interface, which allows - each page derived from it to cache localizalization resources and parsed data binding - expressions only once and then reuse the cached values, regardless of how many instances - of the page are created. -

-
-
- - - Gets or sets the that should be used - to store shared state for this instance. - - - - - Default implementation of the - interface. - - -

- Allows simple manipulation of properties, and provides constructors to - support deep copy and construction from a number of collection types such as - and - . -

-
- Rod Johnson - Mark Pollack (.NET) - Rick Evans (.NET) -
- - - The list of objects. - - - - - Creates a new instance of the - class. - - -

- The returned instance is initially empty... - s can be added with the various - overloaded , - , - , - and - methods. -

-
- - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. Guarantees - references are independent, although it can't deep copy objects currently - referenced by individual objects. -

-
-
- - - Creates a new instance of the - class. - - - The with property values - keyed by property name, which must be a . - - - - - Overloaded version of Add that takes a property name and a property value. - - - The name of the property. - - - The value of the property. - - - - - Add the supplied object, - replacing any existing one for the respective property. - - - The object to add. - - - - - Merges the value of the supplied 'new' with that of - the current if merging is supported and enabled. - - - The new pv. - The current pv. - The possibly merged PropertyValue - - - - Add all property values from the given - . - - - The map of property values, the keys of which must be - s. - - - - - Add all property values from the given - . - - - The list of s to be added. - - - - - Remove the given , if contained. - - - The to remove. - - - - - Removes the named , if contained. - - - The name of the property. - - - - - Modify a object held in this object. Indexed from 0. - - - - - Return the property value given the name. - - - The property name is checked in a case-insensitive fashion. - - - The name of the property. - - - The property value. - - - - - Does the container of properties contain one of this name. - - The name of the property to search for. - - True if the property is contained in this collection, false otherwise. - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - Another property values collection. - - The collection of property values that are different than the supplied one. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - Convert the object to a string representation. - - - A string representation of the object. - - - - - Property to retrieve the array of property values. - - - - - Default implementation of the - interface that should be sufficient for all normal uses. - - -

- will convert - and array - values to the corresponding target arrays, if necessary. Custom - s that deal with - s or arrays can be written against a - comma delimited as - arrays are converted in such a format if the array itself is not assignable. -

-
- Rod Johnson - Juergen Hoeller - Jean-Pierre Pawlak - Mark Pollack (.NET) - Aleksandar Seovic(.NET) -
- - The wrapped object. - - - - The ILog instance for this class. We'll create a lot of these objects, - so we don't want a new instance every time. - - - - - Creates a new instance of the class. - - -

- The wrapped target instance will need to be set afterwards. -

-
- -
- - - Creates a new instance of the class. - - - The object wrapped by this . - - - If the supplied is . - - - - - Creates a new instance of the class, - instantiating a new instance of the specified and using - it as the . - - -

- Please note that the passed as the - argument must have a no-argument constructor. - If it does not, an exception will be thrown when this class attempts - to instantiate the supplied using it's - (non-existent) constructor. -

-
- - The to instantiate and wrap. - - - If the is , or if the - invocation of the s default (no-arg) constructor - fails (due to invalid arguments, insufficient permissions, etc). - -
- - Gets the value of a property. - - The name of the property to get the value of. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - Gets the value of a property. - - The property expression that should be used to retrieve the property value. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - - Sets a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new value. -
- - - Sets a property value. - - - The property expression that should be used to set the property value. - - The new value. - - - - Sets a property value. - - -

- This is the preferred way to update an individual property. -

-
- - The object containing new property value. - -
- - Set a number of property values in bulk. - -

- Does not allow unknown fields. Equivalent to - - with and for - arguments. -

-
- - The to set on the target - object. - - - If an error is encountered while setting a property. - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Perform a bulk update with full control over behavior. - - -

- This method may throw a reflection-based exception, if there is a critical - failure such as no matching field... less serious exceptions will be accumulated - and thrown as a single . -

-
- - The s to set on the target object. - - - Should we ignore unknown values (not found in the object!?). - - - If an error is encountered while setting a property (only thrown if the - parameter is set to ). - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Returns PropertyInfo for the specified property - - The name of the property to search for. - The for the specified property. - If cannot be determined. - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Returns MemberInfo for the specified property or field - - The name of the property or field to search for. - The or for the specified property or field. - If does not resolve to a property or field. - - - - Get the properties of the wrapped object. - - - An array of s. - - - - - This method is expensive! Only call for diagnostics and debugging reasons, - not in production. - - - A string describing the state of this object. - - - - - Attempts to parse property expression first and falls back to full expression - if that fails. Performance optimization. - - Property expression to parse. - Parsed proeprty expression. - - - - The object wrapped by this . - - - If the object cannot be changed; or an attempt is made to set the - value of this property to . - - - - - Convenience method to return the of the wrapped object. - - -

- Do not use this (convenience) method prior to setting the - property. -

-
- - The of the wrapped object. - - - If the property - is . - -
- - - Return the collection of property descriptors. - - - - - Combined exception, composed of individual binding - s. - - -

- An object of this class is created at the beginning of the binding - process, and errors added to it as necessary. -

-

- The binding process continues when it encounters application-level - s, applying those changes - that can be applied and storing rejected changes in an instance of this class. -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) -
- - - Creates a new instance of the PropertyAccessExceptionsException class. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Create new empty PropertyAccessExceptionsException. - We'll add errors to it as we attempt to bind properties. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The IObjectWrapper wrapping the target object at the root of the exception. - - - - The list of PropertyAccessException objects. - - - - Return the - for the supplied , or - if there isn't one. - - - - - Describe the number of exceptions contained in this container class. - - A description of the instance contents. - - - - Return the that generated - this exception. - - - - - Return the object we're binding to. - - - - - If this returns zero (0), no errors were encountered during binding. - - - - - Return an array of the s - stored in this object. - - -

- Will return the empty array (not ) if there were no errors. -

-
-
- - - Describe the group of exceptions. - - - - - Holds information and value for an individual property. - - -

- Using an object here, rather than just storing all properties in a - map keyed by property name, allows for more flexibility, and the - ability to handle indexed properties in a special way if necessary. -

-

- Note that the value doesn't need to be the final required - : an - implementation must - handle any necessary conversion, as this object doesn't know anything - about the objects it will be applied to. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - - If the supplied is or - contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - Pre-parsed property name. - - If the supplied or - is , or if the name contains only whitespace characters. - - - - - Print a string representation of the property. - - A string representation of the property. - - - - Determines whether the supplied - is equal to the current . - - The other instance. - - if they are equal in content. - - - - - 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 name of the property. - The name of the property. - - - - Parsed property expression. - - - - - Return the value of the property. - - -

- Note that type conversion will not have occurred here. - It is the responsibility of the - implementation to - perform type conversion. -

-
- The (possibly unresolved) value of the property. -
- - - A simple pool implementation - - -

- Based on the implementation found in Concurrent Programming in Java, - 2nd ed., by Doug Lea. -

-
- Doug Lea - Federico Spinazzi - Mark Pollack -
- - - A simple pooling interface for managing and monitoring a pool - of objects. - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - Obtain an instance from the pool. - - -

- By contract, clients must return the borrowed - instance using - or a related method as defined in an implementation or - sub-interface. -

-
- An instance from the pool. - - In case the pool is unusable. - - -
- - - Return an instance to the pool. - - -

- By contract, the object must have been obtained using - - or a related method as defined in an implementation or sub-interface. -

-
- The instance to be returned to the pool. - -
- - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This is an optional operation. AddObject is useful for "pre-loading" a - pool with idle objects. -

-
- - If the implementation does not support the operation. - -
- - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently borrowed from the pool. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently idle in the pool. - - -

- This is an optional operation. -

-

- This may be considered an approximation of the number of objects - that can be borrowed without creating any new instances. -

-
- - If the implementation does not support the operation. - -
- - - Set the factory used to create new instances. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Set of permits - - - - - Creates a new instance of the - class. - - - The factory used to instantiate and manage the lifecycle of pooled objects. - - The initial size of the pool. - - If the supplied is . - - - If the supplied is less than or equal to zero. - - - - - Obtain an instance from the pool. - - - In case the pool is unusable. - - - - - - - Return an instance to the pool. - - The instance to be returned to the pool. - - - - - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Synchronized borrow logic. - - - - - - Synchronized release logic. - - - The object to release to the pool. - - - if the object was not a busy one. - - - - - Instantiates the supplied number of instances and adds - them to the pool. - - - The initial number of objects to build. - - - If the supplied number of is - less than or equal to zero. - - - - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Change the state of the pool to unusable. - - - - - Gets the number of instances currently borrowed from the pool. - - - If the implementation does not support the operation. - - - - - - Gets the number of instances currently idle in the pool. - - - If the implementation does not support the operation. - - - - - - Set the factory used to create new instances. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Defines lifecycle methods for objects that are to be used in an - implementation. - - -

- The following methods summarize the contract between an - and an - an . -

- - - - is called whenever a new instance is needed. - - - - is invoked on every instance before it is returned from - the pool. - - - - is invoked on every instance when it is returned to the pool. - - - - is invoked on every instance when it is being dropped from the - pool (see - - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - 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. - - -

- Invoked on every instance when it is being "dropped" - from the pool (whether due to the return value from a call to the - - method, or for reasons specific to the pool implementation.) -

-
- 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. - - -

- Invoked in an implementation-specific fashion to determine if an - instance is still valid to be returned by the pool. - It will only be invoked on an "activated" instance. -

-
- 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. - - -

- Invoked on every instance before it is returned from the pool. -

-
- The instance to be activated. -
- - - Uninitialize an instance to be returned to the pool. - - -

- Invoked on every instance when it is returned to the pool. -

-
- The instance returned to the pool. -
- - - Base class for all pooling exceptions. - - Federico Spinazzi - - - - 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. - - - - - Base class for method builders that contains common functionalities. - - Bruno Baia - - - - Defines interface that proxy method builders have to implement. - - Aleksandar Seovic - Bruno Baia - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - The type builder to use. - - - - - The implementation to use. - - - - - Indicates whether interfaces should be implemented explicitly. - - - - - 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 . - - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Defines proxy method for the target object. - - The method to proxy. - - The interface definition of the method, if applicable. - - - if the supplied is to be - implemented explicitly; otherwise . - - - The for the proxy method. - - - - - Defines generic method parameters based on proxied method metadata. - - - The to use. - - The method to proxy. - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Calls target method directly. - - The IL generator to use. - The method to invoke. - - - - Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. - - The IL generator to use. - The method to test for - the name of the target to be used in error messages - - - - Calls base method directly. - - The IL generator to use. - The method to proxy. - - - - Replaces a raw reference with a reference to a proxy. - - -

- If the target object returns reference to itself -- 'this' -- - we need to treat it as a special case and return a reference - to a proxy object instead. -

-
- The IL generator to use. - The location of the return value. -
- - - Generates code that throws . - - IL generator to use. - the type of the exception to throw - Error message to use. - - - - Base class for proxy builders that can be used - to create a proxy for any class. - - -

- This class provides a set of template - methods that derived classes can override to provide custom behaviour - appropriate to the type of proxy that is being generated (one of - inheritance or composition-based proxying). -

-
- Aleksandar Seovic - Bruno Baia -
- - - Describes the operations for a generic proxy type builder that can be - used to create a proxy type for any class. - - Aleksandar Seovic - - - - Creates the proxy type. - - The generated proxy class. - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - - - - Gets or sets the list of interfaces proxy should implement. - - - - - Should we proxy target attributes? - - - by default. - Target type attributes, method attributes, method's return type attributes - and method's parameter attributes are copied to the proxy. - - - - - The list of custom s that the proxy - class must be decorated with. - - -

- Note that the list is composed of instances of the actual - s that are to be applied, not the - s of the s. -

-
- -

- The following code snippets show examples of how to decorate the - the proxied class with one or more s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary typeAtts = new Hashtable(); - builder.TypeAttributes = typeAtts; - - // applies a single Attribute to the proxied class... - typeAtts = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to the proxied class... - typeAtts = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - The custom s that the proxy - members must be decorated with. - - -

- This dictionary must use simple s for keys - (denoting the member names that the attributes are to be applied to), - with the corresponding values being - s. -

-

- The key may be wildcarded using the '*' character... if so, - then those proxy members that match against the key will be - decorated with the attendant list of - s. This naturally implies that using - the '*' character as a key will result in the attendant list - of s being applied to every member of - the proxied class. -

-
- -

- The following code snippets show examples of how to decorate the - members of a proxied class with one or more - s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary memAtts = new Hashtable(); - builder.MemberAttributes = memAtts; - - // applies a single Attribute to all members of the proxied class... - memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to all members of the proxied class... - memAtts ["*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - - // applies a single Attribute to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - Describes the operations that generates IL instructions - used to build the proxy type. - - Bruno Baia - - - - Generates the IL instructions that pushes - the proxy 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. - - - - The shared instance for this class (and derived classes). - - - - - Creates the proxy type. - - The generated proxy class. - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Creates an appropriate type builder. - - The name to use for the proxy type name. - The type to extends if provided. - The type builder to use. - - - - Applies attributes to the proxy class. - - The type builder to use. - The proxied class. - - - - - - Applies attributes to the proxied method. - - The method builder to use. - The proxied method. - - - - - - Applies attributes to the proxied method's return type. - - The method builder to use. - The proxied method. - - - - - Applies attributes to proxied method's parameters. - - The method builder to use. - The proxied method. - - - - - Calculates and returns the list of attributes that apply to the - specified type. - - The type to find attributes for. - - A list of custom attributes that should be applied to type. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method. - - The method to find attributes for. - - A list of custom attributes that should be applied to method. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method's return type. - - The method to find attributes for. - - A list of custom attributes that should be applied to method's return type. - - - - - - Calculates and returns the list of attributes that apply to the - specified method's parameters. - - The method to find attributes for. - The method's parameter to find attributes for. - - A list of custom attributes that should be applied to the specified method's parameter. - - - - - - Check that the specified object is matching the passed attribute type. - - -

- The specified object can be of different type : -

- - - - - - System.Reflection.CustomAttributeData (Only with .NET 2.0) - - - - - -
- The object instance to check. - The attribute type to test against. - - if the object instance matches the attribute type; - otherwise . - -
- - - Defines the types of the parameters for the specified constructor. - - The constructor to use. - The types for constructor's parameters. - - - - Implements constructors for the proxy class. - - - The builder to use. - - - - - Generates the proxy constructor. - - The constructor builder to use. - The IL generator to use. - The constructor to use. - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - if target virtual methods should not be proxied; - otherwise . - - - - - Gets the mapping of the interface to proxy - into the actual methods on the target type - that does not need to implement that interface. - - -

- If the target type does not implement the interface, - we return the interfaces methods as the target methods for many reasons : -

    -
  • - The target object can change for an object that implements the interface. - (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' - implementation in the Spring AOP framework for an example) -
  • -
  • - Allow Transparent proxies to be proxied. - (See Spring Remoting framework for an example) -
  • -
  • - Allow null target to be proxied. - (See Spring AOP framework which avoid calls to the target object - by intercepting all methods. Think "dynamic mock") - (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) -
  • -
-

-
- - The of the target object. - - The interface to implement. - - An interface mapping for the interface to proxy. - -
- - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - if only members declared at the level - of the supplied 's hierarchy should be proxied; - otherwise . - - - - - Implements the specified . - - The type builder to use. - The type the property is defined on. - The property to proxy. - The implemented methods map. - - - - Implements the specified event. - - The type builder to use. - The type the event is defined on. - The event to proxy. - The implemented methods map. - - - - Returns an array of s that represent - the proxiable interfaces. - - - An interface is proxiable if it's not marked with the - . - - - The array of interfaces from which - we want to get the proxiable interfaces. - - - An array containing the interface s. - - - - - Checks if specified interface is of a special type - that should never be proxied (i.e. ISerializable). - - Interface type to check. - - true if it is, false otherwise. - - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - -

- The default value of this property is the - . -

-
-
- - - Gets or sets the list of interfaces proxy should implement. - - - The default value of this property is all the interfaces - implemented or inherited by the target type. - - - - - Should we proxy target attributes? - - - - - - The list of custom s that the proxy - class must be decorated with. - - - - - - The custom s that the proxy - members must be decorated with. - - - - - - Implementation of IProxyMethodBuilder that delegates method calls to the base class. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Builds a proxy type using composition. - - - - In order for this builder to work, the target must implement - one or more interfaces. - - - Aleksandar Seovic - Bruno Baia - - - - Target instance calls should be delegated to. - - - - - Creates a new instance of the - class. - - - - - Creates a proxy that delegates calls to an instance of the - target object. - - -

- Only interfaces can be proxied using composition, so the target - must implement one or more interfaces. -

-
- The generated proxy class. - - If the - does not implement any interfaces. - -
- - - Create an to create interface implementations - - - - - Allows subclasses to generate additional code - - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Deaclares a field that holds the target object instance. - - - The builder to use for code generation. - - - - - Generates the proxy constructor. - - -

- This implementation creates instance of the target object for delegation - using constructor arguments. -

-
- The constructor builder to use. - The IL generator to use. - The constructor to delegate the creation to. -
- - - Gets or sets a value indicating whether interfaces should be implemented explicitly. - - - if they should be; otherwise, . - - - - - Allows easy access to existing and creation of new dynamic proxies. - - Aleksandar Seovic - Bruno Baia - - - - The name of the assembly that defines proxy types created. - - - - - The attributes of the proxy type to generate. - - - - - Creates an appropriate type builder. - - The proxy type name. - The type to extends if provided. - The type builder to use. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Builds a proxy type using inheritance. - - - - In order for this builder to work, target methods have to be either - , or belong to an interface. - - - Aleksandar Seovic - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Creates a proxy that inherits the proxied object's class. - - -

- Only (non-final) methods can be proxied, - unless they are members of one of the interfaces that target class - implements. In that case, methods will be proxied using explicit - interface implementation, which means that client code will have - to cast the proxy to a specific interface in order to invoke the - methods. -

-
- 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 proxy constructor. - - -

- This implementation delegates the call to a base class constructor. -

-
- The constructor builder to use. - The IL generator to use. - - The base class constructor to delegate the call to. - -
- - - Gets or sets a value indicating whether inherited members should be proxied. - - - if they should be; otherwise, . - - - - - This attribute can be used to mark interfaces that should not be proxied - - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Implementation of IProxyMethodBuilder that delegates method calls to target object. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Base class for dynamic members. - - Aleksandar Seovic - - - - Method attributes constant. - - - - - Sets up target instance for invocation. - - IL generator to use. - Type of target instance. - - - - Sets up invocation argument. - - IL generator to use. - Argument type. - Argument position. - - - - Generates method invocation code. - - IL generator to use. - Flag specifying whether method is static. - Flag specifying whether method is on the value type. - Method to invoke. - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Defines constructors that dynamic constructor class has to implement. - - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Safe wrapper for the dynamic constructor. - - - will attempt to use dynamic - constructor if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached constructor info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe constructor wrapper. - - Constructor to wrap. - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Factory class for dynamic constructors. - - Aleksandar Seovic - - - - Creates dynamic constructor instance for the specified . - - Constructor info to create dynamic constructor for. - Dynamic constructor for the specified . - - - - Defines methods that dynamic field class has to implement. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Safe wrapper for the dynamic field. - - - will attempt to use dynamic - field if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached fieldInfo or creates a new entry, if none is found. - - - - - Creates a new instance of the safe field wrapper. - - Field to wrap. - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Holds cached Getter/Setter delegates for a Field - - - - - Factory class for dynamic fields. - - Aleksandar Seovic - - - - Creates dynamic field instance for the specified . - - Field info to create dynamic field for. - Dynamic field for the specified . - - - - Defines methods that dynamic indexer class has to implement. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Safe wrapper for the dynamic indexer. - - - will attempt to use dynamic - indexer if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe indexer wrapper. - - Indexer to wrap. - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Internal PropertyInfo accessor. - - - - - Factory class for dynamic indexers. - - Aleksandar Seovic - - - - Prevent instantiation - - - - - Creates dynamic indexer instance for the specified . - - Indexer info to create dynamic indexer for. - Dynamic indexer for the specified . - - - - Defines methods that dynamic method class has to implement. - - - - - Invokes dynamic method on the specified target object. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Safe wrapper for the dynamic method. - - - will attempt to use dynamic - method if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe method wrapper. - - Method to wrap. - - - - Invokes dynamic method. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Gets the class, that declares this method - - - - - Factory class for dynamic methods. - - Aleksandar Seovic - - - - Creates dynamic method instance for the specified . - - Method info to create dynamic method for. - Dynamic method for the specified . - - - - Defines methods that dynamic property class has to implement. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Safe wrapper for the dynamic property. - - - will attempt to use dynamic - property if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached property info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe property wrapper. - - Property to wrap. - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Internal PropertyInfo accessor. - - - - - Holds cached Getter/Setter delegates for a Property - - - - - Factory class for dynamic properties. - - Aleksandar Seovic - - - - Creates safe dynamic property instance for the specified . - - -

This factory method will create a dynamic property with a "safe" wrapper.

-

Safe wrapper will attempt to use generated dynamic property if possible, - but it will fall back to standard reflection if necessary.

-
- Property info to create dynamic property for. - Safe dynamic property for the specified . - -
- - - Creates dynamic property instance for the specified . - - Property info to create dynamic property for. - Dynamic property for the specified . - - - - Represents a Get method - - the target instance when calling an instance method - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - Represents an Indexer Get method - - the target instance when calling an instance method - - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - - Represents a method - - the target instance when calling an instance method - arguments to be passed to the method - the value return by the method. null when calling a void method - - - - Represents a constructor - - arguments to be passed to the method - the new object instance - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Allows easy access to existing and creation of new dynamic relection members. - - Aleksandar Seovic - - - - The name of the assembly that defines reflection types created. - - - - - The attributes of the reflection type to generate. - - - - - Cache for dynamic property types. - - - - - Cache for dynamic field types. - - - - - Cache for dynamic indexer types. - - - - - Cache for dynamic method types. - - - - - Cache for dynamic constructor types. - - - - - Creates an appropriate type builder. - - - The base name to use for the reflection type name. - - The type builder to use. - - - - Returns dynamic property if one exists. - - Property to look up. - callback function that will be called to create the dynamic property - An for the given property info. - - - - Returns dynamic field if one exists. - - Field to look up. - callback function that will be called to create the dynamic field - An for the given field info. - - - - Returns dynamic indexer if one exists. - - Indexer to look up. - callback function that will be called to create the dynamic indexer - An for the given indexer. - - - - Returns dynamic method if one exists. - - Method to look up. - callback function that will be called to create the dynamic method - An for the given method. - - - - Returns dynamic constructor if one exists. - - Constructor to look up. - callback function that will be called to create the dynamic constructor - An for the given constructor. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG mode, per ConditionalAttribute rules. - - - - - Create a new Get method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field - - - - Create a new Set method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field. - - If the field's returns true, the returned method - will throw an when called. - - - - - Create a new Get method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to read the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new Set method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to write the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new method delegate for the specified method using - - the method to create the delegate for - a delegate that can be used to invoke the method. - - - - Creates a new delegate for the specified constructor. - - the constructor to create the delegate for - delegate that can be used to invoke the constructor. - - - - Creates a instance with the highest possible code access security. - - - If allowed by security policy, associates the method with the s declaring type. - Otherwise associates the dynamic method with . - - - - - Delegates a Method(object target, params object[] args) call to the actual underlying method. - - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Converts to an instance of if necessary to - e.g. avoid e.g. double/int cast exceptions. - - - - This method mimics the behavior of the compiler that - automatically performs casts like int to double in "Math.Sqrt(4)".
- See about implicit, widening type conversions on MSDN - Type Conversion Tables -
- - Note: is expected to be a value type! - -
-
- - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Indicates that an annotated class is a "component". - Such classes are considered as candidates for future features such - as auto-detection when using attribute-based configuration and assembly scanning. - - Other class-level annotations may be considered as identifying - a component as well, typically a special kind of component: - e.g. the Repository attribute. - - Mark Fisher - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the component. - - - - Gets or sets the name of the component - - The name of the component. - - - - Indicates that an annotated class is a "Repository" (or "DAO"). - - - A class with this attribute is eligible for Spring DataAccessException translation. A class - with the Repository attribute is also clarified as to its role in the overall application - architecture for the purpose of tools, aspects, etc. - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Rod Johnson - Jueren Hoeller - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the repository. - - - - Indicates that an annotated class is a "Service" (e.g. a business service facade). - - - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - - - - Implements by using . - - Erich Eichinger - - - - Specifies the contract a strategy must be implement to store and - retrieve data that is specific to the executing thread. - - - All implementations of this interface must treat keys case-sensitive. - - Erich Eichinger - - - - Retrieves an object with the specified . - - The name of the item. - - The object in the current thread's context associated with the - specified or null if no object has been stored previously - - - - - Stores a given object and associates it with the specified . - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - - If the object with the specified is not found, the method does nothing. - - The name of the object to remove. - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - - Acquire/Release protocol, base of many concurrency utilities. - - - -

objects isolate waiting and notification for particular logical - states, resource availability, events, and the like that are shared - across multiple threads.

- -

Use of s sometimes (but by no means always) adds - flexibility and efficiency compared to the use of plain - .Net monitor methods and locking, and are sometimes (but by no means - always) simpler to program with.

- -

Used for implementation of a

-
- - Doug Lea - Federico Spinazzi (.Net) -
- - Wait (possibly forever) until successful passage. - Fail only upon interuption. Interruptions always result in - `clean' failures. On failure, you can be sure that it has not - been acquired, and that no - corresponding release should be performed. Conversely, - a normal return guarantees that the acquire was successful. - - - - - Potentially enable others to pass. -

- Because release does not raise exceptions, - it can be used in `finally' clauses without requiring extra - embedded try/catch blocks. But keep in mind that - as with any java method, implementations may - still throw unchecked exceptions such as Error or NullPointerException - when faced with uncontinuable errors. However, these should normally - only be caught by higher-level error handlers. -

-
-
- - - Wait at most msecs to pass; report whether passed. -

- The method has best-effort semantics: - The msecs bound cannot - be guaranteed to be a precise upper bound on wait time in Java. - Implementations generally can only attempt to return as soon as possible - after the specified bound. Also, timers in Java do not stop during garbage - collection, so timeouts can occur just because a GC intervened. - So, msecs arguments should be used in - a coarse-grained manner. Further, - implementations cannot always guarantee that this method - will return at all without blocking indefinitely when used in - unintended ways. For example, deadlocks may be encountered - when called in an unintended context. -

-
- the number of milleseconds to wait - An argument less than or equal to zero means not to wait at all. - However, this may still require - access to a synchronization lock, which can impose unbounded - delay if there is a lot of contention among threads. - - true if acquired -
- - A latch is a boolean condition that is set at most once, ever. - Once a single release is issued, all acquires will pass. -

- Sample usage. Here are a set of classes that use - a latch as a start signal for a group of worker threads that - are created and started beforehand, and then later enabled. -

- - class Worker implements IRunnable { - private readonly Latch startSignal; - Worker(Latch l) - { - startSignal = l; - } - - public void Run() { - startSignal.acquire(); - DoWork(); - } - - void DoWork() { ... } - } - - class Driver { // ... - void Main() { - Latch go = new Latch(); - for (int i = 0; i < N; ++i) // make threads - new Thread(new ThreadStart(new Worker(go)).Start(); - DoSomethingElse(); // don't let run yet - go.Release(); // let all threads proceed - } - } - -
- Doug Lea - Federico Spinazzi (.Net) -
- - - can acquire ? - - - - - Method mainly used by clients who are trying to get the latch - - - - Wait at most msecs millisconds for a permit - - - - Enable all current and future acquires to pass - - - - - An abstraction to safely store "ThreadStatic" data. - - - By default, is used to store thread-specific data. - You may switch the storage strategy by calling .

- NOTE: Access to the underlying storage is not synchronized for performance reasons. - You should call only once at application startup! - - Erich Eichinger - - -

- Holds the current strategy. - - - Access to this variable is not synchronized on purpose for performance reasons. - Setting a different strategy should happen only once - at application startup. - -
- - - Set the new strategy. - - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - -

Base class for counting semaphores based on Semaphore implementation - from Doug Lea.

-
- - -

Conceptually, a semaphore - maintains a set of permits. Each acquire() blocks if - necessary until a permit is available, and then takes it.

- -

Each release adds a permit. However, no actual permit objects are used; - the Semaphore just keeps a count of the number available - and acts accordingly.

- -

A semaphore initialized to 1 can serve as a mutual exclusion lock.

- - Used for implementation of a -
- Doug Lea - Federico Spinazzi (.Net) -
- - - current number of available permits - - - - -

Create a Semaphore with the given initial number of permits.

-

Using a seed of 1 makes the semaphore act as a mutual - exclusion lock.

- -

Negative seeds are also allowed, - in which case no acquires will proceed until the number of - releases has pushed the number of permits past 0.

-
-
- - - Release a permit - - - - - Acquire a permit - - - - - Wait at most msecs millisconds for a permit - - number of ms to wait - true if aquired - - - Release N permits. release(n) is - equivalent in effect to: -
-            for (int i = 0; i < n; ++i) release();
-            
- But may be more efficient in some semaphore implementations. -
- if n is negative. - - -
- - Return the current number of available permits. - Returns an accurate, but possibly unstable value, - that may change immediately after returning. - - - - - Utility class to use an with the - C# using () {} idiom - - - - - Creates a new trying to the given - - - the to be held - - - - Creates a new trying to the given - - - the to be held - millisecond to try to acquire the lock - - - - Releases the held - - - - - initializes and acquire access to the - - - - - - Implements by using a hashtable. - - Erich Eichinger - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - Thrown by synchronization classes that report - timeouts via exceptions. The exception is treated - as a form (subclass) of InterruptedException. This both - simplifies handling, and conceptually reflects the fact that - timed-out operations are artificially interrupted by timers. - - - - - The approximate time that the operation lasted before - this timeout exception was thrown. - - - - - - 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. - - - 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. - - - - - Override of GetObjectData to allow for private serialization - - serialization info - streaming context - - - Constructs a TimeoutException with given duration value. - - - - - Constructs a TimeoutException with the - specified duration value and detail message. - - - - - Gets the approximate time that the operation lasted before - this timeout exception was thrown. - - - - A TimeoutSync is an adaptor class that transforms all - calls to acquire to instead invoke attempt with a predetermined - timeout value. - - - - - - the adapted sync - - - - - timeout value - - - - Create a TimeoutSync using the given Sync object, and - using the given timeout value for all calls to acquire. - - - - - Try to acquire the sync before the timeout - - In case a time out occurred - - - - - - - - - - - - - - Support to account for differences between java nad .NET: -
    -
-
-
- - - .NET threads have not a method to check if they have been interrupted. - Moreover, differently from java threads, when entering locked - blocks, Monitor, Sleep, SpinWait and so on, a - will be raised by the runtime. -

Spring.Threading classes usually call this method before entering a lock block, to mirror java code -

Usually this is non issue because the same exception will be raised entering the monitor - associated with the lock () -

-
- if the thread has been interrupted -
- - - Normalize the given so that - is is comparable with . - - Date. - - - - - - - - - the difference between millisecodns of the first and second date - - - - Returns the number of nanoseconds for the current value of - - Current number of nanoseconds - - - - Returns the number of nano seconds represented by the - - to use - Number of nano seconds for - - - - Returns a representing the number of nanoseconds passed in via . - - Number of nanoseconds. - representing the number of nanoseconds passed in. - - - - Placeholder for java.lang.System.currentTimeMillis - - The current machine time in milliseconds - - - - Has been interrupted this thread - - - - - Miscellaneous generic collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Various utility methods relating to the manipulation of arrays. - - Aleksandar Seovic - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Use this sort method instead of to overcome - bugs in Mono. - - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Tests equality of two single-dimensional arrays by checking each element - for equality. - - The first array to be checked. - The second array to be checked. - True if arrays are the same, false otherwise. - - - - Returns hash code for an array that is generated based on the elements. - - - Hash code returned by this method is guaranteed to be the same for - arrays with equal elements. - - - Array to calculate hash code for. - - - A hash code for the specified array. - - - - - Returns string representation of an array. - - - Array to return as a string. - - - String representation of the specified . - - - - - Concatenates 2 arrays of compatible element types - - - If either of the arguments is null, the other array is returned as the result. - The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. - - - - - Assertion utility methods that simplify things such as argument checks. - - -

- Not intended to be used directly by applications. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Checks, whether may be invoked on . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the method to test for - - if is null - - - if it is not possible to invoke on - - - - - checks, whether supports the methods of . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the type to test for - - if is null - - - if it is not possible to invoke methods of - type on - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - If the supplied is . - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is . - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - An arbitrary message that will be passed to any thrown . - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is , contains no elements or only null elements. - - The array or collection to check. - The argument name. - - If the supplied is , - contains no elements or only null elements. - - - - - Checks whether the specified can be cast - into the . - - - The argument to check. - - - The name of the argument to check. - - - The required type for the argument. - - - An arbitrary message that will be passed to any thrown - . - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - The exception message to use if the assertion fails. - - if expression is false - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - - if expression is false - - - - - Assert a bool expression, throwing InvalidOperationException - if the expression is false. - - a boolean expression. - The exception message to use if the assertion fails - if expression is false - - - - Creates a new instance of the class. - - -

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

-
-
- - - General utility methods for working with annotations - - - - - Find a single Attribute of the type 'attributeType' from the supplied class, - traversing it interfaces and super classes if no attribute can be found on the - class iteslf. - - - This method explicitly handles class-level attributes which are not declared as - inherited as well as attributes on interfaces. - - The class to look for attributes on . - Type of the attribibute to look for. - the attribute of the given type found, or null - - - - Miscellaneous collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Adds the specified to the specified . - - The collection to add the element to. - The object to add to the collection. - - - - Adds the specified to the specified . - - The enumerable to add the element to. - The object to add to the collection. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Converts an instance to an instance. - - The instance to be converted. - An instance in which its elements are the elements of the instance. - if the is null. - - - - Copies the elements of the to a - new array of the specified element type. - - The instance to be converted. - The element of the destination array to create and copy elements to - An array of the specified element type containing copies of the elements of the . - - - - Returns the first element contained in both, and . - - The implementation assumes that <<< - the source enumerable. may be null - the list of candidates to match against elements. may be null - the first element found in both enumerables or null - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a value of the given type found, or null if none. - If more than one value of the given type is found - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a collection of matching values of the given type found, empty if none found, or null if the input collection was null. - - - - Find a value of one of the given types in the given Collection, - searching the Collection for a value of the first type, then - searching for a value of the second type, etc. - - The collection to search. - The types to look for, in prioritized order. - a value of the given types found, or null if none - If more than one value of the given type is found - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified dictionary is null empty. - - The dictionary to check. - - true if the specified dictionary is empty or null; otherwise, false. - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A callback method used for comparing to items. - - - - the first object to compare - the second object to compare - Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. - - - - - - Utility class containing helper methods for object comparison. - - Aleksandar Seovic - - - Compares two objects. - First object. - Second object. - - 0, if objects are equal; - less than zero, if the first object is smaller than the second one; - greater than zero, if the first object is greater than the second one. - - - - Utility class for .NET configuration files management. - - Aleksandar Seovic - - - - Avoid BeforeFieldInit pitfall - - - - - Parses the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. - Object created by a corresponding . -
- - - Refresh the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. -
- - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Configuration exception. - - - - Creates the configuration exception. - - Configuration exception. - - - - Determines whether the specified exception is configuration exception. - - The exception to check. - - true if the specified exception is configuration exception; otherwise, false. - - - - - Returns the line number of the specified node. - - Node to get the line number for. - The line number of the specified node. - - - - Returns the name of the file specified node is defined in. - - Node to get the file name for. - The name of the file specified node is defined in. - - - - Sets the current to be used by . - - - íf implements , this method invokes - on the new configSystem to chain them.
- Note, that this method requires reflection on internals of -
- the configuration system to set - bypasses the check if the current system has already been initialized - the previous config system, if any -
- - - Resets the global configuration system instance. Use for unit testing only! - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Gets a string specifying the file/resource name related to the configuration details. - - - - - Gets an integer specifying the line number related to the configuration details. - - - - - Gets an integer specifying the line position related to the configuration details. - - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - An implementation, who's elements retain information - about their location in the original XML text document the were read from. - - - When loading a document, the used must implement . - Typical XmlReader implementations like support this interface. - - Erich Eichinger - - - - Overridden to create a retaining the current - text position information. - - - - - Overridden to create a retaining the current - text position information. - - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store null as their property. - - The XML source - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store as their property. - - - The new XmlNode or null if no more nodes exist. - - the name of the resource - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store null as their property. - - - The new XmlNode or null if no more nodes exist. - - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Get info about the current text position during loading a document. - Outside loading a document, the properties of - will always be null. - - - - - Holds the current text position during loading a document - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - Collects information on the constructor to use to create the instance and the argument instances to pass into the - constructor. - - - - - Initializes a new instance of the class. - - The constructor info. - The arg instances. - - - - Gets the constructor info. - - The constructor info. - - - - Gets the arg instances. - - The arg instances. - - - - Discovers the attributes of a - and provides access to the - s metadata. - - Rick Evans - - - - The method name associated with a delegate invocation. - - - - - Creates a new instance of the - class. - - - The event used to extract the delegate - from. - - - if the supplied is - . - - - - - Creates a new instance of the - class. - - - The delegate . - - - If the supplied is not a subclass of the - class, or is . - - - - - Checks to see if the method encapsulated by the supplied method - metadata is compatible with the method signature associated with - this delegate type. - - The method to be checked. - - if the method signature is compatible with - the signature of this delegate; if not, or - if the supplied parameter is - . - - - - - Gets the s of the parameters of the - method signature associated with this delegate type. - - -

- This method will never return ; the returned - array may be empty, but it most certainly - will not be . -

-
- - A array of the parameter - s; or the - array if the method signature has no parameters. - -
- - - Gets the return of the - method signature associated with this delegate type. - - The return . - - - - Gets the metadata about the method signature associated - with this delegate type. - - - The metadata about the method signature associated - with this delegate type. - - - - - Determines whether the supplied - is a type. - - - The to be checked. - - - if the supplied - is a ; - if not or the supplied - is . - - - - - Checks if the signature of the supplied - is compatible with the signature expected by the supplied - . - - The event to be checked against. - - The method signature to check for compatibility. - - - if the signature of the supplied - is compatible with the signature - expected by the supplied ; - if not or either of the supplied - parameters is . - - - - - - The of the delegate. - - - - - Use this class for obtaining instances for dynamic code generation. - - -

- The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. -

- - Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. - -
- -

The following excerpt from demonstrates usage:

- - public class DynamicProxyManager - { - public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; - - public static TypeBuilder CreateTypeBuilder(string name, Type baseType) - { - // Generates type name - string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); - ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); - return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); - } - } - -
- Erich Eichinger - - - -
- - - prevent instantiation - - - - - Returns the for the dynamic module within the specified assembly. - - - If the assembly does not exist yet, it will be created.
- This factory caches any dynamic assembly it creates - calling GetModule() twice with - the same name will *not* create 2 distinct modules! -
- The assembly-name of the module to be returned - the that can be used to define new types within the specified assembly -
- - - Persists the specified dynamic assembly to the file-system - - the name of the dynamic assembly to persist - - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Removes all registered s. - - - - - A utility class for raising events in a generic and consistent fashion. - - Rick Evans - - - - Create a new EventRaiser instance - - - - - Raises the event encapsulated by the supplied - , passing the supplied - to the event. - - The event to be raised. - The arguments to the event. - a map of sink/exception entries that occurred during event raising - - - - Invokes the supplied , passing the supplied - to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Raises events defensively. - - -

- Raising events defensively means that as the raised event is passed to each handler, - any thrown by a handler will be caught and silently - ignored. -

-
- Rick Evans -
- - - Defensively invokes the supplied , passing the - supplied to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Implement this interface to create your own, delegating - and set them using - - - - - - - - - - - A strategy for handling errors. This is especially useful for handling - errors that occur during asynchronous execution as in such cases it may not be - possible to throw the error to the original caller. - - Mark Fisher - Mark Pollack (.NET) - - - - Handles the error. - - The exception. - - - - Utility methods for IO handling - - - - - Copies one stream into another. - (Don't forget to call on the destination stream!) - - - Does not close the input stream! - - - - - Reads a stream into a byte array. - - - Does not close the input stream! - - - - - Various utility methods relating to numbers. - - -

- Mainly for internal use within the framework. -

-
- Aleksandar Seovic -
- - - Determines whether the supplied is an integer. - - The object to check. - - if the supplied is an integer. - - - - - Determines whether the supplied is a decimal number. - - The object to check. - - if the supplied is a decimal number. - - - - - Determines whether the supplied is of numeric type. - - The object to check. - - true if the specified object is of numeric type; otherwise, false. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to a number. - - The object to check. - - true if the specified object is decimal number; otherwise, false. - - - - - Is the supplied equal to zero (0)? - - The number to check. - - id the supplied is equal to zero (0). - - - - - Negates the supplied . - - The number to negate. - The supplied negated. - - If the supplied is not a supported numeric type. - - - - - Returns the bitwise not (~) of the supplied . - - The number. - The value of ~. - - If the supplied is not a supported numeric type. - - - - - Bitwise ANDs (&) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise ORs (|) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise XORs (^) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Adds the specified numbers. - - The first number. - The second number. - - - - Subtracts the specified numbers. - - The first number. - The second number. - - - - Multiplies the specified numbers. - - The first number. - The second number. - - - - Divides the specified numbers. - - The first number. - The second number. - - - - Calculates remainder for the specified numbers. - - The first number (dividend). - The second number (divisor). - - - - Raises first number to the power of the second one. - - The first number. - The second number. - - - - Coerces the types so they can be compared. - - The right. - The left. - - - - Creates a new instance of the class. - - -

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

-
-
- - - Helper methods with regard to objects, types, properties, etc. - - -

- Not intended to be used directly by applications. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The instance for this class. - - - - - An empty object array. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Instantiates the type using the assembly specified to load the type. - - This is a convenience in the case of needing to instantiate a type but not - wanting to specify in the string the version, culture and public key token. - The assembly. - Name of the type. - - - If the or is - - - If cannot load the type from the assembly or the call to InstantiateType(Type) fails. - - - - - Convenience method to instantiate a using - its no-arg constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The to instantiate* - - A new instance of the . - - If the is - - - If the is an abstract class, an interface, - an open generic type or does not have a public no-argument constructor. - -
- - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. - - - - - Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains - open generic type parameters. - - The type. - - - - Convenience method to instantiate a using - the given constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The constructor to use for the instantiation. - - - The arguments to be passed to the constructor. - - A new instance. - - If the is - - - If the 's declaring type is an abstract class, - an interface, an open generic type or does not have a public no-argument constructor. - -
- - - Checks whether the supplied is not a transparent proxy and is - assignable to the supplied . - - -

- Neccessary when dealing with server-activated remote objects, because the - object is of the type TransparentProxy and regular is testing for assignable - types does not work. -

-

- Transparent proxy instances always return when tested - with the 'is' operator (C#). This method only checks if the object - is assignable to the type if it is not a transparent proxy. -

-
- The target to be checked. - The value that should be assigned to the type. - - if the supplied is not a - transparent proxy and is assignable to the supplied . - -
- - - Determine if the given is assignable from the - given value, assuming setting by reflection and taking care of transparent proxies. - - -

- Considers primitive wrapper classes as assignable to the - corresponding primitive types. -

-

- For example used in an object factory's constructor resolution. -

-
- The target . - The value that should be assigned to the type. - True if the type is assignable from the value. -
- - - Check if the given represents a - "simple" property, - i.e. a primitive, a , a - , or a corresponding array. - - -

- Used to determine properties to check for a "simple" dependency-check. -

-
- - The to check. - -
- - - Check if the given class represents a primitive array, - i.e. boolean, byte, char, short, int, long, float, or double. - - - - - Determines whether the specified array is null or empty. - - The array to check. - - true if the specified array is null empty; otherwise, false. - - - - - Determine if the given objects are equal, returning - if both are respectively - if only one is . - - The first object to compare. - The second object to compare. - - if the given objects are equal. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - If the supplied is . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - If the supplied is . - - - - - Gets the qualified name of the given method, consisting of - fully qualified interface/class name + "." method name. - - The method. - qualified name of the method. - - - - Return a String representation of an object's overall identity. - - The object (may be null). - The object's identity as String representation, - or an empty String if the object was null - - - - - Gets a hex String form of an object's identity hash code. - - The obj. - The object's identity code in hex notation - - - - Support matching of file system paths in a manner similar to that of the - NAnt FileSet. - - -

- Any (back)slashes are converted to forward slashes. -

-
- - - // true - PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); - PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); - PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); - // false - PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); - - - Federico Spinazzi -
- - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - should the match consider the case - - if the path is matched by the pattern; - otherwise . - - - - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - - if the path is matched by the pattern; - otherwise . - - - - - Replaces back(slashes) with forward slashes. - - - The path or the pattern to modify. - - A forward-slashed string. - - - - Helper method to convert a NAnt-like pattern into the - appropriate pattern for a regular expression. - - The NAnt-like pattern. - A regex-compatible pattern. - - - - Creates a new instance of the class. - - -

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

-
-
- - Utility methods for simple pattern matching, in particular for - Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. - - Juergen Hoeller - Mark Pollack - - - Match a String against the given pattern, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the pattern to match against - - the String to match - - whether the String matches the given pattern - - - - Match a String against the given patterns, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the patterns to match against - - the String to match - - whether the String matches any of the given patterns - - - - - An implementation of the Java Properties class. - - - For the complete syntax see java.util.Properties JavaDoc. - This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. - - - key1 = value - key2: - key3 - - will result in the name/value pairs: - - key1:="value" - key2:=string.Empty - key3:=<null> - - note, that to specify a null value, the key must not be followed by any character except newline. - - - Simon White - - - - Creates an empty property list with no default values. - - - - - Creates a property list with the specified initial properties. - - The initial properties. - - - - Reads a property list (key and element pairs) from the input stream. - - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - The text reader to load from. - - - - Reads a property list (key and element pairs) from the input stream. - - the dictionary to put it in - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - the dictionary to put it in - The text reader to load from. - - - - Strips whitespace from the front of the specified string. - - The string. - The string with all leading whitespace removed. - - - - Splits the specified string into a key / value pair. - - The line to split. - An array containing the key / value pair. - - - - Searches for the property with the specified key in this property list. - - The key. - The property, or null if the key was not found. - - - - Searches for the property with the specified key in this property list. - - The key. - - The default value to be returned if the key is not found. - - The property, or the default value. - - - - Writes this property list out to the specified stream. - - The stream to write to. - - - - Sets the specified property key / value pair. - - The key. - The value. - - - - Writes the properties in this instance out to the supplied stream. - - The stream to write to. - Arbitrary header information. - - - - Removes the key / value pair identified by the supplied key. - - - The key identifying the key / value pair to be removed. - - - - - Adds the specified key / object pair to this collection. - - The key. - The value. - - - - Adds the specified key / object pair to this collection. - - - - - Various reflection related methods that are missing from the standard library. - - Rod Johnson - Juergen Hoeller - Aleksandar Seovic (.NET) - Stan Dvoychenko (.NET) - Bruno Baia (.NET) - - - - Convenience value that will - match all private and public, static and instance members on a class - in a case inSenSItivE fashion. - - - - - Avoid BeforeFieldInit problem - - - - - Checks, if the specified type is a nullable - - - - - Returns signature for the specified , method name and argument - s. - - The the method is in. - The method name. - - The argument s. - - The method signature. - - - - Returns method for the specified , method - name and argument - s. - - - Searches with BindingFlags - When dealing with interface methods, you probable want to 'normalize' method references by calling - . - - - - The target to find the method on. - - The method to find. - - The argument s. May be - if the method has no arguments. - - The target method. - - - - - Resolves a given to the representing the actual implementation. - - - see article How To Get an Explicit Interface Implementation Method. - - a - the type to lookup - the representing the actual implementation method of the specified - - - - Returns an array of parameter s for the specified method - or constructor. - - The method (or constructor). - An array containing the parameter s. - - If is . - - - - - Returns an array of parameter s for the - specified parameter info array. - - The parameter info array. - An array containing parameter s. - - If is or any of the - elements is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The method. - An array containing the parameter names. - - If is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The parameter info array. - An array containing parameter names. - - If is or any of the - elements is . - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the type of method (used for exception reporting only) - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of constructors, selects the constructor having an exact match on the given ' types. - - the list of constructors to choose from - the arguments to the method - the constructor matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - Packages arguments into argument list containing parameter array as a last argument. - - Argument vaklues to package. - Total number of oarameters. - Type of the param array element. - Packaged arguments. - - - - Convenience method to convert an interface - to a array that contains - all the interfaces inherited and the specified interface. - - The interface to convert. - An array of interface s. - - If the specified is not an interface. - - - If is . - - - - - Is the supplied the default indexer for the - supplied ? - - - The name of the property on the supplied to be checked. - - - The to be checked. - - - if the supplied is the - default indexer for the supplied . - - - If the supplied is . - - - - - Is the supplied declared on one of these interfaces? - - The method to check. - The array of interfaces we want to check. - - if the method is declared on one of these interfaces. - - - If any of the s specified is not an interface. - - - If or any of the specified interfaces is - . - - - - - Returns the default value for the specified - - -

- Follows the standard .NET conventions for default values where - relevant; for example, all numeric types default to the value - 0. -

-
- - The to return default value for. - - - The default value for the specified . - - - If the supplied is an enumerated type that - has no values. - -
- - - Returns an array consisting of the default values for the supplied - . - - - The array of s to return default values for. - - - An array consisting of the default values for the supplied - . - - - If any of the elements in the supplied - array is an enumerated type that has no values. - - - - - - Checks that the parameter s of the - supplied match the parameter - s of the supplied - . - - The method to be checked. - - The array of parameter s to check against. - - - if the parameter s - match. - - - - - Returns an array containing the s of the - objects in the supplied array. - - - The objects array for which the corresponding s - are needed. - - - An array containing the s of the objects - in the supplied array; this array will be empty (but not - if the supplied - is null or has no elements. - - -

- [C#]
- Given an array containing the following objects, - [83, "Foo", new object ()], the - array returned from this method call would consist of the following - elements... - [Int32, String, Object]. -

-
-
- - - Given the return its representation as - it would appear in the source code files. - - - Largely intended to handle generic types where .ToString() will typically return: - "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" - and this method will instead return: - "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" - - The type. - Friendly string representing the Type - - - - Does the given and/or it's superclasses - have at least one or more methods with the given name (with any - argument types)? - - -

- Includes non-public methods in the methods searched. -

-
- - The to be checked. - - - The name of the method to be searched for. Case inSenSItivE. - - - if the given or / and it's - superclasses have at least one or more methods (with any argument types); - if not, or either of the parameters is . - -
- - - Within , counts the number of overloads for the method with the given (case-insensitive!) - - The type to be searched - the name of the method for which overloads shall be counted - The number of overloads for method within type - - - - Creates a . - - -

- Note that if a non- - is supplied, any read write properties exposed by the - will be used to overwrite values that may have been passed in via the - . That is, the will be used - to initialize the custom attribute, and then any read-write properties on the - will be plugged in. -

-
- - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - If the parameter is . - - - If the parameter is not a - that derives from the class. - - -
- - - Creates a . - - - The desired . - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - - - Creates a . - - - The source attribute to copy properties from. - - A custom attribute builder. - - If the supplied is - . - - - - - Creates a . - - - The desired . - - A custom attribute builder. - - - - Creates a . - - - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - A custom attribute builder. - - - - Creates a . - - - The to create - the custom attribute builder from. - - A custom attribute builder. - - - - Calculates and returns the list of attributes that apply to the - specified type or method. - - The type or method to find attributes for. - - A list of custom attributes (CustomAttributeData or Attribute instances) - that should be applied to type or method. - - - - - Tries to find matching methods in the specified - for each method in the supplied list. - - - The to look for matching methods in. - - The methods to match. - - A flag that specifies whether to throw an exception if a matching - method is not found. - - A list of the matched methods. - - If either of the or - parameters are . - - - - - Returns the of the supplied - . - - -

- If the is a - instance, the return value of this method call with be the - parameter cast to a - . If the is - anything other than a , the return value - will be the result of invoking the 's - method. -

-
- - A or instance. - - - The argument if it is a - or the result of invoking - on the argument if it - is an . - - - If the is . - -
- - - Unwraps the supplied - and returns the inner exception preserving the stack trace. - - - The to unwrap. - - The unwrapped exception. - - - - Is the supplied can be accessed outside the assembly ? - - The type to check. - - if the type can be accessed outside the assembly; - Otherwise . - - - - - Determines whether the specified type is nullable. - - The type. - - true if the specified type is ullable]; otherwise, false. - - - - - Is the supplied can be accessed - from the supplied friendly assembly ? - - The type to check. - The friendly assembly name. - - if the type can be accessed - from the supplied friendly assembly; Otherwise . - - - - - Gets all of the interfaces implemented by - the specified . - - - The object to get the interfaces of. - - - All of the interfaces implemented by the - . - - - - - Returns the explicit that is the root cause of an exception. - - - If the InnerException property of the current exception is a null reference - or a , returns the current exception. - - The last exception thrown. - - The first explicit exception thrown in a chain of exceptions. - - - - - Copies all fields from one object to another. - - - The types of both objects must be related. This means, that either of the following is true: - - fromObject.GetType() == toObject.GetType() - fromObject.GetType() is derived from toObject.GetType() - toObject.GetType() is derived from fromObject.GetType() - - - The source object - The object, who's fields will be populated with values from the source object - If the object's types are not related - - - - Convenience method that uses reflection to return the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to retrieve the field value. - Name of the field on the object from which to retrieve the value. - - - - - Convenience method that uses reflection to set the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to set the field value. - Name of the field on the object to which to set the value. - The field value to set. - - - - Creates a . - - Bruno Baia - - - - Creates a new instance of the - class. - - The custom attribute type. - - - - Creates a new instance of the - class. - - The custom attribute type. - The custom attribute constructor arguments. - - - - Adds the specified values to the constructor argument list - used to create the custom attribute. - - An array of argument values. - - - - Adds a property value to the custom attribute. - - The property name. - The property value. - - - - Creates the . - - The created . - - - - Utility class to be used from within this assembly for executing security critical code - NEVER EVER MAKE THIS PUBLIC! - - Erich Eichinger - - - - Miscellaneous utility methods. - - -

- Mainly for internal use within the framework. -

-
- Rod Johnson - Juergen Hoeller - Keith Donald - Aleksandar Seovic (.NET) - Mark Pollack (.NET) - Rick Evans (.NET) - Erich Eichinger (.NET) -
- - - The string that signals the start of an Ant-style expression. - - - - - The string that signals the end of an Ant-style expression. - - - - - An empty array of instances. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - An array of the tokens. -
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - - - Pairs of quote characters. within a pair of quotes are ignored - - An array of the tokens. -
- - - Convert a CSV list into an array of s. - - - Values may also be quoted using doublequotes. - - A CSV list. - - An array of s, or the empty array - if is . - - - - - Take a which is a delimited list - and convert it to a array. - - -

- If the supplied is a - or zero-length string, then a single element - array composed of the supplied - will be - eturned. If the supplied - is , then an empty, - zero-length array will be returned. -

-
- - The to be parsed. - - - The delimeter (this will not be returned). Note that only the first - character of the supplied is used. - - - An array of the tokens in the list. - -
- - - Convenience method to return an - as a delimited - (e.g. CSV) . - - - The to parse. - - - The delimiter to use (probably a ','). - - The delimited string representation. - - - - Convenience method to return an - as a CSV - . - - - The to display. - - The delimited string representation. - - - - Convenience method to return an array as a CSV - . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - - - Convenience method to return a - array as a delimited (e.g. CSV) . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - The delimiter to use (probably a ','). - - - - Checks if a string has length. - - The string to check, may be . - - - if the string has length and is not - . - - - - StringUtils.HasLength(null) = false - StringUtils.HasLength("") = false - StringUtils.HasLength(" ") = true - StringUtils.HasLength("Hello") = true - - - - - - Checks if a has text. - - -

- More specifically, returns if the string is - not , it's is > - zero (0), and it has at least one non-whitespace character. -

-
- - The string to check, may be . - - - if the is not - , - > zero (0), and does not consist - solely of whitespace. - - - - StringUtils.HasText(null) = false - StringUtils.HasText("") = false - StringUtils.HasText(" ") = false - StringUtils.HasText("12345") = true - StringUtils.HasText(" 12345 ") = true - - -
- - - Checks if a is - or an empty string. - - -

- More specifically, returns if the string is - , it's is equal - to zero (0), or it is composed entirely of whitespace - characters. -

-
- - The string to check, may (obviously) be . - - - if the is - , has a length equal to zero (0), or - is composed entirely of whitespace characters. - - - - StringUtils.IsNullOrEmpty(null) = true - StringUtils.IsNullOrEmpty("") = true - StringUtils.IsNullOrEmpty(" ") = true - StringUtils.IsNullOrEmpty("12345") = false - StringUtils.IsNullOrEmpty(" 12345 ") = false - - -
- - - Returns , if it contains non-whitespaces. null otherwise. - - - - - Strips first and last character off the string. - - The string to strip. - The stripped string. - - - - Returns a list of Ant-style expressions from the specified text. - - The text to inspect. - - A list of expressions that exist in the specified text. - - - If any of the expressions in the supplied - is empty (${}). - - - - - Replaces Ant-style expression placeholder with expression value. - - -

- -

-
- The string to set the value in. - The name of the expression to set. - The expression value. - - A new string with the expression value set; the - value if the supplied - is , has a length - equal to zero (0), or is composed entirely of whitespace - characters. - -
- - - Surrounds (prepends and appends) the string value of the supplied - to the supplied . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The prefix and suffix that respectively will be prepended and - appended to the target . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - The surrounded string. -
- - - Surrounds (prepends and appends) the string values of the supplied - and to the supplied - . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The value that will be prepended to the . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - - The value that will be appended to the . If this value - is not a value, it's attendant - value will be used. - - The surrounded string. -
- - - Converts escaped characters (for example "\t") within a string - to their real character. - - The string to convert. - The converted string. - - - - Utility class containing miscellaneous system-level functionality. - - Aleksandar Seovic - - - - Registers assembly resolver that iterates over the - assemblies loaded into the current - in order to find an assembly that cannot be resolved. - - - This method has to be called if you need to serialize dynamically - generated types in transient assemblies, such as Spring AOP proxies, - because standard .NET serialization engine always tries to load - assembly from the disk. - - - - - Returns true if running on Mono - - Tests for the presence of the type Mono.Runtime - - - - Returns true if running on CLR 4.0 under InProc SxS mode - - - - - Gets the thread id for the current thread. Use thread name is available, - otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and - CurrentThread.ManagedThreadId otherwise. - - The thread id. - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Creates a new TextPositionInfo instance. - - - - - Creates a new TextPositionInfo instance, copying values from another instance. - - - - - The filename related to this text position - - - - - The line number related to this text position - - - - - The line position related to this text position - - - - - UniqueKey allows for generating keys unique to a type or particular instance and a partial name, - that can e.g. be used as keys in . - - - // shows usage type-scoped keys - UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); - UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); - - HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; - Assert.AreEqual( "some value unique for class A having key 'myKey'", value); - - HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; - Assert.AreEqual( "some value unique for class B having key 'myKey'", value); - - - - - Initialize a new instance of from its string representation. - See and See for details. - - The string representation of the new instance. - - - - Compares this instance to another. - - - - - Compares this instance to another. - - - - - Returns the hash code for this key. - - - - - - Returns a string representation of this key. - - - - - Creates a new key instance unique to the given instance. - - The instance the key shall be unique to - The partial key to be made unique - - - If is of type - - - - Creates a new key instance unique to the given type. - - The type the key shall be unique to - The partial key to be made unique - - - - Returns a key unique for the given instance. - - The instance the key shall be unique to - The partial key to be made unique - A key formatted as typename[instance-id].partialkey - - - - Returns a key unique for the given type. - - The type the key shall be unique to - The partial key to be made unique - A key formatted as typename.partialkey - - - - XML utility methods. - - Aleksandar Seovic - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - to be used for resolving external references - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - - A non-validating implementation. - - - - - Implementation of that adds error message - to the validation errors container. - - Aleksandar Seovic - - - - Abstract base class that should be extended by all - validation actions. - - -

- This class implements template Execute method - and defines OnValid and OnInvalid methods that - can be overriden - by specific validation actions. -

-
- Aleksandar Seovic -
- - - An action that should be executed after validator is evaluated. - - -

- This interface allows us to define the actions that should be executed - after validation in a generic fashion. -

-

- For example, addition of error messages to validation errors collection - is performed by one specific implementation of this interface, . -

-
- Aleksandar Seovic -
- - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Initializes a new instance of the class. - - - - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is not valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Evaluates 'when' expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - Error message resource identifier. - Names of the error providers this message should be added to. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Resolves the error message. - - Validation context to resolve message parameters against. - Additional context parameters. - Resolved error message - - - - Resolves the message parameters. - - List of parameters to resolve. - Validation context to resolve parameters against. - Additional context parameters. - Resolved message parameters. - - - - Sets the expressions that should be resolved to error message parameters. - - The expressions that should be resolved to error message parameters. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression that defines the exception to throw when the validator is not valid. - - - - Initializes a new instance of the class with an expression - that defines the exception to throw. - - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the exception to throw - - The throws. - - - - Implementation of that allows you - to define Spring.NET expressions that should be evaluated after - validation. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression to execute when validator is valid. - - The expression to execute when validator is valid. - - - - Gets or sets the expression to execute when validator is not valid. - - The expression to execute when validator is not valid. - - - - Implementation of the custom configuration parser for validator definitions. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parses the validator definition. - - Validator's identifier. - The element to parse. - The parser helper. - Validator object definition. - - - - Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with - the parsed value. - - - - - Parses and potentially registers a validator. - - - Only validators that have id attribute specified are registered - as separate object definitions within application context. - - Validator XML element. - The parser helper. - Validator object definition. - - - - Gets the name of the object type for the specified element. - - The element. - The name of the object type. - - - - Creates an error message action based on the specified message element. - - The message element. - The parser helper. - The error message action definition. - - - - Creates a generic action based on the specified element. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Creates object definition for the validator reference. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Evaluates validator test using condition evaluator. - - Aleksandar Seovic - - - - Base class that defines common properties for all single validators. - - -

- Custom single validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class that defines common properties for all validators. - - -

- Custom validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - An object that can validate application-specific objects. - - -

- The primary motivation for this interface is to enable validation to be - decoupled from the (user) interface and placed in business objects. -

-

- Application developers writing their own custom - implementations will - typically not implement this interface directly. In most cases, custom - validators woud be better served deriving from the - class, with the - custom validation ligic being implemented in an override of the - - - template method. -

-
- Aleksandar Seovic - -
- - - Validates the specified object. - - The object to validate. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Evaluates when expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Processes the error messages. - - Whether validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Gets or sets the validation actions. - - The actions that should be executed after validation. - - - - Creates a new instance of the validator without any - and criteria - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates test object. - - Object to validate. - True if specified object is valid, False otherwise. - - - - Evaluates test expression. - - Root context to use for expression evaluation. - Additional context parameters. - Result of the test expression evaluation, or validation context if test is null. - - - - Gets or sets the test expression. - - The test expression. - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Evaluates the test using condition evaluator. - - -

- Test can be any logical expression that is supported by the Spring.NET logical - expression evaluation engine, and can use any variables that can be resolved - by the variable resolver used by the validation engine. -

-
- The object to validate. - - if the supplied is valid. - -
- - - Perform credit card validations. - - - By default, all supported card types are allowed. You can specify - which credit card type validator should be used by setting - the value of property to a concrete - instance. - - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid credit card number. - - The object to validate. - - if the supplied is valid - credit card number. - - - - - Checks if the is a valid credit card number. - - - The card number to validate. - - - true if the card number is valid. - - - - - Validates card number with the specified validator. - - - Credit card number to validate. - - - true if credit card number is a valid number of credit card type specified. - - - - - Checks for a valid credit card number. - - - Credit Card Number. - - - true if the card number passes the LuhnCheck. - - - - - Credit card type validator to use. - - - Can be concrete implementations of - interface. The following are available implementations: - , , , - . - - - - - CreditCardType interface defines how validation is performed - for one type/brand of credit card. - - - - - Returns true if the card number matches this type of - credit card. - - - The card number, never null. - - - true if the number matches. - - - - - Visa credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a visa number. - - - - - American Express credit card type validation support. - - - - - Indicates, wheter the given credit card number matches an amex number. - - - - - Discover credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a discover number. - - - - - Mastercard credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a mastercard number. - - - - - Perform email validations. - - -

- This implementation is not guaranteed to catch all possible errors in an - email address. For example, an address like nobody@noplace.nowhere will - pass validator, even though there is no TLD "nowhere". - - Goran Milosavljevic - - -

- Creates a new instance of the EmailValidator class. - -
- - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid e-mail address. - - The object to validate. - - if the supplied is valid - e-mail address. - - - - - Regular expression used for validation of object passed to this . - - - - - Validates that the object is valid ISBN-10 or ISBN-13 value. - - Goran Milosavljevic - - - - Creates a new instance of the ISBNValidator class. - - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the ISBN-10 or - ISBN-13 validation rules. - - The object to validate. - - if the supplied is valid ISBN. - - - - - Validates against ISBN-10 or ISBN-13 validation - rules. - - - ISBN string to validate. - - - true if is a valid ISBN-10 or ISBN-13 code. - - - - - ISBN-10 consists of 4 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 1-5 characters, second 1-7, third 1-6, - and fourth is 1 digit or an X. - - - - - ISBN-13 consists of 5 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 978 or 979, the second group is - 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. - - - - - Validates that object matches specified regular expression. - - -

- The test expression must evaluate to a ; - otherwise, an exception is thrown. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Validates an object. - - Object to validate. - - if the supplied - object is valid. - - - If the supplied is not a - - - - - - The regular expression text to match against. - - The regular expression text. - - - - Gets or sets a value indicating whether to do a partial match instead of a full match. - Default is false. - - - - - The for the regular expression evaluation. - - The regular expression evaluation options. - - - - - Validates that required value is not empty. - - -

- This validator uses following rules to determine if target value is valid: - - - - - - - - - - - - - - - - - - - - - - - - - -
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
-

-

- You cannot use this validator to validate any value types other than the ones - specified in the table above. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a variable expression that will be evaluated and the object - obtained as a result of this evaluation will be tested using the rules described - in the class overview of the - class. - - The object to validate. - - if the supplied is valid. - - - - - Validates that the value is valid URL. - - Goran Milosavljevic - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the URL validation rules. - - The object to validate. - - if the supplied is valid. - - - - - Regular expression used for validation of object passed to this . - - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one or more of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

Note, that defaults to true for this validator type!

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class for composite validators - - - - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the child validators. - - The validators. - - - - When set true, shortcircuits evaluation. - - - Setting this property true causes the evaluation process to prematurely abort - if the end result is known. Any remaining child validators will not be considered then. - Setting this value false causes implementations to evaluate all child validators, regardless - of the potentially already known result. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - implementation that supports validating collections. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid for all of the objects in the specified collection. -

-

- You can specify if you want to validate all of the collection elements regardless of the errors by - setting the property to false. -

-

Note, that defaults to true for this validator type!

-

- If you set the IncludeElementErrors property to true, - ValidationErrors collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. -

-
- Damjan Tomic - Aleksandar Seovic -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The bool that determines if all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Validates the specified collection of objects. - If the IncludeElementErrors property was set to true, - collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. - - The collection to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the value that indicates whether to validate all elements of the collection - regardless of the errors. - - This is just an alias for property - - - - Gets or sets the value that indicates whether to capture all the errors of the specific - elements of the collection - - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one and only one of the validators in the Validators collection are valid -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

- By default, this validator group uses == true semantics. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - An interface that validation errors containers have to implement. - - Aleksandar Seovic - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied error . - - -

- If there are no errors for the supplied , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all error providers. - - - - - Allows developers to specify which validator should be used - to validate method argument. - - Damjan Tomic - Aleksandar Seovic - - - - Creates an attribute instance. - - - The name of the validator to use (must be defined within - Spring application context). - - - - - Gets the name of the validator to use. - - The name of the validator to use. - - - - A container for validation errors. - - -

- This class groups validation errors by validator names and allows - access to both the complete errors collection and to the errors for a - certain validator. -

-
- Aleksandar Seovic - Goran Milosavljevic -
- - - Default constructor. - - - - - This property is reserved, apply the - - to the class instead. - - - An that describes the - XML representation of the object that is produced by - the - method and consumed by the - - method. - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all providers. - - - - - Thrown by the validation advice if the method parameters validation fails. - - Aleksandar Seovic - - - - Creates a new instance of the ValidationException class. - - - - - Creates a new instance of the ValidationException class with - specified validation errors. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the ValidationException class with the - specified message and validation errors. - - - A message about the exception. - - - Validation errors. - - - - - Creates a new instance of the ValidationException 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 ValidationException class with the - specified message, root cause and validation errors. - - - A message about the exception. - - - The root exception that is being wrapped. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Implements object serialization. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Gets validation errors. - - Validation errors. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Represents a reference to an externally defined validator object - - -

- This class allows validation groups to reference validators that - are defined outside of the group itself. -

-

- It also allows users to narrow the context for the referenced validator - by specifying value for the Context property. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the name of the referenced validator. - - The name of the referenced validator. - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - 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. - -
- - diff --git a/packages/Spring.Core.1.3.2/lib/net40/Spring.Core.dll b/packages/Spring.Core.1.3.2/lib/net40/Spring.Core.dll deleted file mode 100644 index b2170a4..0000000 Binary files a/packages/Spring.Core.1.3.2/lib/net40/Spring.Core.dll and /dev/null differ diff --git a/packages/Spring.Core.2.0.1/Spring.Core.2.0.1.nupkg b/packages/Spring.Core.2.0.1/Spring.Core.2.0.1.nupkg new file mode 100644 index 0000000..f2e0c6c Binary files /dev/null and b/packages/Spring.Core.2.0.1/Spring.Core.2.0.1.nupkg differ diff --git a/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.dll b/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.dll new file mode 100644 index 0000000..9f9d0da Binary files /dev/null and b/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.dll differ diff --git a/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.pdb b/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.pdb new file mode 100644 index 0000000..170ad60 Binary files /dev/null and b/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.pdb differ diff --git a/packages/Spring.Core.1.3.2/lib/net20/Spring.Core.xml b/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.xml similarity index 91% rename from packages/Spring.Core.1.3.2/lib/net20/Spring.Core.xml rename to packages/Spring.Core.2.0.1/lib/net35/Spring.Core.xml index a7bd651..fd8f020 100644 --- a/packages/Spring.Core.1.3.2/lib/net20/Spring.Core.xml +++ b/packages/Spring.Core.2.0.1/lib/net35/Spring.Core.xml @@ -1,49291 +1,52934 @@ - - - - Spring.Core - - - - - An abstract implementation that can - be used as base class for concrete implementations. - - Aleksandar Seovic - Erich Eichinger - - - - Defines a contract that all cache implementations have to fulfill. - - Aleksandar Seovic - Erich Eichinger - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method have no expiration time - and default cache priority. - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method use the default - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - If equals , - or is true, this cache - instance's value will be applied. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Actually does the cache implementation specific insert operation into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Gets/Set the Default time-to-live (TTL) for items inserted into this cache. - Used by - - - - - Gets/Sets a value, whether the this cache instance's - shall be applied to all items, regardless of their individual TTL - when is called. - - - - - Gets the number of items in the cache. - - - May be overridden by subclasses for cache-specific efficient implementation. - - - - - Gets a collection of all cache item keys. - - - - - Abstract base class containing shared properties for all cache attributes. - - Aleksandar Seovic - - - - The instance used to parse values. - - - - - - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - The cache key cannot evaluate be null or an empty string. - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the cache key for the item. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - Gets an expression instance that should be evaluated in order - to determine the cache key for the item. - - - An expression instance that should be evaluated in order to determine - the cache key for the item. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether the item should be cached. - - - An expression string that should be evaluated in order to determine - whether the item should be cached. - - - - - Gets an expression instance that should be evaluated in order - to determine whether the item should be cached. - - - An expression instance that should be evaluated in order to determine - whether the item should be cached. - - - - - The amount of time an object should remain in the cache. - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache - formatted to be recognizable by . - - - - - The amount of time an object should remain in the cache (in seconds). - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache (in seconds). - - - - - This attribute should be used to mark methods whose argument(s) - need to be cached. - - -

- This attribute allows application developers to specify that an argument - of the method should be cached, but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheParameterAdvice to - all of the members that have this attribute defined. -

-

- You can specify this attribute multiple times on the same method in order to - cache several method parameters. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark methods whose result - needs to be cached. - - -

- This attribute allows application developers to mark that a result - of the method invocation should be cached, but it will not do any - caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used with methods that return an - in order to cache each item separately. - - -

- This attribute allows application developers to specify that each item - from the collection returned by the method should be cached, - but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark method that should - invalidate one or more cache items when invoked. - - -

- This attribute allows application developers to specify that some - cache items should be evicted from cache when the method is invoked, - but it will not do any eviction by itself. -

-

- In order to actually evict cache items, an application developer - must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression string that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether items should be evicted. - - - An expression string that should be evaluated in order to determine - whether items should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine whether items should be evicted. - - - An expression instance that should be evaluated in order to determine - whether items should be evicted. - - - - - A simple implementation backed by a dictionary that - never expires cache items. - - Aleksandar Seovic - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL) in milliseconds. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - -

DictionarySet is an abstract class that supports the creation of new Set - types where the underlying data store is an IDictionary instance.

- -

You can use any object that implements the IDictionary interface to hold set data. - You can define your own, or you can use one of the objects provided in the Framework. - The type of IDictionary you choose will affect both the performance and the behavior - of the Set using it.

- -

To make a Set typed based on your own IDictionary, simply derive a - new class with a constructor that takes no parameters. Some Set implmentations - cannot be defined with a default constructor. If this is the case for your class, - you will need to override Clone() as well.

- -

It is also standard practice that at least one of your constructors takes an ICollection or - an ISet as an argument.

-
-
- -

A collection that contains no duplicate elements. This class models the mathematical - Set abstraction, and is the base class for all other Set implementations. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - Operator - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - | - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - & - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - ^ - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - - - -
-
- - -

A collection that contains no duplicate elements. This interface models the mathematical - Set abstraction. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns if this set contains no elements. - - - - - A collection that contains no duplicate elements. - - -

- This interface models the mathematical - abstraction. The order of - elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various - methods, and thus is not - guaranteed. -

-

- overrides the - method to test for "equivalency": - whether the two sets contain the same elements. The "==" and "!=" - operators are not overridden by design, since it is often desirable to - compare object references for equality. -

-

- Also, the method is not - implemented on any of the set implementations, since none of them are - truly immutable. This is by design, and it is the way almost all - collections in the .NET framework function. So as a general rule, don't - store collection objects inside - instances. You would typically want to use a keyed - instead. -

-

- None of the implementations in - this library are guaranteed to be thread-safe in any way unless wrapped - in a . -

-

- The following table summarizes the binary operators that are supported - by the class. -

- - - Operation - Description - Method - - - Union (OR) - - Element included in result if it exists in either A OR - B. - - Union() - - - Intersection (AND) - - Element included in result if it exists in both A AND - B. - - InterSect() - - - Exclusive Or (XOR) - - Element included in result if it exists in one, but not both, - of A and B. - - ExclusiveOr() - - - Minus (n/a) - - Take all the elements in A. Now, if any of them exist in - B, remove them. Note that unlike the other operators, - A - B is not the same as B - A. - - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - -

- That is, the element is included if it is in either - or this set. Neither this set nor the input - set are modified during the operation. The return value is a - clone of this set with the extra elements added in. -

-
- A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included if it exists in both sets. The - Intersect() operation does not modify the input sets. It - returns a clone of this set with the appropriate elements - removed. -

-
- A set of elements. - - The intersection of this set with . - -
- - - Performs a "minus" of this set from the - set. - - -

- This returns a set of all the elements in set - , removing the elements that are also in - this set. The original sets are not modified during this operation. - The result set is a clone of this - containing the elements from - the operation. -

-
- A set of elements. - - A set containing the elements from this set with the elements in - removed. - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of this set containing the elements - from the exclusive-or operation. -

-
- A set of elements. - - A set containing the result of - ^ this. - -
- - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains no elements. - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns a clone of the Set instance. This will work for derived Set - classes if the derived class implements a constructor that takes no arguments. - - A clone of this object. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the Set is synchronized across threads. Note that - enumeration is inherently not thread-safe. Use the SyncRoot to lock the - object during enumeration. - - - - - An object that can be used to synchronize this collection to make it thread-safe. - When implementing this, if your object uses a base object, like an IDictionary, - or anything that has a SyncRoot, return that object instead of "this". - - - - - Indicates whether the given instance is read-only or not - - - if the ISet is read-only; otherwise, . - In the default implementation of Set, this property always returns false. - - - - - Provides the storage for elements in the Set, stored as the key-set - of the IDictionary object. Set this object in the constructor - if you create your own Set class. - - - - - Adds the specified element to this set if it is not already present. - - The to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. Needed for - non-generic ISet methods implementation - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - The placeholder object used as the value for the IDictionary instance. - - - There is a single instance of this object globally, used for all Sets. - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - None of the objects based on DictionarySet are synchronized. Use the - SyncRoot property instead. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates wether the Set is read-only or not - - - - - Implements a Set based on a Dictionary (which is equivalent of - non-genric HashTable) This will give the best lookup, add, and remove - performance for very large data-sets, but iteration will occur in no particular order. - - - - - Creates a new set instance based on a Dictinary. - - - - - Creates a new set instance based on a Dictinary and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - -

Implements an immutable (read-only) Set wrapper.

-

Although this is advertised as immutable, it really isn't. Anyone with access to the - basisSet can still change the data-set. So GetHashCode() is not implemented - for this Set, as is the case for all Set implementations in this library. - This design decision was based on the efficiency of not having to Clone() the - basisSet every time you wrap a mutable Set.

-
-
- - - Constructs an immutable (read-only) Set wrapper. - - The Set that is wrapped. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - nothing - is always thrown - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - nothing - is always thrown - - - - Removes all objects from the set. - - is always thrown - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - nothing - is always thrown - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - nothing - is always thrown - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - nothing - is always thrown - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns an object that can be used to synchronize use of the Set across threads. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates that the given instance is read-only - - - - - Implements an ordered Set based on a dictionary. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - A collection of elements that defines the initial set contents. - - - - Represents a read only wrapper around a generic IDictionary. The design pattern - mirrors ReadOnlyCollection, and follows the apparent pattern that write operations - do not throw an exception, but simply make no change to the underlying collection. - - Originally put into the public domain. - http://www.simple-talk.com/community/forums/thread/2263.aspx - - - - Original from Public Domain - Mark Pollack (.NET) - - - - Inner storage for ReadOnlyDictionary - - - - - Easy access to non-generic dictionary API - - - - - Initializes a new instance of the class. - - The dictionary to wrap. - - - - Add does not change a read only Dictionary - - The object to use as the key of the element to add. - The object to use as the value of the element to add. - The is read-only. - - - - Determines whether the contains an element with the specified key. - - The key to locate in the . - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Remove does not change a read only Dictionary, will throw an exception. - - The is read-only. - - - - Tries the get value. - - The key. - The value. - - - - - Add does not change a read only Dictionary - - The object to add to the . - The is read-only. - - - - Clear does not change a read only Dictionary. - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if item is found in the ; otherwise, false. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - arrayIndex is less than 0. - array is null. - array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. - - - - Remove does not change a read only Dictionary. Throws an exception - - The object to remove from the . - - true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . - - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Add does not change a read only Dictionary. Throws an exception. - - The to use as the key of the element to add. - The to use as the value of the element to add. - The is read-only.-or- The has a fixed size. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Remove does not change a read only Dictionary. Throws an exception. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. - - - - Runs when the entire object graph has been deserialized. - - The object that initiated the callback. The functionality for this parameter is not currently implemented. - - - - Populates a with the data needed to serialize the target object. - - The to populate with data. - The destination (see ) for this serialization. - The caller does not have the required permission. - - - - Gets a read only containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the value with the specified key. - Set will throw an exception - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether the is read-only. - - - true if the is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets an containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the with the specified key. Set throws an exception. - - - The is read-only. - if try to set value - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Implements a Set based on a sorted tree. This gives good performance for operations on very - large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration - occurs in order. Elements that you put into this type of collection must implement IComparable, - and they must actually be comparable. You can't mix string and int values, for example. - - - - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree. - - The to use for sorting. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - The to use for sorting. - - - -

Implements a thread-safe Set wrapper. The implementation is extremely conservative, - serializing critical sections to prevent possible deadlocks, and locking on everything. - The one exception is for enumeration, which is inherently not thread-safe. For this, you - have to lock the SyncRoot object for the duration of the enumeration.

-
-
- - - Constructs a thread-safe Set wrapper. - - The Set object that this object will wrap. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot - to synchronize the entire enumeration process. - - - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns , indicating that this object is thread-safe. The exception to this - is enumeration, which is inherently not thread-safe. Use the SyncRoot object to - lock this object for the entire duration of the enumeration. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates whether given instace is read-only or not - - - - - This class provides skeletal implementations of some - operations. - - -

- The implementations in this class are appropriate when the base - implementation does not allow elements. The methods - , - , and - are based on - the , - , and - methods - respectively but throw exceptions instead of indicating failure via - or returns. -

- An implementation that extends this class must - minimally define a method - which does - not permit the insertion of elements, along with methods - , and - . Typically, - additional methods will be overridden as well. If these requirements - cannot be met, consider instead subclassing - }. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - A collection designed for holding elements prior to processing. - - -

- Besides basic operations, - queues provide additional insertion, extraction, and inspection - operations. -

-

- Each of these methods exists in two forms: one throws - an exception if the operation fails, the other returns a special - value (either or , depending on the - operation). The latter form of the insert operation is designed - specifically for use with capacity-restricted - implementations; in most implementations, insert operations cannot - fail. -

-

- Queues typically, but do not necessarily, order elements in a - FIFO (first-in-first-out) manner. Among the exceptions are - priority queues, which order elements according to a supplied - comparator, or the elements' natural ordering, and LIFO queues (or - stacks) which order the elements LIFO (last-in-first-out). - Whatever the ordering used, the head of the queue is that - element which would be removed by a call to - or - . In a FIFO queue, all new - elements are inserted at the tail of the queue. Other kinds of queues may - use different placement rules. Every implementation - must specify its ordering properties. -

-

- The method inserts an - element if possible, otherwise returning . This differs from the - method, which can fail to - add an element only by throwing an exception. The - method is designed for - use when failure is a normal, rather than exceptional occurrence, for example, - in fixed-capacity (or "bounded" queues. -

-

- The - methods remove and - return the head of the queue. Exactly which element is removed from the - queue is a function of the queue's ordering policy, which differs from - implementation to implementation. The - and - methods differ only in their - behavior when the queue is empty: the - method throws an exception, - while the method returns - . -

-

- The and - methods return, but do - not remove, the head of the queue. -

-

- The interface does not define the blocking queue - methods, which are common in concurrent programming. -

-

- implementations generally do not allow insertion - of elements, although some implementations, such as - a linked list, do not prohibit the insertion of . - Even in the implementations that permit it, should - not be inserted into a , as is also - used as a special return value by the - method to - indicate that the queue contains no elements. -

-

- implementations generally do not define - element-based versions of methods - and , but instead inherit the - identity based versions from the class object, because element-based equality - is not always well-defined for queues with the same elements but different - ordering properties. -

-

- Based on the back port of JCP JSR-166. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the class of the supplied prevents it - from being added to this queue. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue - - if this queue is empty -
- - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue. - - If this queue is empty. -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Returns if there are no elements in the , otherwise. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Inserts the specified element into this queue if it is possible - to do so immediately without violating capacity restrictions. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that - it throws an exception if this queue is empty. -

-
- - The head of this queue - - - If this queue is empty. - -
- - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-

- ALso note that this implementation returns the result of - unless the queue - is empty. -

-
- The head of this queue. - - If this queue is empty. - -
- - - Removes all of the elements from this queue. - - -

- The queue will be empty after this call returns. -

-

- This implementation repeatedly invokes - until it - returns . -

-
-
- - - Adds all of the elements in the supplied - to this queue. - - -

- Attempts to - - of a queue to itself result in . - Further, the behavior of this operation is undefined if the specified - collection is modified while the operation is in progress. -

-

- This implementation iterates over the specified collection, - and adds each element returned by the iterator to this queue, in turn. - An exception encountered while trying to add an element (including, - in particular, a element) may result in only some - of the elements having been successfully added when the associated - exception is thrown. -

-
- - The collection containing the elements to be added to this queue. - - - if this queue changed as a result of the call. - - - If the supplied or any one of its elements are . - - - If the collection is the current or - the collection size is greater than the queue capacity. - -
- - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns if there are no elements in the , otherwise. - - - - - Returns the current capacity of this queue. - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. - - Erich Eichinger - - - - Creates a case-insensitive hashtable using . - - - - - Creates a case-insensitive hashtable using the given . - - the to calculate the hashcode - - - - Creates a case-insensitive hashtable using the given , initially - populated with entries from another dictionary. - - the dictionary to copy entries from - the to calculate the hashcode - - - - Initializes a new, empty instance of the class that is serializable using the specified and objects. - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the object. - info is null. - - - - Implements the interface and returns the data needed to serialize the . - - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the . - info is null. - - - - Calculate the hashcode of the given string key, using the configured culture. - - - - - - - Compares two keys - - - - - Creates a shallow copy of the current instance. - - - - - is an - class that supports the creation of new - types where the underlying data - store is an instance. - - -

- You can use any object that implements the - interface to hold set - data. You can define your own, or you can use one of the objects - provided in the framework. The type of - you - choose will affect both the performance and the behavior of the - using it. -

-

- This object overrides the method, - but not the method, because - the class is mutable. - Therefore, it is not safe to use as a key value in a dictionary. -

-

- To make a typed based on your - own , simply derive a new - class with a constructor that takes no parameters. Some - implmentations cannot be defined - with a default constructor. If this is the case for your class, you - will need to override clone as well. -

-

- It is also standard practice that at least one of your constructors - takes an or an - as an argument. -

-
- -
- - - A collection that contains no duplicate elements. - - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs a "union" of two sets, where all the elements in both are - present. - - -

- That is, the element is included if it is in either - or . The return - value is a clone of one of the sets ( - if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. -

-
- A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - -
- - - Performs a "union" of two sets, where all the elements in both are - present. - - A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included only if it exists in both - and . Neither input - object is modified by the operation. The result object is a - clone of one of the input objects ( - if it is not ) containing the elements from - the intersect operation. -

-
- A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs a "minus" of set from set - . - - -

- This returns a set of all the elements in set - , removing the elements that are also in - set . The original sets are not modified - during this operation. The result set is a clone of set - containing the elements from the operation. -

-
- A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - -
- - - Performs a "minus" of set from set - . - - A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of one of the sets ( - if it is not ) - containing the elements from the exclusive-or operation. -

-
- A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Returns a clone of the - instance. - - -

- This will work for derived - classes if the derived class implements a constructor that takes no - arguments. -

-
- A clone of this object. -
- - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - This method will test the - against another for - "equality". - - -

- In this case, "equality" means that the two sets contain the same - elements. The "==" and "!=" operators are not overridden by design. - If you wish to check for "equivalent" - instances, use - Equals(). If you wish to check to see if two references are - actually the same object, use "==" and "!=". -

-
- - A object to compare to. - - - if the two sets contain the same elements. - -
- - - Gets the hashcode for the object. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - -

- When implementing this, if your object uses a base object, like an - , or anything that has - a SyncRoot, return that object instead of "this". -

-
- - An object that can be used to synchronize this collection to make - it thread-safe. - -
- - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Provides the storage for elements in the - , stored as the key-set - of the object. - - -

- Set this object in the constructor if you create your own - class. -

-
-
- - - The placeholder object used as the value for the - instance. - - - There is a single instance of this object globally, used for all - s. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Implements an based on a - hash table. - - -

- This will give the best lookup, add, and remove performance for very - large data-sets, but iteration will occur in no particular order. -

-
- -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class, and - initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an that automatically - changes from a list based implementation to a hashtable based - implementation when the size reaches a certain threshold. - - -

- This is good if you are unsure about whether you data-set will be tiny - or huge. -

- - Because this uses a dual implementation, iteration order is not - guaranteed! - -
- -
- - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size, and initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an immutable (read-only) - wrapper. - - -

- Although this class is advertised as immutable, it really isn't. - Anyone with access to the wrapped - can still change the data. So - is not implemented for this , as - is the case for all - implementations in this library. This design decision was based on the - efficiency of not having to clone the wrapped - every time you wrap a mutable - . -

-
-
- - - Constructs an immutable (read-only) - wrapper. - - - The that is to be wrapped. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - - Removes all objects from this set. - - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the - instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - Simple linked list implementation. - - Simon White - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class that contains all - elements of the specified list. - - - A list of elements that defines the initial contents. - - - - - Removes the object at the specified index. - - The lookup index. - - If the specified is greater than the - number of objects within the list. - - - - - Inserts an object at the specified index. - - The lookup index. - The object to be inserted. - - If the specified is greater than the - number of objects within the list. - - - - - Removes the first instance of the specified object found. - - The object to remove - - - - Returns if this list contains the specified - element. - - The element to look for. - - if this list contains the specified element. - - - - - Removes all objects from the list. - - - - - Returns the index of the first instance of the specified - found. - - The object to search for - - The index of the first instance found, or -1 if the element was not - found. - - - - - Adds the specified object to the end of the list. - - The object to add - The index that the object was added at. - - - - Adds all of the elements of the supplied - list to the end of this list. - - The list of objects to add. - - - - Checks whether the list can be modified. - - - If the list cannot be modified. - - - - - Validates the specified index. - - The lookup index. - - If the index is invalid. - - - - - Returns the node at the specified index. - - The lookup index. - The node at the specified index. - - If the specified is greater than the - number of objects within the list. - - - - - Returns the node (and index) of the first node that contains - the specified value. - - The value to search for. - - The node, or if not found. - - - - - Removes the specified node. - - The node to be removed. - - - - Copies the elements in this list to an array. - - -

- The type of array needs to be compatible with the objects in this - list, obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - - - If the supplied is . - - - If the supplied is less than zero - or is greater than the length of . - - - If the supplied is of insufficient size. - -
- - - Gets an enumerator for the elements in the - . - - -

- Enumerators are fail fast. -

-
- - An over the elements - in the . - -
- - - Is list read only? - - - if the list is read only. - - - - - Returns the node at the specified index. - - -

- This is the indexer for the - class. -

-
- -
- - - Is the list a fixed size? - - - if the list is a fixed size list. - - - - - Returns if the list is synchronized across - threads. - - - - This implementation always returns . - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - The number of objects within the list. - - - - - An object that can be used to synchronize this - to make it thread-safe. - - - An object that can be used to synchronize this - to make it thread-safe. - - - - - Implements a based on a list. - - -

- Performance is much better for very small lists than either - or . - However, performance degrades rapidly as the data-set gets bigger. Use a - instead if you are not sure your data-set - will always remain very small. Iteration produces elements in the order they were added. - However, element order is not guaranteed to be maintained by the various - mathematical operators. -

-
-
- - - Creates a new set instance based on a list. - - - - - Creates a new set instance based on a list and initializes it based on a - collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Thrown when an element is requested from an empty . - - Griffin Caprio - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - An unbounded priority based on a priority - heap. This queue orders elements according to an order specified - at construction time, which is specified either according to their - natural order (see , or according to a - , depending on which constructor is - used. A priority queue does not permit elements. - A priority queue relying on natural ordering also does not - permit insertion of non-comparable objects (doing so will result - . - -

- The head of this queue is the lowest element - with respect to the specified ordering. If multiple elements are - tied for lowest value, the head is one of those elements -- ties are - broken arbitrarily. - -

- A priority queue is unbounded, but has an internal - capacity governing the size of an array used to store the - elements on the queue. It is always at least as large as the queue - size. As elements are added to a priority queue, its capacity - grows automatically. The details of the growth policy are not - specified. - -

- This class and its enumerator implement all of the - optional methods of the and - interfaces. - The enumerator provided in method - is not guaranteed to traverse the elements of the PriorityQueue in any - particular order. - -

- Note that this implementation is NOT synchronized. - Multiple threads should not access a - instance concurrently if any of the threads modifies the list - structurally. Instead, use the thread-safe PriorityBlockingQueue. -

- Josh Bloch - Griffin Caprio (.NET) -
- - - Priority queue represented as a balanced binary heap: the two children - of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is - ordered by comparator, or by the elements' natural ordering, if - comparator is null: For each node n in the heap and each descendant d - of n, n <= d. - - The element with the lowest value is in queue[1], assuming the queue is - nonempty. (A one-based array is used in preference to the traditional - zero-based array to simplify parent and child calculations.) - - queue.length must be >= 2, even if size == 0. - - - - The number of elements in the priority queue. - - - - The comparator, or null if priority queue uses elements' - natural ordering. - - - - - The number of times this priority queue has been - structurally modified. - - - - - Creates a with the default initial capacity - (11) that orders its elements according to their natural - ordering (using ). - - - - - Creates a with the specified initial capacity - that orders its elements according to their natural ordering - (using ). - - the initial capacity for this priority queue. - - if is less than 1. - - - - Creates a with the specified initial capacity - that orders its elements according to the specified comparator. - - the initial capacity for this priority queue. - the comparator used to order this priority queue. - If then the order depends on the elements' natural ordering. - - if is less than 1. - - - - Creates a containing the elements in the - specified collection. The priority queue has an initial - capacity of 110% of the size of the specified collection or 1 - if the collection is empty. If the specified collection is an - instance of a , the priority queue will be sorted - according to the same comparator, or according to its elements' - natural order if the collection is sorted according to its - elements' natural order. Otherwise, the priority queue is - ordered according to its elements' natural order. - - the collection whose elements are to be placed into this priority queue. - if elements of cannot be - compared to one another according to the priority queue's ordering - if or any element with it is - - - - - - Common code to initialize underlying queue array across - constructors below. - - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - - Establishes the heap invariant assuming the heap - satisfies the invariant except possibly for the leaf-node indexed by k - (which may have a nextExecutionTime less than its parent's). - - - This method functions by "promoting" queue[k] up the hierarchy - (by swapping it with its parent) repeatedly until queue[k] - is greater than or equal to its parent. - - - - - Establishes the heap invariant (described above) in the subtree - rooted at k, which is assumed to satisfy the heap invariant except - possibly for node k itself (which may be greater than its children). - - - This method functions by "demoting" queue[k] down the hierarchy - (by swapping it with its smaller child) repeatedly until queue[k] - is less than or equal to its children. - - - - - Establishes the heap invariant in the entire tree, - assuming nothing about the order of the elements prior to the call. - - - - - Returns the of or - 1, - whichever is smaller. - - base size - percentage to return - of - - - - Initially fill elements of the queue array under the - knowledge that it is sorted or is another , in which - case we can just place the elements in the order presented. - - - - - Initially fill elements of the queue array that is not to our knowledge - sorted, so we must rearrange the elements to guarantee the heap - invariant. - - - - - Removes and returns element located at from queue. (Recall that the queue - is one-based, so 1 <= i <= size.) - - - Normally this method leaves the elements at positions from 1 up to i-1, - inclusive, untouched. Under these circumstances, it returns . - Occasionally, in order to maintain the heap invariant, it must move - the last element of the list to some index in the range [2, i-1], - and move the element previously at position (i/2) to position i. - Under these circumstances, this method returns the element that was - previously at the end of the list and is now at some position between - 2 and i-1 inclusive. - - - - Resize array, if necessary, to be able to hold given index - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - and this queue does not permit - elements. - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - - - Removes a single instance of the specified element from this - queue, if it is present. - - - - - Returns an over the elements in this queue. - The enumeratoar does not return the elements in any particular order. - - an enumerator over the elements in this queue. - - - - Removes all elements from the priority queue. - The queue will be empty after this call returns. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Queries the queue to see if it contains the specified - - element to look for. - if the queue contains the , - otherwise. - - - Returns the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering - (using ). - - - the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering. - - - - - Save the state of the instance to a stream (that - is, serialize it). - - The length of the array backing the instance is - emitted (int), followed by all of its elements (each an - ) in the proper order. - - the stream - the context - - - - Reconstitute the instance from a stream (that is, - deserialize it). - - the stream - the context - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Copies the elements of the to an , starting at index 0. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Gets the Capacity of this queue. Will equal - - - - - Returns the queue count. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Returns if there are no elements in the , otherwise. - - - - - Index (into queue array) of element to be returned by subsequent call to next. - - - - - Implements an based on a sorted - tree. - - -

- This gives good performance for operations on very large data-sets, - though not as good - asymptotically - as a - . However, iteration occurs - in order. -

-

- Elements that you put into this type of collection must implement - , and they must actually be comparable. - You can't mix and - values, for example. -

-

- This implementation does - not support elements that are . -

-
- -
- - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree using for ordering. - - - - - Creates a new set instance based on a sorted tree and initializes - it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Synchronized that should be returned by synchronized - dictionary implementations in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that should be returned by synchronized - collections in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that, unlike hashtable created - using method, synchronizes - reads from the underlying hashtable in addition to writes. - - -

- In addition to synchronizing reads, this implementation also fixes - IEnumerator/ICollection issue described at - http://msdn.microsoft.com/en-us/netframework/aa570326.aspx - (search for SynchronizedHashtable for issue description), by implementing - interface explicitly, and returns thread safe enumerator - implementations as well. -

-

- This class should be used whenever a truly synchronized - is needed. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of - - - - - Initializes a new instance of - - - - - Initializes a new instance of , copying inital entries from - handling keys depending on . - - - - - Creates a instance that - synchronizes access to the underlying . - - the hashtable to be synchronized - - - - Creates a wrapper that synchronizes - access to the passed . - - the hashtable to be synchronized - - - - Adds an element with the provided key and value to the object. - - The to use as the value of the element to add. - The to use as the key of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. 2 - - - - Removes all elements from the object. - - The object is read-only. 2 - - - - Creates a new object that is a copy of the current instance. - - - A new object that is a copy of this instance. - - - - - Determines whether the object contains an element with the specified key. - - - true if the contains an element with the key; otherwise, false. - - The key to locate in the object. - key is null. 2 - - - - Returns, whether this contains an entry with the specified . - - The key to look for - , if this contains an entry with this - - - - Returns, whether this contains an entry with the specified . - - The valúe to look for - , if this contains an entry with this - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets or sets the element with the specified key. - - - The element with the specified key. - - The key of the element to get or set. - The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. - key is null. 2 - - - - Implements a thread-safe wrapper. - - -

- The implementation is extremely conservative, serializing critical - sections to prevent possible deadlocks, and locking on everything. The - one exception is for enumeration, which is inherently not thread-safe. - For this, you have to lock the SyncRoot object for the - duration of the enumeration. -

-
- -
- - - Constructs a thread-safe - wrapper. - - - The object that this object - will wrap. - - - If the supplied ecposes a - SyncRoot value. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the instance. - - A clone of this object. - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Simple listener that logs application events to the console. - - -

- Intended for use during debugging only. -

-
- Rod Johnson - Griffin Caprio (.NET) - -
- - - A listener for application events. - - Rod Johnson - Griffin Caprio (.NET) - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Creates a new instance of the - class. - - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle events. - - Griffin Caprio (.NET) - - - - - - - Encapsulates the data associated with an event raised by an - . - - Rod Johnson - Mark Pollack (.NET) - Griffin Caprio (.NET) - - - - - Creates a new instance of the - class. - - - - - The date and time when the event occured. - - - The date and time when the event occured. - - - - - The system time in milliseconds when the event happened. - - - The system time in milliseconds when the event happened. - - - - - Creates a new instance of the ContextEventArgs class to represent the - supplied context event. - - The type of context event. - - - - Returns a string representation of this object. - - A string representation of this object. - - - - The event type. - - - - - The various context event types. - - - - - The event type when the context is refreshed or created. - - - - - The event type when the context is closed. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Partial implementation of the - interface. - - -

- Does not mandate the type of storage used for configuration, but does - implement common functionality. Uses the Template Method design - pattern, requiring concrete subclasses to implement - methods. -

-

- In contrast to a plain vanilla - , an - is supposed - to detect special objects defined in its object factory: therefore, - this class automatically registers - s, - s - and s that are - defined as objects in the context. -

-

- An may be also supplied as - an object in the context, with the special, well-known-name of - "messageSource". Else, message resolution is delegated to the - parent context. -

-
- Rod Johnson - Juergan Hoeller - Griffin Caprio (.NET) - - -
- - - Configurable implementation of the - interface. - - -

- This implementation - supports the configuration of resource access protocols and the - corresponding .NET types that know how to handle those protocols. -

-

- Basic protocol-to-resource type mappings are also defined by this class, - while others can be added either internally, by application contexts - extending this class, or externally, by the end user configuring the - context. -

-

- Only one resource type can be defined for each protocol, but multiple - protocols can map to the same resource type (for example, the - "http" and "ftp" protocols both map to the - type. The protocols that are - mapped by default can be found in the following list. -

-

- - - assembly - - - config - - - file - - - http - - - https - - -

-
- Aleksandar Seovic - - - -
- - - Describes an object that can load - s. - - -

- An implementation is - generally required to support the functionality described by this - interface. -

-

- The class is a - standalone implementation that is usable outside an - ; the aforementioned - class is also used by the - class. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Return an handle for the - specified resource. - - -

- The handle should always be a reusable resource descriptor; this - allows one to make repeated calls to the underlying - . -

-

-

    -
  • - Must support fully qualified URLs, e.g. "file:C:/test.dat". -
  • -
  • - Should support relative file paths, e.g. "test.dat" (this will be - implementation-specific, typically provided by an - implementation). -
  • -
-

- - An handle does not imply an - existing resource; you need to check the value of an - 's - property to determine - conclusively whether or not the resource actually exists. - -
- The resource location. - - An appropriate handle. - - - - -
- - - The separator between the protocol name and the resource name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified default protocol for unqualified resources. - - - - - Returns a that has been - mapped to the protocol of the supplied . - - The name of the resource. - - A new instance for the - supplied . - - - If a - mapping does not exist for the supplied . - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - - Checks that the supplied starts - with one of the protocol names currently mapped by this - instance. - - The name of the resource. - - if the supplied - starts with one of the known - protocols; if not, or if the supplied - is itself . - - - - - Extracts the protocol name from the supplied - . - - The name of the resource. - - The extracted protocol name or if the - supplied is unqualified (or - is itself ). - - - - - The default protocol to use for unqualified resources. - - -

- The initial value is "file". -

-
-
- - - Provides the means to configure an application context in addition to - the methods exposed on the - interface. - - -

- This interface is to be implemented by most (if not all) - implementations. -

-

- Configuration and lifecycle methods are encapsulated here to avoid - making them obvious to - client code. -

-

- Calling will close this - application context, releasing all resources and locks that the - implementation might hold. This includes disposing all cached - singleton objects. -

- - does not invoke the - attendant on any parent - context. - -
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - The central interface to Spring.NET's IoC container. - - -

- implementations - provide: - - - - Object factory functionality inherited from the - - and - interfaces. - - - - - The ability to resolve messages, supporting internationalization. - Inherited from the - interface. - - - - - The ability to load file resources in a generic fashion. - Inherited from the - interface. - - - - - Acts an an event registry for supporting loosely coupled eventing - between objecs. Inherited from the - interface. - - - - - The ability to raise events related to the context lifecycle. Inherited - from the - interface. - - - - - Inheritance from a parent context. Definitions in a descendant context - will always take priority. - - - -

-

- In addition to standard object factory lifecycle capabilities, - implementations need - to detect - , - , and - objects and supply - their attendant dependencies accordingly. -

-

- This interface is the central client interface in Spring.NET's IoC - container implementation. As such it does inherit a quite sizeable - number of interfaces; implementations are strongly encouraged to use - composition to satisfy each of the inherited interfaces (where - appropriate of course). -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - -
- - - Extension of the interface - to be implemented by object factories that can enumerate all their object instances, - rather than attempting object lookup by name one by one as requested by clients. - - -

- implementations that preload - all their objects (for example, DOM-based XML factories) may implement this - interface. This interface is discussed in - "Expert One-on-One J2EE Design and Development", by Rod Johnson. -

-

- If this is an , - the return values will not take any - hierarchy into account, but - will relate only to the objects defined in the current factory. - Use the helper class to - get all objects. -

-

- With the exception of - , - the methods and properties in this interface are not designed for frequent - invocation. Implementations may be slow. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - The root interface for accessing a Spring.NET IoC container. - - - - This is the basic client view of a Spring.NET IoC container; further interfaces - such as and - - are available for specific purposes such as enumeration and configuration. - - - This is the root interface to be implemented by objects that can hold a number - of object definitions, each uniquely identified by a - name. An independent instance of any of these objects can be obtained - (the Prototype design pattern), or a single shared instance can be obtained - (a superior alternative to the Singleton design pattern, in which the instance is a - singleton in the scope of the factory). Which type of instance - will be returned depends on the object factory configuration - the API is the same. - The Singleton approach is more useful and hence more common in practice. - - - The point of this approach is that the IObjectFactory is a central registry of - application components, and centralizes the configuring of application components - (no more do individual objects need to read properties files, for example). - See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a - discussion of the benefits of this approach. - - - Normally an IObjectFactory will load object definitions stored in a configuration - source (such as an XML document), and use the - namespace to configure the objects. However, an implementation could simply return - .NET objects it creates as necessary directly in .NET code. There are no - constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties - file etc. Implementations are encouraged to support references amongst objects, - to either Singletons or Prototypes. - - - In contrast to the methods in - , all of the methods - in this interface will also check parent factories if this is an - . If an object is - not found in this factory instance, the immediate parent is asked. Objects in - this factory instance are supposed to override objects of the same name in any - parent factory. - - - Object factories are supposed to support the standard object lifecycle interfaces - as far as possible. The maximum set of initialization methods and their standard - order is: - - - - - - 's - property. - - - - - 's - property. - - - - - - (only applicable if running within an ). - - - - - The - - method of - s. - - - - - 's - method. - - - - - A custom init-method definition. - - - - - The - - method of - s. - - - - -

- - On shutdown of an object factory, the following lifecycle methods apply: - - - - - - 's - method. - - - - - A custom destroy-method definition. - - - - - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - -

- Is this object a singleton? - - - - That is, will - always return the same object? - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Does this object factory contain an object with the given name? - - - - The concrete lookup strategy depends on the implementation. E.g. s - will also search their parent factory if a name isn't found . - - - The name of the object to query. - True if an object with the given name is defined. - - - - Return the aliases for the given object name, if defined. - - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - Provides a measure of type safety by throwing an exception if the object is - not of the required . - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - Determine the type of the object with the given name. - - - - More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. - - - The name of the object to query. - - The type of the object or if not determinable. - - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - In addition to being generally useful, typically this method is used to provide - dependency injection functionality for objects that are instantiated outwith the - control of a developer. A case in point is the way that the current (1.1) - ASP.NET classes instantiate web controls... the instantiation takes place within - a private method of a compiled page, and thus cannot be hooked into the - typical Spring.NET IOC container lifecycle for dependency injection. - - - - The following code snippet assumes that the instantiated factory instance - has been configured with an object definition named - 'ExampleNamespace.BusinessObject' that has been configured to set the - Dao property of any ExampleNamespace.BusinessObject instance - to an instance of an appropriate implementation... - - namespace ExampleNamespace - { - public class BusinessObject - { - private IDao _dao; - - public BusinessObject() {} - - public IDao Dao - { - get { return _dao; } - set { _dao = value; } - } - } - } - - with the corresponding driver code looking like so... - - IObjectFactory factory = GetAnIObjectFactoryImplementation(); - BusinessObject instance = new BusinessObject(); - factory.ConfigureObject(instance, "object_definition_name"); - // at this point the dependencies for the 'instance' object will have been resolved... - - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - If there is no object definition for the supplied . - - - If any of the target object's dependencies could not be created. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - This is the indexer for the - interface. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Check if this object factory contains an object definition with the given name. - - -

- Does not consider any hierarchy this factory may participate in. -

- - Ignores any singleton objects that have been registered by other means - than object definitions. - -
- The name of the object to look for. - - if this object factory contains an object - definition with the given name. - -
- - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. - Use - to include beans in ancestor factories too. - <p>Note: Does <i>not</i> ignore singleton objects that have been registered - by other means than bean definitions. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Sub-interface implemented by object factories that can be part - of a hierarchy. - - Rod Johnson - Rick Evans (.NET) - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts, also resolving a given alias if necessary. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Return the parent object factory, or - if this factory does not have a parent. - - - The parent object factory, or - if this factory does not have a parent. - - - - - Describes an object that can resolve messages. - - -

- This enables the parameterization and internationalization of messages. -

-

- Spring.NET provides one out-of-the-box implementation for production - use: -

    -
  • .
  • -
-

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - The default message if name is not found. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - -

- This method must use the - - value to obtain a resource. -

-

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The resolved object, or if not found. - -
- - - Gets a localized resource object identified by the supplied - . - - -

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - -
- - - Applies resources to object properties. - - -

- Resource key names are of the form objectName.propertyName. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - - Encapsulates event publication functionality. - - -

- Serves as a super-interface for the - interface. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Publishes an application context event. - - - The source of the event. May be . - - - The event that is to be raised. - - - - - A registry that manages subscriptions to and the - publishing of events. - - Griffin Caprio - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - Subscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Raised in response to an application context event. - - - - - Returns the date and time this context was loaded. - - -

- This is to be set immediately after an - has been - instantiated and its configuration has been loaded. Implementations - are permitted to update this value if the context is reset or - refreshed in some way. -

-
- - The representing when this context - was loaded. - - -
- - - Gets the parent context, or if there is no - parent context. - - -

- If the parent context is , then this context - is the root of any context hierarchy. -

-
- - The parent context, or if there is no - parent. - -
- - - Gets and sets a name for this context. - - - A name for this context. - - - - - Interface defining methods for start/stop lifecycle control. - The typical use case for this is to control asynchronous processing. - - - - Can be implemented by both components (typically a Spring object defined in - a spring and containers - (typically a spring . Containers will - propagate start/stop signals to all components that apply. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Gets a value indicating whether this component is currently running. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - true if this component is running; otherwise, false. - - - - - Add an - - that will get applied to the internal object factory of this - application context on refresh, before any of the object - definitions are evaluated. - - -

- To be invoked during context configuration. -

-
- - The factory processor to register. - - -
- - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Return the internal object factory of this application context. - - -

- Can be used to access specific functionality of the factory. -

- - This is just guaranteed to return an instance that is not - after the context has been refreshed - at least once. - - - Do not use this to post-process the object factory; singletons - will already have been instantiated. Use an - - to intercept the object factory setup process before objects even - get touched. - -
- -
- - - Sets the parent of this application context. - - - - The parent should not be changed: it should only be set - outside a constructor if it isn't available when an instance of - this class is created. - - - - The parent context. - - - - - Interface for registries that hold object definitions, i.e. - - and - - instances. - - -

- Typically implemented by object factories that work with the - - hierarchy internally. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Determine whether the given object name is already in use within this registry, - i.e. whether there is a local object or alias registered under this name. - - - - - Return the names of all objects defined in this registry. - - - The names of all objects defined in this registry, or an empty array - if none defined - - - - - Check if this registry contains a object definition with the given name. - - - The name of the object to look for. - - - True if this object factory contains an object definition with the - given name. - - - - - Returns the - - for the given object name. - - - The name of the object to find a definition for. - - - The for - the given name (never null). - - - If the object definition cannot be resolved. - - - In case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Return the aliases for the given object name, if defined. - - the object name to check for aliases - - -

- Will ask the parent factory if the object cannot be found in this - factory instance. -

-
- - The aliases, or an empty array if none. - - - If there's no such object definition. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - - The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Return the number of objects defined in the registry. - - - The number of objects defined in the registry. - - - - - Name of the .Net config section that contains Spring.Net context definition. - - - - - Default name of the root context. - - - - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then message resolution - will be delegated to the parent context (if any). -

-
-
- - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then a default - will be used. -

-
-
- - - The instance for this class. - - - - - The instance we delegate - our implementation of said interface to. - - - - - The instance we - delegate our implementation of said interface to. - - - - - Creates a new instance of the - with no parent context. - - -

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

-
-
- - - Creates a new instance of the - with no parent context. - - -

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

-
- Flag specifying whether to make this context case sensitive or not. -
- - - Creates a new instance of the - with the supplied parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent application context. -
- - - Adds the given to the list of standard - processors being added to the underlying - - - Each time is called on this context, the context ensures, that - all default s are registered with the underlying . - - The instance. - - - - Closes this context and disposes of any resources (such as - singleton objects in the wrapped - ). - - - - - Subclasses must implement this method to perform the actual - configuration loading. - - -

- This method is invoked by - , - before any other initialization occurs. -

-
- - In the case of errors encountered while refreshing the object factory. - -
- - - Returns the internal object factory of the parent context if it implements - ; else, - returns the parent context itself. - - - The parent context's object factory, or the parent itself. - - - - - Raises an application context event. - - - Any arguments to the event. May be . - - - - - Raises an application context event. - - - The source of the event. - - - Any arguments to the event. May be . - - - - - Create the strategy to be used - - - - - Modify the application context's internal object factory after its standard - initialization. - - -

- All object definitions will have been loaded, but no objects - will have been instantiated yet. This allows for the registration - of special - s - in certain - implementations. -

-
- - The object factory used by the application context. - - - In the case of errors. - . -
- - - Template method which can be overridden to add context-specific - work before the underlying object factory gets refreshed. - - - - - Template method which can be overridden to add context-specific - refresh work. - - -

- Called on initialization of special objects, before instantiation - of singletons. -

-
-
- - - Template method which can be overridden to add context-specific - work after the context was refreshed but before the - event gets raised. - - - - - Instantiate and invoke all registered - - objects, respecting any explicit ordering. - - - - Must be called before singleton instantiation. - - - In the case of errors. - - - - Resets the well-known ObjectPostProcessorChecker that logs an info - message when an object is created during IObjectPostProcessor - instantiation, i.e. when an object is not eligible for being - processed by all IObjectPostProcessors. - - - - - Initializes the default event registry for this context. - - - - - Returns the internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - The internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - - - Initializes the default message source for this context. - - -

- Uses any parent context's message source if one is not available - in this context. -

-
-
- - - Add a new - that will get applied to the internal object factory of this application context - on refresh, before any of the object definitions are evaluated. - - - The factory processor to register. - - - - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Registers well-known s and - preregisters well-known dependencies using - - the raw object factory as returned from - - - - Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory - - - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Check if this object factory contains an object definition with the given name. - - The name of the object to look for. - - True if this object factory contains an object definition with the given name. - - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - - if an object with the given name is defined. - - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Is this object a singleton? - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determine the of the object with the - given name. - - The name of the object to query. - - The of the object, or - if not determinable. - - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - - - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Determine whether the given object name is already in use within this context, - i.e. whether there is a local object. May be override by subclasses, the default - implementation simply returns - - - - - Register a new object definition with this registry. - Must support - - and . - - The name of the object instance to register. - The definition of the object instance to register. - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - The name of the object. - The alias that will behave the same as the object name. - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - - Subscribes to published events of a all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Publishes an application context event. - - -

- -

-
- - The source of the event. May be . - - - The event that is to be raised. - - -
- - - An object that can be used to synchronize access to the - - - - - Set the to be used by this context. - - - - - The timestamp when this context was first loaded. - - - The timestamp (milliseconds) when this context was first loaded. - - - - - Gets a flag indicating whether context should be case sensitive. - - true if object lookups are case sensitive; otherwise, false. - - - - The for this context. - - - If the context has not been initialized yet. - - - - - The for this context. - - - If the context has not been initialized yet. - - - - - Returns the list of the - s - that will be applied to the objects created with this factory. - - -

- The elements of this list are instances of implementations of the - - interface. -

-
- - The list of the - s - that will be applied to the objects created with this factory. - -
- - - Return the internal object factory of this application context. - - - - - Gets the parent context, or if there is no - parent context. - - - The parent context, or if there is no - parent. - - - - - - Gets a value indicating whether this component is currently running. - - - true if this component is running; otherwise, false. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - - - Gets a dictionary of all singleton beans that implement the - ILifecycle interface in this context. - - A dictionary of ILifecycle objects with object name as key. - - - - Raised in response to an implementation-dependant application - context event. - - - - - The date and time this context was first loaded. - - - The representing when this context - was first loaded. - - - - - A name for this context. - - - A name for this context. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return the parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - - Allows for custom modification of new object instances, e.g. - checking for marker interfaces or wrapping them with proxies. - - -

- Application contexts can auto-detect - - objects in their object definitions and apply them before any other - objects get created. Plain object factories allow for programmatic - registration of post-processors. -

-

- Typically, post-processors that populate objects via marker interfaces - or the like will implement - , - and post-processors that wrap objects with proxies will normally implement - . -

-
- Juergen Hoeller - Aleksandar Seovic (.NET) - -
- - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Interface that can be implemented by objects that should be orderable, e.g. in an - . - - -

- The actual order can be interpreted as prioritization, the first object (with the - lowest order value) having the highest priority. -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Abstract implementation of the interface, - implementing common handling of message variants, making it easy - to implement a specific strategy for a concrete . - - -

Subclasses must implement the abstract ResolveObject - method.

-

Note: By default, message texts are only parsed through - String.Format if arguments have been passed in for the message. In case - of no arguments, message texts will be returned as-is. As a consequence, - you should only use String.Format escaping for messages with actual - arguments, and keep all other messages unescaped. -

-

Supports not only IMessageSourceResolvables as primary messages - but also resolution of message arguments that are in turn - IMessageSourceResolvables themselves. -

-

This class does not implement caching of messages per code, thus - subclasses can dynamically change messages over time. Subclasses are - encouraged to cache their messages in a modification-aware fashion, - allowing for hot deployment of updated messages. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - Harald Radi (.NET) - - - -
- - - Sub-interface of to be - implemented by objects that can resolve messages hierarchically. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - holds the logger instance shared with subclasses. - - - - - Initializes this instance. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- If the lookup is not successful throw NoSuchMessageException -
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException. -

-
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message if name is not found. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException -

-
-
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - The value object storing those attributes that are required to - properly resolve a message. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful. - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. If - the resource name resolves to null, then in .NET 1.1 the return - value will be String.Empty whereas in .NET 2.0 it will return - null. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Resolve the given code and arguments as message in the given culture, - returning null if not found. Does not fall back to the code - as default message. Invoked by GetMessage methods. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Try to retrieve the given message from the parent MessageSource, if any. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Return a fallback default message for the given code, if any. - - - Default is to return the code itself if "UseCodeAsDefaultMessage" - is activated, or return no fallback else. In case of no fallback, - the caller will usually receive a NoSuchMessageException from GetMessage - - The code to lookup up, such as 'calculator.noRateSet'. - The default message to use, or null if none. - - - - Renders the default message string. The default message is passed in as specified by the - caller and can be rendered into a fully formatted default message shown to the user. - - Default implementation passed he String for String.Format resolving any - argument placeholders found in them. Subclasses may override this method to plug - in custom processing of default messages. - - The default message. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The rendered default message (with resolved arguments) - - - - Format the given default message String resolving any - agrument placeholders found in them. - - The message to format. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The formatted message (with resolved arguments) - - - - Search through the given array of objects, find any - MessageSourceResolvable objects and resolve them. - - - Allows for messages to have MessageSourceResolvables as arguments. - - - The array of arguments for a message. - The with which the - resource is associated. - An array of arguments with any IMessageSourceResolvables resolved - - - - Gets the specified resource (e.g. Icon or Bitmap). - - The name of the resource to resolve. - - The to resolve the - code for. - - The resource if found. otherwise. - - - - Applies resources from the given name on the specified object. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Subclasses must implement this method to resolve a message. - - The code to lookup up, such as 'calculator.noRateSet'. - The with which the - resource is associated. - The resolved message from the backing store of message data. - - - - Resolves an object (typically an icon or bitmap). - - -

- Subclasses must implement this method to resolve an object. -

-
- The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - -
- - - Applies resources to object properties. - - -

- Subclasses must implement this method to apply resources - to an arbitrary object. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - Gets or Sets a value indicating whether to use the message code as - default message instead of throwing a NoSuchMessageException. - Useful for development and debugging. Default is "false". - - -

Note: In case of a IMessageSourceResolvable with multiple codes - (like a FieldError) and a MessageSource that has a parent MessageSource, - do not activate "UseCodeAsDefaultMessage" in the parent: - Else, you'll get the first code returned as message by the parent, - without attempts to check further codes.

-

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, - AbstractMessageSource contains special checks - to delegate to the internal GetMessageInternal method if available. - In general, it is recommended to just use "UseCodeAsDefaultMessage" during - development and not rely on it in production in the first place, though.

-

Alternatively, consider overriding the GetDefaultMessage - method to return a custom fallback message for an unresolvable code.

-
- - true if use the message code as default message instead of - throwing a NoSuchMessageException; otherwise, false. - -
- - - The parent message source used to try and resolve messages that - this object can't resolve. - - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - Convenient abstract superclass for - implementations that - draw their configuration from XML documents containing object - definitions as understood by an - . - - Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - class - with the given parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent context. -
- - - Instantiates and populates the underlying - with the object - definitions yielded up by the - method. - - - In the case of errors encountered while refreshing the object factory. - - - In the case of errors encountered reading any of the resources - yielded by the method. - - - - - - Initialize the object definition reader used for loading the object - definitions of this context. - - -

- The default implementation of this method is a no-op; i.e. it does - nothing. Can be overridden in subclasses to provide custom - initialization of the supplied - ; for example, a derived - class may want to turn off XML validation. -

-
- - The object definition reader used by this context. - -
- - - Load the object definitions with the given - . - - -

- The lifecycle of the object factory is handled by - ; - therefore this method is just supposed to load and / or register - object definitions. -

-
- - The reader containing object definitions. - - In case of object registration errors. - - - In the case of errors encountered reading any of the resources - yielded by either the or - the methods. - -
- - - Loads the object definitions into the given object factory, typically through - delegating to one or more object definition readers. - - The object factory to lead object definitions into - - - - - - Create a new reader instance for importing object definitions into the specified . - - the to be associated with the reader - a new instance. - - - - Customizes the internal object factory used by this context. - - Called for each attempt. -

- The default implementation is empty. Can be overriden in subclassses to customize - DefaultListableBeanFatory's standard settings. -

- The newly created object factory for this context -
- - - Create an internal object factory for this context. - - -

- Called for each attempt. - This default implementation creates a - - with the internal object factory of this context's parent serving - as the parent object factory. Can be overridden in subclasse,s - for example to customize DefaultListableBeanFactory's settings. -

-
- The object factory for this context. -
- - - Determine whether the given object name is already in use within this context's object factory, - i.e. whether there is a local object or alias registered under this name. - - - - - An array of resource locations, referring to the XML object - definition files that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of resource locations, or if none. - -
- - - An array of resources that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of s, or if none. - -
- - - Subclasses must return their internal object factory here. - - - The internal object factory for the application context. - - - - - - - implementation that passes the application context to object that - implement the - , - , and - interfaces. - - -

- If an object's class implements more than one of the - , - , and - interfaces, then the - order in which the interfaces are satisfied is as follows... - - - - - - - - - - - -

-

- Application contexts will automatically register this with their - underlying object factory. Applications should thus never need to use - this class directly. -

-
- Juergen Hoeller - Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - The that this - instance will work with. - - - - - Apply this - to the given new object instance before any object - initialization callbacks. - - - The new object instance. - - - The name of the object. - - - The 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. - - - 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. - - - - - - Convenient superclass for application objects that want to be aware of - the application context, e.g. for custom lookup of collaborating object - or for context-specific resource access. - - -

- It saves the application context reference and provides an - initialization callback method. Furthermore, it offers numerous - convenience methods for message lookup. -

-

- There is no requirement to subclass this class: it just makes things - a little easier if you need access to the context, e.g. for access to - file resources or to the message source. Note that many application - objects do not need to be aware of the application context at all, - as they can receive collaborating objects via object references. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) -
- - - To be implemented by any object that wishes to be notified - of the that it runs in. - - -

- Implementing this interface makes sense when an object requires access - to a set of collaborating objects. Note that configuration via object - references is preferable to implementing this interface just for object - lookup purposes. -

-

- This interface can also be implemented if an object needs access to - file resources, i.e. wants to call - , or access to - the . However, it is - preferable to implement the more specific - - interface to receive a reference to the - object in that scenario. -

-

- Note that dependencies can also - be exposed as object properties of the - type, populated via strings with - automatic type conversion performed by an object factory. This obviates - the need for implementing any callback interface just for the purpose - of accessing a specific file resource. -

-

- - is a convenience implementation of this interface for your - application objects. -

-

- For a list of all object lifecycle methods, see the overview for the - interface. -

-
- Rod Johnson - Mark Pollack (.NET) - - - -
- - - 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. - - -
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - The that this - object runs in. - -
- - - Intializes the wrapped - . - - -

- This is a template method that subclasses can override for custom - initialization behavior. -

-

- Gets called by the - - instance directly after setting the context instance. -

- - Does not get called on reinitialization of the context. - -
- - In the case of any initialization errors. - - - If thrown by application context methods. - -
- - - The context class that any context passed to the - - must be an instance of. - - - The - . - - - - - Return a for the - application context used by this object, for easy message access. - - - - - Gets or sets the that this - object runs in. - - - When passed an unexpected - implementation - instance that is not compatible with the - defined by the value of the - . - property. Also, thrown when trying to re-initialize with a - different than was - originally used. - - - If thrown by any application context methods. - - - - - - - Creates an instance - using context definitions supplied in a custom configuration and - configures the with that instance. - - - Implementations of the - interface must provide the following two constructors: - - - - A constructor that takes a string array of resource locations. - - - - - A constructor that takes a reference to a parent application context - and a string array of resource locations (and in that order). - - - -

- Note that if the type attribute is not present in the declaration - of a particular context, then a default - - is assumed. This default - - is currently the - ; please note the exact - of this default is an - implementation detail, that, while unlikely, may do so in the future. - to -

-
- -

- This is an example of specifying a context that reads its resources from - an embedded Spring.NET XML object configuration file... -

- - - - -
- - - - - - - - - -

- This is an example of specifying a context that reads its resources from - a custom configuration section within the same application / web - configuration file and uses case insensitive object lookups. -

-

- Please note that you must adhere to the naming - of the various sections (i.e. '<sectionGroup name="spring">' and - '<section name="context">'. -

- - - - -
-
- - - - - - - - - - - - -

- And this is an example of specifying a hierarchy of contexts. The - hierarchy in this case is only a simple parent->child hierarchy, but - hopefully it illustrates the nesting of context configurations. This - nesting of contexts can be arbitrarily deep, and is one way... child - contexts know about their parent contexts, but parent contexts do not - know how many child contexts they have (if any), or have references - to any such child contexts. -

- - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mark Pollack - Aleksandar Seovic - Rick Evans - - - - - Creates an instance - using the context definitions supplied in a custom - configuration section. - - -

- This instance is - also used to configure the . -

-
- - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - An instance - populated with the object definitions supplied in the configuration - section. - -
- - - Create all child-contexts in the given for the given context. - - The parent context to use - The current configContext - The list of child context elements - - - - Instantiates a new context. - - - - - Gets the context's name specified in the name attribute of the context element. - - The current configContext - The context element - - - - Extracts the context-type from the context element. - If none is specified, returns the parent's type. - - - - - Extracts the case-sensitivity attribute from the context element - - - - - Gets the context specified in the type - attribute of the context element. - - -

- If this attribute is not defined it defaults to the - type. -

-
- - If the context type does not implement the - interface. - -
- - - Returns the array of resources containing object definitions for - this context. - - - - - Returns the array of child contexts for this context. - - - - - The of - created if no type attribute is specified on a context element. - - - - - - Get the context's case-sensitivity to use if none is specified - - -

- Derived handlers may override this property to change their default case-sensitivity. -

-

- Defaults to 'true'. -

-
-
- - - Specifies, whether the instantiated context will be automatically registered in the - global . - - - - - Returns if the context should be lazily - initialized. - - - - - Constants defining the structure and values associated with the - schema for laying out Spring.NET contexts in XML. - - - - - Defines a single - . - - - - - Specifies a context name. - - - - - Specifies if context should be case sensitive or not. Default is true. - - - - - Specifies a . - - -

- Does not have to be fully assembly qualified, but its generally regarded - as better form if the names of one's objects - are specified explicitly. -

-
-
- - - Specifies whether context should be lazy initialized. - - - - - Defines an - - - - - Specifies the URI for an - . - - - - - Provides access to a central registry of - s. - - -

- A singleton implementation to access one or more application contexts. Application - context instances are cached. -

-

Note that the use of this class or similar is unnecessary except (sometimes) for - a small amount of glue code. Excessive usage will lead to code that is more tightly - coupled, and harder to modify or test. Consider refactoring your code to use standard - Dependency Injection techniques or implement the interface IApplicationContextAware to - obtain a reference to an application context.

-
- Mark Pollack - Aleksandar Seovic - -
- - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the ContextRegistry class. - - -

- Explicit static constructor to tell C# compiler - not to mark type as beforefieldinit. -

-
-
- - - Registers an instance of an - . - - -

- This is usually called via a - inside a .NET - application configuration file. -

-
- The application context to be registered. - - If a context has previously been registered using the same name - -
- - - Handles events raised by an application context. - - - - - - - Removes the context from the registry - - - Has no effect if the context wasn't registered - - ´the context to remove from the registry - - - - Returns the root application context. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The root application context. -
- - - Returns context based on specified name. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The context name. - The specified context, or null, if context with that name doesn't exists. - - If the context name is null or empty - -
- - - Removes all registered - s from this - registry. - - - Raises the event while still holding a lock on - - - - - Allows to check, if a context is already registered - - The context name. - true, if the context is already registered. false otherwise - - - - This event is fired, if ContextRegistry.Clear() is called.
- Clients may register to get informed -
- - This event is fired while still holding a lock on the Registry.
- 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used -
-
- - - Gets an object that should be used to synchronize access to ContextRegistry - from the calling code. - - - - - Default implementation of the - interface. - - -

- Provides easy ways to store all the necessary values needed to resolve - messages from an . -

-
- Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Describes objects that are suitable for message resolution in a - . - - -

- Spring.NET's own validation error classes implement this interface. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - -

- The last code will therefore be the default one. -

-
- - A array of codes which are associated - with this message. - -
- - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - Creates a new instance of the - class - using a single code. - - The message code to be resolved. - - - - Initializes a new instance of the class. - - The codes to be used to resolve this message - - - - Creates a new instance of the - class - using multiple codes. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - - - Creates a new instance of the - class - using multiple codes and a default message. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - The default message used if no code could be resolved. - - - - - Creates a new instance of the - class - from another resolvable. - - -

- This is the copy constructor for the - class. -

-
- - The to be copied. - - - If the supplied is . - -
- - - Returns a representation of this - . - - - A representation of this - . - - - - - Calls the visit method on the supplied - to output a version of this class. - - The visitor to use. - - A representation of this - . - - - - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - - A array of codes which are associated - with this message. - - - - - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - - Return the default code for this resolvable. - - - The default code of this resolvable; this will be the last code in - the codes array, or if this instance has no - codes. - - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - - Default section handler that can handle any configuration section. - - -

- Simply returns the configuration section as an . -

-
- Aleksandar Seovic -
- - - Returns the configuration section as an - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is a null reference. - - - The for the section. - - Config section as XmlElement. - - - - Empty implementation that - simply delegates all method calls to it's parent - . - - -

- If no parent is available, - no messages will be resolved (and a - will be thrown). -

-

- Used as placeholder by the - class, - if the context definition doesn't define its own - . Not intended for direct use - in applications. -

-
- Juergan Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - - Generic ApplicationContext implementation that holds a single internal - instance and does not - assume a specific object definition format. - - - Implements the interface in order - to allow for aplying any object definition readers to it. - Typical usage is to register a variety of object definitions via the - interface and then call - to initialize those - objects with application context semantics (handling - , auto-detecting - ObjectFactoryPostProcessors, etc). - - In contrast to other IApplicationContext implementations that create a new internal - IObjectFactory instance for each refresh, the internal IObjectFactory of this context - is available right from the start, to be able to register object definitions on it. - may only be called once - Usage examples - - GenericApplicationContext ctx = new GenericApplicationContext(); - // register your objects and object definitions - ctx.RegisterObjectDefinition(...) - ctx.Refresh(); - - - Mark Pollack - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true names in the context are case sensitive. - - - - Initializes a new instance of the class. - - The object factory instance to use for this context. - - - - Initializes a new instance of the class. - - The parent application context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - - - - Initializes a new instance of the class. - - The object factory to use for this context - The parent applicaiton context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - The object factory to use for this context - - - - Do nothing operation. We hold a single internal ObjectFactory and rely on callers - to register objects throug our public methods (or the ObjectFactory's). - - - In the case of errors encountered while refreshing the object factory. - - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - - - - Return the internal object factory of this application context. - - - - - - Gets the underlying object factory of this context, available for - registering object definitions. - - You need to call Refresh to initialize the - objects factory and its contained objects with application context - semantics (autodecting IObjectFactoryPostProcessors, etc). - The internal object factory (as DefaultListableObjectFactory). - - - - Helper class for easy access to messages from an - , providing various - overloaded GetMessage methods. - - -

- Available from - , but also - reusable as a standalone helper to delegate to in application objects. -

-
- Juergen Hoeller - Griffin Caprio (.NET) - - -
- - - Creates a new instance of the - class - that uses the current - for all locale specific lookups. - - - The to use to locate messages. - - - - - Creates a new instance of the - class - - - The to use to locate - messages. - - - The to use for - locale specific messages. - - - - - Retrieve the message for the given code and the default - . - - The code of the message. - The message. - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - The message. - - - - Retrieve the message for the given code and the default - . - - The code of the message. - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - . - - - The . - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - in the given - . - - - The . - - - The to use for - lookups. - - The message - - If the message could not be found. - - - - - Visitor class to represent - instances. - - -

- Used in the first instance to supply stringified versions of - instances. -

-

- Other methods can be added here to return different representations, - including XML, CSV, etc.. -

-
- Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - - - Outputs the supplied - as a nicely formatted . - - - The to output. - - - - - Configuration section handler for the (recommended, Spring.NET standard) parsers - config section. - - -

- Spring.NET allows the registration of custom configuration parsers that - can be used to create simplified configuration schemas that better - describe object definitions. -

-

- For example, Spring.NET uses this facility internally in order to - define simplified schemas for various AOP, Data and Services definitions. -

-
- -

- The following example shows how to configure both this section handler - and how to define custom configuration parsers within a Spring.NET - config section. -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Registers parsers specified in the (recommended, Spring.NET standard) - parsers config section with the . - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because parsers - are registered as a side-effect of this object's execution and there - is thus no need to return anything. - - - - - An that doesn't do a whole lot. - - -

- is an implementation of - the NullObject pattern. It should be used in those situations where a - needs to be passed (say to a - method) but where the resolution of messages is not required. -

-

- There should not (typically) be a need to instantiate instances of this class; - does not maintan any state - and the instance is - thus safe to pass around. -

-
- Aleksandar Seovic -
- - - The canonical instance of the - class. - - - - - Creates a new instance of the class. - - -

- Consider using - instead. -

-
-
- - - Simply returns the supplied message as-is. - - The code of the message to resolve. - - The to resolve the - code for. - - - The supplied message as-is. - - - - - Always returns . - - The code of the object to resolve. - - The to resolve the - code for. - - - (always). - - - - - Does nothing. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Handler for Spring.NET resourceHandlers config section. - - -

- Spring allows registration of custom resource handlers that can be used to load - object definitions from. -

-

- For example, if you wanted to store your object definitions in a database instead - of in the config file, you could write a custom implementation - and register it with Spring using 'db' as a protocol name. -

-

- Afterwards, you would simply specify resource URI within the context config element - using your custom resource handler. -

-
- -

- The following example shows how to configure both this section handler, - how to define custom resource within Spring config section, and how to load - object definitions using custom resource handler: -

- - - - -
- - - - - - - - - - - - - - Aleksandar Seovic - - - - - Registers resource handlers that are specified in - the resources config section with the . - - - The configuration settings in a corresponding parent - configuration section. Ignored. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns null, because resource handlers are registered - as a sideffect of its execution and there is no need to return anything. - - - - - An implementation that - accesses resources from .resx / .resource files. - - Note that for the method - GetResourceObject if the resource name resolves to null, then in - .NET 1.1 the return value will be String.Empty whereas - in .NET 2.0 it will return null. - Griffin Caprio (.NET) - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - - - - Defines a simple initialization callback for objects that need to to some - post-initialization logic after all of their dependencies have been injected. - - -

- An implementation of the - - method might perform some additional custom initialization (over and above that - performed by the constructor), or merely check that all mandatory properties - have been set (this last example is a very typical use case of this interface). -

- - The use of the - interface - by non-Spring.NET framework code can be avoided (and is generally - discouraged). The Spring.NET container provides support for a generic - initialization method given to the object definition in the object - configuration store (be it XML, or a database, etc). This requires - slightly more configuration (one attribute-value pair in the case of - XML configuration), but removes any dependency on Spring.NET from the - class definition. - -
- Rod Johnson - Rick Evans (.NET) - -
- - - 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. - -
- - - Creates a new instance of the - class. - - - - - Resolves a given code by searching through each assembly name in - the base names array. - - The code to resolve. - - The to use for lookups. - - The message from the resource set. - - - - Resolves a given code by searching through each assembly name in the array. - - The code to resolve. - - The to use for lookups. - - The object from the resource set. - - - - Uses a System.ComponentModel.ComponentResourceManager - to apply resources to object properties. - Resource key names are of the form objectName.propertyName - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - An object that contains the property values to be applied. - - - The base name of the object to use for the key lookup. - - - The to use for lookups. - If , uses the - value. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - - - Resolves a code into an object given a base name. - - The to search. - The code to resolve. - - The to use for lookups. - - The object from the resource file. - - - - Returns a representation of the - . - - A representation of the - . - - - - Invoked by an - after it has set all object properties supplied. - - -

- The list may contain objects of type or - . types - are converted to instances using the notation - resourcename, assembly partial name. -

-
- - If the conversion from a to a - can't be performed. - -
- - - The collection of s - in this . - - - - - that allows concrete registration of - objects and messages in code, rather than from external configuration sources. - - -

- Mainly useful for testing. -

-
- Rod Johnson - Griffin Caprio (.NET) -
- - - Creates a new instance of the StaticApplicationContext class. - - - - - Creates a new instance of the StaticApplicationContext class. - - The parent application context. - - - - Creates a new, named instance of the StaticApplicationContext class. - - the context name - The parent application context. - - - - Do nothing: we rely on callers to update our public methods. - - - - - Register a singleton object with the default object factory. - - The name of the object. - The of the object. - The property values for the singleton instance. - - - - Registers a prototype object with the default object factory. - - The name of the prototype object. - The of the prototype object. - The property values for the prototype instance. - - - - Associate the given message with the given code. - - The lookup code. - - The that the message should be found within. - - The message associated with the lookup code. - - - - Simple implementation of - that allows messages to be held in an object and added programmatically. - - -

- Mainly useful for testing. -

-

- This supports internationalization. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Creates a new instance of the - class. - - - - - Returns a format string. - - The code of the message to resolve. - - The to resolve the - code for. - - - A format string or if not found. - - - - - - Resolves an object (typically an icon or bitmap). - - The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - - - - - - Applies resources to object properties. - - -

- Uses a System.ComponentModel.ComponentResourceManager - internally to apply resources to object properties. Resource key - names are of the form objectName.propertyName. -

-

- This feature is not currently supported on version 1.0 of the .NET platform. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - -
- - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The message format associated with this lookup code. - - - - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The object associated with this lookup code. - - - - - Returns a representation of this - message source. - - - A containing all of this message - source's messages. - - - - - Configuration section handler for the Spring.NET typeAliases - config section. - - -

- Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

-

- This includes type names specified within an object definition, as well - as values of the properties or constructor arguments that expect - instances. -

-
- -

- The following example shows how to configure both this section handler and - how to define type aliases within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeAliases config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of this - object's execution and thus there is no need to return anything. - - - - - Configuration section handler for the Spring.NET typeConverters - config section. - - -

- Type converters are used to convert objects from one type into another - when injecting property values, evaluating expressions, performing data - binding, etc. -

-

- They are a very powerful mechanism as they allow Spring.NET to automatically - convert string-based property values from the configuration file into the appropriate - type based on the target property's type or to convert string values submitted - via a web form into a type that is used by your data model when Spring.NET data - binding is used. Because they offer such tremendous help, you should always provide - a type converter implementation for your custom types that you want to be able to use - for injected properties or for data binding. -

-

- The standard .NET mechanism for specifying type converter for a particular type is - to decorate the type with a , passing the type - of the -derived class as a parameter. -

-

- This mechanism will still work and is a preferred way of defining type converters if - you control the source code for the type that you want to define a converter for. However, - this configuration section allows you to specify converters for the types that you don't - control and it also allows you to override some of the standard type converters, such as - the ones that are defined for some of the types in the .NET Base Class Library. -

-
- -

- The following example shows how to configure both this section handler and - how to define type converters within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeConverters config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of - its execution and thus there is no need to return anything. - - - - - An implementation that - reads context definitions from XML based resources. - - -

- Currently, the resources that are supported are the file, - http, ftp, config and assembly resource - types. -

-

- You can provide custom implementations of the - interface and and register them - with any that inherits - from the - - interface. -

- - In case of multiple config locations, later object definitions will - override ones defined in previously loaded resources. This can be - leveraged to deliberately override certain object definitions via an - extra XML file. - -
- -

- Find below some examples of instantiating an - using a - variety of different XML resources. -

- - // an XmlApplicationContext that reads its object definitions from an - // XML file that has been embedded in an assembly... - IApplicationContext context = new XmlApplicationContext - ( - "assembly://AssemblyName/NameSpace/ResourceName" - ); - - // an XmlApplicationContext that reads its object definitions from a - // number of disparate XML resources... - IApplicationContext context = new XmlApplicationContext - ( - // from an XML file that has been embedded in an assembly... - "assembly://AssemblyName/NameSpace/ResourceName", - // and from a (relative) filesystem-based resource... - "file://Objects/services.xml", - // and from an App.config / Web.config resource... - "config://spring/objects" - ); - -
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - -
- - - Initializes a new instance of the XmlApplicationContext class. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The created context will be case sensitive. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - This constructor is meant to be used by derived classes. By passing =false, it is - the responsibility of the deriving class to call to initialize the context instance. - - if true, is called automatically. - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - An array of resource locations, referring to the XML object - definition files with which this context is to be built. - - - An array of resource locations, or if none. - - - - - - An array of resources instances with which this context is to be built. - - - An array of s, or if none. - - - - - - Encapsulates arguments to the class. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - - - - Initializes a new instance of the XmlApplicationContextArgs class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - if set to true [case sensitive]. - if set to true [refresh]. - - - Exception thrown during application context initialization. - Rod Johnson - Mark Pollack (.NET) - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Marks an interface as being an application event listener. - - Griffin Caprio - - - - - Creates a new instance of the - class. - - - - - The callback for application events. - - - - - To be implemented by any object that wishes to be notified - of the associated with it. - - -

- In the current implementation, the - will typically be the - associated that - spawned the implementing object. -

-

- The can usually also be - passed on as an object reference to arbitrary object properties or - constructor arguments, because a - is typically defined as an - object with the well known name "messageSource" in the - associated application context. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Sets the associated - with this object. - - -

- Invoked after population of normal object properties but - before an initializing callback such as the - - method of the - interface - or a custom init-method. -

-

- It is also invoked before the - - property of any - - implementation. -

-
- - The associated - with this object. - -
- - - Interface to be implemented by any object that wishes to be notified - of the (typically the - ) that it runs in. - - -

- Note that dependencies can also - be exposed as object properties of type - , populated via strings with - automatic type conversion by the object factory. This obviates the - need for implementing any callback interface just for the purpose of - accessing a specific resource. -

-

- You typically need an - when your application object has to access a variety of file resources - whose names are calculated. A good strategy is to make the object use - a default resource loader but still implement the - interface to allow - for overriding when running in an - . -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Sets the - that this object runs in. - - -

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

-
-
- - - Thrown when a message cannot be resolved. - - Rod Johnson - Mark Pollack (.NET) - - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class with the - specified message. - - - 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. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for given culture. - - - The that was used - to search for the code. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for the current UI culture. - - - - - Convenience base class for - implementations, pre-implementing typical behavior. - - -

- The method will - check whether a or - can be opened; - will always return - ; - and - throw an exception; - and will - return the value of the - property. -

-
- Juergen Hoeller - Rick Evans (.NET) - Aleksandar Seovic (.NET) - -
- - - The central abstraction for Spring.NET's access to resources such as - s. - - -

- This interface encapsulates a resource descriptor that abstracts away - from the underlying type of resource; possible resource types include - files, memory streams, and databases (this list is not exhaustive). -

-

- A can definitely be opened and accessed - for every such resource; if the resource exists in a physical form (for - example, the resource is not an in-memory stream or one that has been - extracted from an assembly or ZIP file), a or - can also be accessed. The actual - behavior is implementation-specific. -

-

- This interface, when used in tandem with the - interface, forms the backbone of - Spring.NET's resource handling. Third party extensions or libraries - that want to integrate external resources with Spring.NET's IoC - container are encouraged expose such resources via this abstraction. -

-

- Interfaces cannot obviously mandate implementation, but derived classes - are strongly encouraged to expose a constructor that takes a - single as it's sole argument (see example). - Exposing such a constructor will make your custom - implementation integrate nicely - with the class. -

-
- Juergen Hoeller - Rick Evans (.NET) - - -
- - - Simple interface for objects that are sources for - s. - - -

- This is the base interface for the abstraction encapsulated by - Spring.NET's interface. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Return an for this resource. - - - - Clients of this interface must be aware that every access of this - property will create a fresh ; - it is the responsibility of the calling code to close any such - . - - - - An . - - - If the stream could not be opened. - - - - - Creates a resource relative to this resource. - - - The path (always resolved as relative to this resource). - - - The relative resource. - - - If the relative resource could not be created from the supplied - path. - - - If the resource does not support the notion of a relative path. - - - - - Does this resource represent a handle with an open stream? - - -

- If , the - cannot be read multiple times, and must be read and then closed to - avoid resource leaks. -

-

- Will be for all usual resource descriptors. -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - -
- - - Returns a handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available on a filesystem, or cannot be - exposed as a handle. - - - -
- - - Returns a description for this resource. - - -

- The description is typically used for diagnostics and other such - logging when working with the resource. -

-

- Implementations are also encouraged to return this value from their - method. -

-
- - A description for this resource. - -
- - - Does this resource actually exist in physical form? - - -

- An example of a resource that physically exists would be a - file on a local filesystem. An example of a resource that does not - physically exist would be an in-memory stream. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - The default special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - A string representation of the resource. - - - If the supplied is - or contains only whitespace character(s). - -
- - - Strips any protocol name from the supplied - . - - -

- If the supplied does not - have any protocol associated with it, then the supplied - will be returned as-is. -

-
- - - GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); - // returns www.mycompany.com/resource.txt - - - - The name of the resource. - - - The name of the resource without the protocol name. - -
- - - Resolves the supplied to its value - sans any leading protocol. - - - The name of the resource. - - - The name of the resource without the protocol name. - - - - - - Resolves the presence of the - value - in the supplied into a path. - - -

- The default implementation simply returns the supplied - as is. -

-
- - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - -
- - - This implementation returns the - of this resource. - - - - - - Determines whether the specified is - equal to the current . - - -

- This implementation compares values. -

-
- -
- - - Serves as a hash function for a particular type, suitable for use - in hashing algorithms and data structures like a hash table. - - -

- This implementation returns the hashcode of the - property. -

-
- -
- - - Factory Method. Create a new instance of the current resource type using the given resourceName - - - - - The ResourceLoader to be used for resolving relative resources - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Creates a new resource that is relative to this resource based on the - supplied . - - -

- This method can accept either a fully qualified resource name or a - relative resource name as it's parameter. -

-

- A fully qualified resource is one that has a protocol prefix and - all elements of the resource name. All other resources are treated - as relative to this resource, and the following rules are used to - locate a relative resource: -

- - - If the starts with '..', - the current resource path is navigated backwards before the - is concatenated to the current - of - this resource. - - - If the starts with '/', the - current resource path is ignored and a new resource name is - appended to the - of - this resource. - - - If the starts with '.' or a - letter, a new path is appended to the current - of - this resource. - - -
- - The name of the resource to create. - - The relative resource. - - If the process of resolving the relative resource yielded an - invalid URI. - - - If this resource does not support the resolution of relative - resources (as determined by the value of the - - property). - - -
- - - Calculates a new resource path based on the supplied - . - - - The relative path to evaluate. - - The newly calculated resource path. - - - - The special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
- -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the protocol associated with this resource (if any). - - -

- The value of this property may be if no - protocol is associated with the resource type (for example if the - resource is a memory stream). -

-
- - The protocol associated with this resource (if any). - -
- - - Does this resource represent a handle with an open stream? - - -

- This, the default implementation, always returns - . -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - - - - - Returns a handle for this resource. - - -

- This, the default implementation, always throws a - , assuming that the - resource cannot be resolved to an absolute file path. -

-
- - The handle for this resource. - - - This implementation always throws a - . - - - -
- - - Does this resource actually exist in physical form? - - -

- This implementation checks whether a - can be opened, falling back to whether a - can be opened. -

-

- This will cover both directories and content resources. -

-

- This implementation will also return if - permission to the (file's) path is denied. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - Does this support relative - resource retrieval? - - -

- This property is generally to be consulted prior to attempting - to attempting to access a resource that is relative to this - resource (via a call to - ). -

-

- This, the default implementation, always returns - . -

-
- - if this - supports relative resource - retrieval. - -
- - - Gets the root location of the resource. - - -

- Where root resource can be taken to mean that part of the resource - descriptor that doesn't change when a relative resource is looked - up. Examples of such a root location would include a drive letter, - a web server name, an assembly name, etc. -

-
- - The root location of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets the current path of the resource. - - -

- An example value of this property would be the name of the - directory containing a filesystem based resource. -

-
- - The current path of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets those characters that are valid path separators for the - resource type. - - -

- An example value of this property would be the - and - values for a - filesystem based resource. -

-

- Any derived classes that override this method are expected to - return a new array for each access of this property. -

-
- - Those characters that are valid path separators for the resource - type. - - - This, the default implementation, always throws a - . - -
- - - An implementation for - resources stored within assemblies. - - -

- This implementation expects any resource name passed to the - constructor to adhere to the following format: -

-

- assembly://assemblyName/namespace/resourceName -

-
- Aleksandar Seovic (.NET) - Federico Spinazzi (.NET) -
- - - Creates a new instance of the - class. - - - The name of the assembly resource. - - - If the supplied did not conform - to the expected format. - - - If the assembly specified in the supplied - was loaded twice with two - different evidences. - - - If the assembly specified in the supplied - could not be found. - - - If the caller does not have the required permission to load - the assembly specified in the supplied - . - - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the caller does not have the required permission to load - the underlying assembly's manifest. - - - - - - - Does the embedded resource specified in the value passed to the - constructor exist? - - - if this resource actually exists in physical - form (for example on a filesystem). - - - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (the assembly name in this - case). - - - The root location of the resource. - - - - - - Gets the current path of the resource (the namespace in which the - target resource was embedded in this case). - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - - - - Used when retrieving information from the standard .NET configuration - files (App.config / Web.config). - - -

- If created with the name of a configuration section, then all methods - aside from the description return , - , or throw an exception. If created with an - , then the - property - will return a corresponding to parse. -

-
- Mark Pollack - Rick Evans -
- - - Creates new instance of the - class. - - - The actual XML configuration section. - - - If the supplied is . - - - - - Creates new instance of the - class. - - - The name of the configuration section. - - - If the supplied is - or contains only whitespace character(s). - - - - - Returns the handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a description for this resource (the name of the - configuration section in this case). - - - A description for this resource. - - - - - - Does this resource actually exist in physical form? - - -

- This implementation always returns . -

-
- - - - - -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Exposes the actual for the - configuration section. - - -

- Introduced to accomodate line info tracking during parsing. -

-
-
- - - Holder that combines with a specific encoding to be used for reading - from the resource - - Juergen Hoeller - Erich Eichinger (.NET) - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - the resource to read from. Must not be null - whether to autoDetect encoding from byte-order marks () - - - - Create an encoded resource using the specified encoding. - - the resource to read from. Must not be null - the encoding to use. If null, encoding will be autodetected. - whether to autoDetect encoding from byte-order marks () - - - - - - - - - - Determine whether equals this instance. - - - true if obj is an and both - , and are equal. - - - - - Calculate the unique hash code for this instance. - - - - - - Get a textual description of the resource. - - - - - Get the underlying resource - - - - - Get the encoding to use for reading, if any. May be null - - - - - whether to autoDetect encoding from byte-order marks () - - - - - A backed resource. - - -

- Supports resolution as both a and a - . -

-

- Also supports the use of the ~ character. If the ~ character - is the first character in a resource path (sans protocol), the ~ - character will be replaced with the value of the - System.AppDomain.CurrentDomain.BaseDirectory property (an example of - this can be seen in the examples below). -

-
- -

- Consider the example of an application that is running (has been launched - from) the C:\App\ directory. The following resource paths will map - to the following resources on the filesystem... -

- - strings.txt C:\App\strings.txt - ~/strings.txt C:\App\strings.txt - file://~/strings.txt C:\App\strings.txt - file://~/../strings.txt C:\strings.txt - ../strings.txt C:\strings.txt - ~/../strings.txt C:\strings.txt - - // note that only a leading ~ character is resolved to the executing directory... - stri~ngs.txt C:\App\stri~ngs.txt - -
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - If the supplied is - or contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - Supresses initialization of this instance. Used from derived classes. - - - If the supplied is - or contains only whitespace character(s). - - - - - Initializes this instance. - - - - - - Resolves the handle - for the supplied . - - - The name of the file system resource. - - - The handle for this resource. - - - - - Resolves the root location for the supplied . - - - The name of the file system resource. - - - The root location of the resource. - - - - - Resolves the path for the supplied . - - - The name of the file system resource. - - - The current path of the resource. - - - - - Resolves the presence of the - value - in the supplied into a path. - - - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the underlying handle for - this resource. - - - The handle for this resource. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (a drive or UNC file share - name in this case). - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the underlying file could not be found. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - adapter implementation for a - . - - -

- Should only be used if no other - implementation is applicable. -

-

- In contrast to other - implementations, this is an adapter for an already opened - resource - the - therefore always returns . Do not use this class - if you need to keep the resource descriptor somewhere, or if you need - to read a stream multiple times. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The input to use. - - - Where the input comes from. - - - If the supplied is - . - - - - - The input to use. - - - If the underlying has already - been read. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Custom type converter for instances. - - -

- A resource path may contain placeholder variables of the form ${...} - that will be expended to environment variables. -

-

- Currently only supports conversion from a - instance. -

-
- -

- On Win9x boxes, this resource path, ${userprofile}\objects.xml will - be expanded at runtime with the value of the 'userprofile' environment - variable substituted for the '${userprofile}' portion of the path. -

- - // assuming a user called Rick, running on a plain vanilla Windows XP setup... - // this resource path... - - ${userprofile}\objects.xml - - // will become (after expansion)... - - C:\Documents and Settings\Rick\objects.xml - -
- Mark Pollack - - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified resourceLoader. - - the underlying IResourceLoader to be used to resolve resources - - - - Returns whether this converter can convert an object of one - to a - - - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - - - - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An if successful. - - - If the resource name objectained form the supplied - is malformed. - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - Resolve the given path, replacing placeholder values with - corresponding property values if necessary. - - -

- This implementation resolves environment variables only. -

-
- The original resource path. - The resolved resource path. -
- - - Return the used to - resolve the string. - - - The used to resolve - the string. - - - - - Registry class that allows users to register and retrieve protocol handlers. - - - - Resource handler is an implementation of interface - that should be used to process resources with the specified protocol. - - - They are used throughout the framework to access resources from various - sources. For example, application context loads object definitions from the resources - that are processed using one of the registered resource handlers. - - Following resource handlers are registered by default: - - - Protocol - Handler Type - Description - - - config - - Resolves the resources by loading specified configuration section from the standard .NET config file. - - - file - - Resolves filesystem resources. - - - http - - Resolves remote web resources. - - - https - - Resolves remote web resources via HTTPS. - - - ftp - - Resolves ftp resources. - - - assembly - - Resolves resources that are embedded into an assembly. - - - web - Spring.Core.IO.WebResource, Spring.Web* - Resolves resources relative to the web application's virtual directory. - - - * only available in web applications. - - Users can create and register their own protocol handlers by implementing interface - and mapping custom protocol name to that implementation. See for details - on how to register custom protocol handler. - - - Aleksandar Seovic - - - - Name of the .Net config section that contains definitions - for custom resource handlers. - - - - - Registers standard and user-configured resource handlers. - - - - - Returns resource handler for the specified protocol name. - - - - This method returns object that should be used - to create an instance of the -derived type by passing - resource location as a parameter. - - - Name of the protocol to get the handler for. - Resource handler constructor for the specified protocol name. - If is null. - - - - Returns true if a handler is registered for the specified protocol, - false otherwise. - - Name of the protocol. - - true if a handler is registered for the specified protocol, false otherwise. - - If is null. - - - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The type name of the concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Allows to create any arbitrary Url format - - - - - A adapter implementation encapsulating a simple string. - - Erich Eichinger - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Get the to - for accessing this resource. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Gets the encoding used to create a byte stream of the string. - - - - - Gets the content encapsulated by this . - - - - - A backed resource - on top of - - -

- Obviously supports resolution as a , and also - as a in the case of the "file:" - protocol. -

-
- -

- Some examples of the strings that can be used to initialize a new - instance of the class - include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) - - - -
- - - Creates a new instance of the - class. - - -

- Some examples of the values that the - can typically be expected to hold include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- - A string representation of the resource. - -
- - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the instance - used for the resource resolution. - - - A instance. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - Returns a handle for this resource. - - - The handle for this resource. - - - If the resource is not available on a filesystem. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource. - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Converts string representation of a credential for Web client authentication - into an instance of . - - -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. -

- - - - - - -
- Bruno Baia -
- - - Can we convert from the sourcetype - to a instance ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A instance if successful. - - - - - A custom for any - primitive numeric type such as , - , , etc. - - -

- Can use a given for - (locale-specific) parsing and rendering. -

-

- This is not meant to be used as a system - but rather as a - locale-specific number converter within custom controller code, to - parse user-entered number strings into number properties of objects, - and render them in a UI form. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The primitive numeric to convert to. - - - The to use for - (locale-specific) parsing and rendering - - - Is an empty string allowed to be converted? If - , an empty string value will be converted to - numeric 0. - - Id the supplied is not a primitive - . - - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - -
- - - Converts the specified object (a string) to the required primitive - type. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - A primitive representation of the string value. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Custom implementation for - objects. - - -

- Handles conversion from an XML formatted string to a - object - (see below for an example of the expected XML format). -

-

- This converter must be registered before it will be available. Standard - converters in this namespace are automatically registered by the - class. -

-
- -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. Note that the name of the top level - (document) element is quite arbitrary... it is only the content that - matters (and which must be in the format - <add key="..." value="..."/>. For your continued sanity - though, you may wish to standardize on the top level name of - 'dictionary' (although you are of course free to not do so). -

- - - - - - -

- The following example uses a different top level (document) element - name, but is equivalent to the first example. -

- - - - - - -
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from an - XML formatted instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - - - - Converts string representation of a regular expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts string representation of the registry key - into instance. - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Generates partial registry key name. - - - Key elements. - - - Index of the last element to use. - - - Friendly key name containing key element from - 0 to , inclusive. - - - - - Returns for the specified - root hive name. - - - Root hive name. - - - Registry key for the specified name. - - - - - Converts a two part string, (resource name, assembly name) - to a ResourceManager instance. - - - - - This constant represents the name of the folder/assembly containing global resources. - - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - If the specified does not denote a valid resource - - - - Converter for from a comma separated - list of RBG values. - - -

- Please note that this class does not implement converting - to a comma separated list of RBG values from a - . -

-
- Federico Spinazzi -
- - - Returns whether this converter can convert an object of one - to a - . - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Converts the specified object (a string) a - instance. - - - A - that provides a format context. - - - The to use - as the current culture: currently ignored. - - - The value that is to be converted, in "R,G,B", "A,R,G,B", or - symbolic color name (). - - - A representation of the string value. - - - If the input string is not in a supported format, or is not one of the - predefined system colors (). - - - - - A custom for - runtime type references. - - -

- Currently only supports conversion to and from a - . -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to the - of this converter. - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Returns whether this converter can convert the object to the specified - . - - - A - that provides a format context. - - - A that represents the - you want to convert to. - - True if the conversion is possible. - - - - Converts the given value to the type of this converter. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An that represents the converted value. - - - - - Converts the given value object to the specified type, - using the specified context and culture information. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - The to convert the - parameter to. - - - An that represents the converted value. - - - - - Converter for to directly set a - property. - - Jurgen Hoeller - Mark Pollack (.NET) - - - - Create a new StreamConverter using the default - . - - - - - Create a new StreamConverter using the given - . - - - The to use. - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts a separated to a - array. - - -

- Defaults to using the , (comma) as the list separator. Note that the value - of the current is - not used. -

-

- If you want to provide your own list separator, you can set the value of the - - property to the value that you want. Please note that this value will be used - for all future conversions in preference to the default list separator. -

-

- Please note that the individual elements of a string will be passed - through as is (i.e. no conversion or trimming of surrounding - whitespace will be performed). -

-

- This should be - automatically registered with any - implementations. -

-
- - - public class StringArrayConverterExample - { - public static void Main() - { - StringArrayConverter converter = new StringArrayConverter(); - - string csvWords = "This,Is,It"; - string[] frankBoothWords = converter.ConvertFrom(csvWords); - - // the 'frankBoothWords' array will have 3 elements, namely - // "This", "Is", "It". - - // please note that extraneous whitespace is NOT trimmed off - // in the current implementation... - string csv = " Cogito ,ergo ,sum "; - string[] descartesWords = converter.ConvertFrom(csv); - - // the 'descartesWords' array will have 3 elements, namely - // " Cogito ", "ergo ", "sum ". - // notice how the whitespace has NOT been trimmed. - } - } - - - -
- - - Can we convert from a the sourcetype to a array? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to a - array. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - The value that will be used as the list separator when performing - conversions. - - - A 'single' string character that will be used as the list separator - when performing conversions. - - - If the supplied value is not and is an empty - string, or has more than one character. - - - - - Base parser for custom specifiers. - - - - - Convert int value to a Timespan based on the specifier - - - - - - - Check if the string contains the specifier and - - - - - - - Specifier - - - - - Recognize 10d as ten days - - - - - Parse value as days - - Timespan in days - - - - - Day specifier: d - - - - - Recognize 10h as ten hours - - - - - Parse value as hours - - Timespan in hours - - - - - Hour specifier: h - - - - - Recognize 10m as ten minutes - - - - - Parse value as minutes - - Timespan in minutes - - - - - Minute specifier: m - - - - - Recognize 10s as ten seconds - - - - - Parse value as seconds - - Timespan in seconds - - - - - Second specifier: s - - - - - Recognize 10ms as ten milliseconds - - - - - Parse value as milliseconds - - Timespan in milliseconds - - - - - Millisecond specifier: ms - - - - - Converter for instances. - - Bruno Baia - Roberto Paterlini - - - - Creates a new instance of the - class. - - - - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Utility methods that are used to convert objects from one type into another. - - Aleksandar Seovic - - - - Convert the value to the required (if necessary from a string). - - The proposed change value. - - The we must convert to. - - Property name, used for error reporting purposes... - - If there is an internal error. - - The new value, possibly the result of type conversion. - - - - Utility method to create a property change event. - - - The full name of the property that has changed. - - The property old value - The property new value - - A new . - - - - - Determines if a Type implements a specific generic interface. - - Candidate to evaluate. - The to test for in the Candidate . - if a match, else - - - - Registry class that allows users to register and retrieve type converters. - - Aleksandar Seovic - - - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - Registers standard and configured type converters. - - - - - Returns for the specified type. - - Type to get the converter for. - a type converter for the specified type. - If is null. - - - - Registers for the specified type. - - Type to register the converter for. - Type converter to register. - If either of arguments is null. - - - - Registers for the specified type. - - - This is a convinience method that accepts the names of both - type to register converter for and the converter itself, - resolves them using , creates an - instance of type converter and calls overloaded - method. - - Type name of the type to register the converter for (can be a type alias). - Type name of the type converter to register (can be a type alias). - If either of arguments is null or empty string. - - If either of arguments fails to resolve to a valid . - - - If type converter does not derive from or if it cannot be instantiated. - - - - - Converts between instances of and their string representations. - - Erich Eichinger - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A that provides a format context. - - - A that represents the you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful, otherwise. - - The conversion cannot be performed. - - - - Returns whether this converter can convert the object to the specified type, using the specified context. - - An that provides a format context. - A that represents the type you want to convert to. - - true if this converter can perform the conversion; otherwise, false. - - - At the moment only conversion to string is supported. - - - - - Converts the given value object to the specified type, using the specified context and culture information. - - - - An that represents the converted value. - - - A . If null is passed, the current culture is assumed. - An that provides a format context. - The to convert the value parameter to. - The to convert. - The conversion cannot be performed. - The destinationType parameter is null. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Resolves (instantiates) a by it's (possibly - assembly qualified) name, and caches the - instance against the type name. - - Rick Evans - Bruno Baia - Erich Eichinger - - - - Resolves a by name. - - -

- The rationale behind the creation of this interface is to centralise - the resolution of type names to instances - beyond that offered by the plain vanilla - method call. -

-
- Rick Evans -
- - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - The cache, mapping type names ( instances) against - instances. - - - - - Creates a new instance of the class. - - - The that this instance will delegate - actual resolution to if a - cannot be found in this instance's cache. - - - If the supplied is . - - - - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holder for the generic arguments when using type parameters. - - -

- Type parameters can be applied to classes, interfaces, - structures, methods, delegates, etc... -

-
-
- - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The character that separates a list of generic arguments. - - - - - Creates a new instance of the GenericArgumentsHolder class. - - - The string value to parse looking for a generic definition - and retrieving its generic arguments. - - - - - Returns the array declaration portion of the definition, e.g. "[,]" - - - - - - Returns an array of unresolved generic arguments types. - - -

- A empty string represents a type parameter that - did not have been substituted by a specific type. -

-
- - An array of strings that represents the unresolved generic - arguments types or an empty array if not generic. - -
- - - The (unresolved) generic type name portion - of the original value when parsing a generic type. - - - - - The (unresolved) generic method name portion - of the original value when parsing a generic method. - - - - - Is the string value contains generic arguments ? - - -

- A generic argument can be a type parameter or a type argument. -

-
-
- - - Is generic arguments only contains type parameters ? - - - - - Is this an array type definition? - - - - - Resolves a generic by name. - - Bruno Baia - - - - Resolves a by name. - - Rick Evans - Aleksandar Seovic - Bruno Baia - - - - Resolves the supplied to a - instance. - - - The unresolved (possibly partially assembly qualified) name - of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Uses - to load an and then the attendant - referred to by the - parameter. - - -

- is - deprecated in .NET 2.0, but is still used here (even when this class is - compiled for .NET 2.0); - will - still resolve (non-.NET Framework) local assemblies when given only the - display name of an assembly (the behaviour for .NET Framework assemblies - and strongly named assemblies is documented in the docs for the - method). -

-
- - The assembly and type to be loaded. - - - A , or . - - - - -
- - - Uses - to load the attendant referred to by - the parameter. - - - The type to be loaded. - - - A , or . - - - - - Creates a new instance - from the given - - - - - Creates a new instance - from the given with the given inner - - - - - Resolves the supplied generic to a - instance. - - - The unresolved (possibly generic) name of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holds data about a and it's - attendant . - - - - - The string that separates a name - from the name of it's attendant - in an assembly qualified type name. - - - - - Creates a new instance of the TypeAssemblyHolder class. - - - The unresolved name of a . - - - - - The (unresolved) type name portion of the original type name. - - - - - The (unresolved, possibly partial) name of the attandant assembly. - - - - - Is the type name being resolved assembly qualified? - - - - - Provides access to a central registry of aliased s. - - -

- Simplifies configuration by allowing aliases to be used instead of - fully qualified type names. -

-

- Comes 'pre-loaded' with a number of convenience alias' for the more - common types; an example would be the 'int' (or 'Integer' - for Visual Basic.NET developers) alias for the - type. -

-
- Aleksandar Seovic - -
- - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - The alias around the 'int' type. - - - - - The alias around the 'Integer' type (Visual Basic.NET style). - - - - - The alias around the 'int[]' array type. - - - - - The alias around the 'Integer()' array type (Visual Basic.NET style). - - - - - The alias around the 'decimal' type. - - - - - The alias around the 'Decimal' type (Visual Basic.NET style). - - - - - The alias around the 'decimal[]' array type. - - - - - The alias around the 'Decimal()' array type (Visual Basic.NET style). - - - - - The alias around the 'char' type. - - - - - The alias around the 'Char' type (Visual Basic.NET style). - - - - - The alias around the 'char[]' array type. - - - - - The alias around the 'Char()' array type (Visual Basic.NET style). - - - - - The alias around the 'long' type. - - - - - The alias around the 'Long' type (Visual Basic.NET style). - - - - - The alias around the 'long[]' array type. - - - - - The alias around the 'Long()' array type (Visual Basic.NET style). - - - - - The alias around the 'short' type. - - - - - The alias around the 'Short' type (Visual Basic.NET style). - - - - - The alias around the 'short[]' array type. - - - - - The alias around the 'Short()' array type (Visual Basic.NET style). - - - - - The alias around the 'unsigned int' type. - - - - - The alias around the 'unsigned long' type. - - - - - The alias around the 'ulong[]' array type. - - - - - The alias around the 'uint[]' array type. - - - - - The alias around the 'unsigned short' type. - - - - - The alias around the 'ushort[]' array type. - - - - - The alias around the 'double' type. - - - - - The alias around the 'Double' type (Visual Basic.NET style). - - - - - The alias around the 'double[]' array type. - - - - - The alias around the 'Double()' array type (Visual Basic.NET style). - - - - - The alias around the 'float' type. - - - - - The alias around the 'Single' type (Visual Basic.NET style). - - - - - The alias around the 'float[]' array type. - - - - - The alias around the 'Single()' array type (Visual Basic.NET style). - - - - - The alias around the 'DateTime' type. - - - - - The alias around the 'DateTime' type (C# style). - - - - - The alias around the 'DateTime' type (Visual Basic.NET style). - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime()' array type (Visual Basic.NET style). - - - - - The alias around the 'bool' type. - - - - - The alias around the 'Boolean' type (Visual Basic.NET style). - - - - - The alias around the 'bool[]' array type. - - - - - The alias around the 'Boolean()' array type (Visual Basic.NET style). - - - - - The alias around the 'string' type. - - - - - The alias around the 'string' type (Visual Basic.NET style). - - - - - The alias around the 'string[]' array type. - - - - - The alias around the 'string[]' array type (Visual Basic.NET style). - - - - - The alias around the 'object' type. - - - - - The alias around the 'object' type (Visual Basic.NET style). - - - - - The alias around the 'object[]' array type. - - - - - The alias around the 'object[]' array type (Visual Basic.NET style). - - - - - The alias around the 'int?' type. - - - - - The alias around the 'int?[]' array type. - - - - - The alias around the 'decimal?' type. - - - - - The alias around the 'decimal?[]' array type. - - - - - The alias around the 'char?' type. - - - - - The alias around the 'char?[]' array type. - - - - - The alias around the 'long?' type. - - - - - The alias around the 'long?[]' array type. - - - - - The alias around the 'short?' type. - - - - - The alias around the 'short?[]' array type. - - - - - The alias around the 'unsigned int?' type. - - - - - The alias around the 'unsigned long?' type. - - - - - The alias around the 'ulong?[]' array type. - - - - - The alias around the 'uint?[]' array type. - - - - - The alias around the 'unsigned short?' type. - - - - - The alias around the 'ushort?[]' array type. - - - - - The alias around the 'double?' type. - - - - - The alias around the 'double?[]' array type. - - - - - The alias around the 'float?' type. - - - - - The alias around the 'float?[]' array type. - - - - - The alias around the 'bool?' type. - - - - - The alias around the 'bool?[]' array type. - - - - - Registers standard and user-configured type aliases. - - - - - Registers an alias for the specified . - - -

- This overload does eager resolution of the - referred to by the parameter. It will throw a - if the referred - to by the parameter cannot be resolved. -

-
- - A string that will be used as an alias for the specified - . - - - The (possibly partially assembly qualified) name of the - to register the alias for. - - - If either of the supplied parameters is or - contains only whitespace character(s). - - - If the referred to by the supplied - cannot be loaded. - -
- - - Registers short type name as an alias for - the supplied . - - - The to register. - - - If the supplied is . - - - - - Registers an alias for the supplied . - - - The alias for the supplied . - - - The to register the supplied under. - - - If the supplied is ; or if - the supplied is or - contains only whitespace character(s). - - - - - Resolves the supplied to a . - - - The alias to resolve. - - - The the supplied was - associated with, or if no - was previously registered for the supplied . - - - If the supplied is or - contains only whitespace character(s). - - - - - Returns a flag specifying whether TypeRegistry contains - specified alias or not. - - - Alias to check. - - - true if the specified type alias is registered, - false otherwise. - - - - - Helper methods with regard to type resolution. - - -

- Not intended to be used directly by applications. -

-
- Bruno Baia -
- - - Creates a new instance of the class. - - -

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

-
-
- - - Resolves the supplied type name into a - instance. - - -

- If you require special resolution, do - not use this method, but rather instantiate - your own . -

-
- - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the type cannot be resolved. - -
- - - Resolves a string array of interface names to - a array. - - - An array of valid interface names. Each name must include the full - interface and assembly name. - - An array of interface s. - - If any of the interfaces can't be loaded. - - - If any of the s specified is not an interface. - - - If (or any of its elements ) is - . - - - - - Match a method against the given pattern. - - the pattern to match against. - the method to match. - - if the method matches the given pattern; otherwise . - - - If the supplied is invalid. - - - - - Exception thrown when the ObjectFactory cannot load the specified type of a given object. - - Mark Pollack - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Initializes 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. - - - - - Initializes a new instance of the class. - - The resource description that the object definition came from. - Name of the object requested - Name of the object type. - The root cause. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Gets he name of the object we are trying to load. - - The name of the object. - - - - Gets the name of the object type we are trying to load. - - The name of the object type. - - - - Gets the resource description that the object definition came from - - The resource description. - - - - A implementation that represents - a composed collection of instances. - - - - - The criteria for an arbitrary filter. - - Rick Evans - - - - Does the supplied satisfy the criteria - encapsulated by this instance? - - - The datum to be checked by this criteria instance. - - - if the supplied - satisfies the criteria encapsulated by this instance; - if not, or the supplied - is . - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A user-defined (child) criteria that will be composed into this instance. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The data to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Adds the supplied into the criteria - composed within this instance. - - - The to be added. - - - - - The list of composing this - instance. - - - - - Factory class to conceal any default implementation. - - Rod Johnson - Simon White (.NET) - - - - Creates a new instance of the - implementation provided by this factory. - - - A new instance of the - implementation provided by this factory. - - - - - Interface to be implemented by objects that can return information about - the current call stack. - - -

- Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - The to look for. - - - if the caller is under the supplied . - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - - The to look for. - - The name of the method to look for. - - if the caller is under the supplied - and . - - - - - Does the current stack trace contain the supplied ? - - The token to match against. - - if the current stack trace contains the supplied - . - - - - - Creates a new instance of the - class. - - - - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - -

- Matches the whole method name. -

-
- -
- - - Does the current stack trace contain the supplied ? - - -

- This leaves it up to the caller to decide what matches, but is obviously less of - an abstraction because the caller must know the exact format of the underlying - stack trace. -

-
- -
- - - Provides methods to support various naming and other conventions used throughout the framework. - Mainly for internal use within the framework. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - Convert Strings in attribute name format (lowercase, hyphens separating words) - into property name format (camel-cased). For example, transaction-manager is - converted into transactionManager. - - - - - Convenience class that exposes a signature that matches the - delegate. - - -

- Useful when filtering members via the - mechanism. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - - - Returns true if the supplied instance - satisfies the supplied (which must be an - implementation). - - - The instance that will be checked to see if - it matches the supplied . - - - The criteria against which to filter the supplied - instance. - - - True if the supplied instance - satisfies the supplied (which must be an - implementation); false if not or the - supplied is not an - implementation or is null. - - - - - Interface that can be implemented by exceptions etc that are error coded. - - -

- The error code is a , rather than a number, so it can - be given user-readable values, such as "object.failureDescription". -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Return the error code associated with this failure. - - -

- The GUI can render this anyway it pleases, allowing for I18n etc. -

-
- - The error code associated with this failure, - or the empty string instance if not error-coded. - -
- - - Thrown in response to referring to an invalid property (most often via reflection). - - Rick Evans - - - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - - - Creates a new instance of the InvalidPropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The that is (or rather was) the source of the - offending property. - - - - - The name of the offending property. - - - - - Extension of the interface, expressing a 'priority' - ordering: Order values expressed by IPriorityOrdered objects always - apply before order values of 'plain' Ordered values. - - - This is primarily a special-purpose interface, used for objects - where it is particularly important to determine 'prioritized' - objects first, without even obtaining the remaining objects. - A typical example: Prioritized post-processors in a Spring - - - IPriorityOrdered post-processor objects are initialized in - a special phase, ahead of other post-processor objects. - - Juergen Hoeller - Mark Pollack (.NET) - - - - - - - Criteria that is satisfied if the of each of the - arguments matches each of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - -

- This implementation respects the inheritance chain of any parameter - s... i.e. methods that have a base type (or - interface) that is assignable to the in the - same corresponding index of the parameter types will satisfy this - criteria instance. -

-
- The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - -
- - - Criteria that is satisfied if the number of generic arguments to a given - matches an arbitrary number. - - -

- This class supports checking the generic arguments count of both - generic methods and constructors. -

-
- Bruno Baia -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Thrown when a method (typically a property getter or setter invoked via reflection) - throws an exception, analogous to a . - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for exceptions related to a property access, such as a - mismatch or a target invocation exception. - - Rod Johnson - Mark Pollack (.NET) - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessException class. - - - - - Creates a new instance of the PropertyAccessException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Returns the PropertyChangeEventArgs that resulted in the problem. - - - - - The string error code used to classify the error. - - - - - Creates a new instance of the MethodInvocationException class. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Constructor to use when an exception results from a - . - - - The raised by the invoked property. - - - The that - resulted in an exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The error code string for this exception. - - - - - Criteria that is satisfied if the method Name of an - instance matches a - supplied string pattern. - - - - Supports the following simple pattern styles: - "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - - Bruno Baia - - - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to * (any method name). -

-
-
- - - Creates a new instance of the - class. - - The pattern that names - must match against in order to satisfy this criteria. - - If the supplied is null or resolve to an empty string. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is null or resolve to an empty string. - - - - - Helper class that encapsulates the specification of a method parameter, i.e. - a MethodInfo or ConstructorInfo plus a parameter index. - Useful as a specification object to pass along. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - Initializes a new instance of the class for the given - MethodInfo. - - The MethodInfo to specify a parameter for. - Index of the parameter. - - - - Initializes a new instance of the class. - - The ConstructorInfo to specify a parameter for. - Index of the parameter. - - - - Create a new MethodParameter for the given method or donstructor. - This is a convenience constructor for scenarios where a - Method or Constructor reference is treated in a generic fashion. - - The method or constructor to specify a parameter for. - Index of the parameter. - the corresponding MethodParameter instance - - - - Parameters the name of the method/constructor parameter. - - the parameter name. - - - - Gets the type of the method/constructor parameter. - - The type of the parameter. (never null) - - - - Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The MethodInfo, or null if none. - - - - Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The ConstructorInfo, or null if none - - - - Criteria that is satisfied if the number of parameters to a given - matches an arbitrary number. - - -

- This class supports checking the parameter count of both methods and - constructors. -

-

- Default parameters, etc need to taken into account. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Criteria that is satisfied if the of each of the - parameters of a given matches each - of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the return of a given - matches a given . - - Rick Evans - - - - The return to match against if no - is provided explictly. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Thrown in response to a failed attempt to read a property. - - -

- Typically thrown when attempting to read the value of a write-only - property via reflection. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - 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. - - - - - Thrown in response to a failed attempt to write a property. - - Mark Pollack (.NET) - - - - Creates a new instance of the NotWritablePropertyException class. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class - summarizing what property was not writable. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - - - Creates new NotWritablePropertyException with a root cause. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - The root cause indicating why the property was not writable. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to encountering a value - when traversing a nested path expression. - - - - - 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 of the object where the property was not found. - - The name of the property not found. - - - - Creates a new instance of the - class. - - - The of the object where the property was not found. - - The name of the property not found. - A message about the exception. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the offending property. - - - - - The of the class where the property was last looked for. - - - - - Comparator implementation for objects, sorting by - order value ascending (resp. by priority descending). - - -

- Non- objects are treated as greatest order values, - thus ending up at the end of a list, in arbitrary order (just like same order values of - objects). -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Compares two objects and returns a value indicating whether one is less than, - equal to or greater than the other. - - -

- Uses direct evaluation instead of - to avoid unnecessary boxing. -

-
- The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - -
- - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - Provides additional data for the PropertyChanged event. - - -

- Provides some additional properties over and above the name of the - property that has changed (which is inherited from the - base class). - This allows calling code to determine whether or not a property has - actually changed (i.e. a PropertyChanged event may have been - raised, but the value itself may be equivalent). -

-
- -
- - - Create a new instance of the - class. - - - The name of the property that was changed. - The old value of the property. - the new value of the property. - - - - Get the old value for the property. - - - - - - Get the new value of the property. - - - - - - A base class for all - implementations that are regular expression based. - - Rick Evans - - - - The default pattern... matches absolutely anything. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The regular expression pattern to be applied. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Convenience method that calls the - - on the supplied . - - The input to match against. - True if the matches. - - - - The regular expression pattern to be applied. - - - - - The regular expression options to be applied. - - - - - The regular expression to be applied. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default event name pattern... matches pretty much any event name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default method name pattern... matches pretty much any method name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Exception thrown on a mismatch when trying to set a property - or resolve an argument to a method invocation. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the TypeMismatchException class. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the TypeMismatchException class describing the - property and required type that could not used to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - - - - Creates a new instance of the TypeMismatchException class describing the - property, required type, and underlying exception that could not be used - to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - The underlying exception. - - - - Creates a new instance of the TypeMismatchException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The string error code used to classify the exception. - - - - - Abstract base class for implementations. - - Aleksandar Seovic - - - - An interface that defines the methods that have to be implemented by all data bindings. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - The name of the always filled error provider - - - - - Gets or sets a flag specifying whether this binding is valid. - - - true if this binding evaluated without errors; - false otherwise. - - - - - Marks this binding's state as invalid for this validationErrors collection. - Returns false if is null. - - - false, if validationErrors is null - - - - Initializes a new instance of the class. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets the unique ID of this binding instance. - - - - - Gets or sets the . - - The binding direction. - - - - Gets the error message. - - The error message. - - - - Gets the error providers. - - - - - Abstract base class for simple, one-to-one implementations. - - Aleksandar Seovic - - - - Initialize a new instance of without any - - - - - Initialize a new instance of with the - specified . - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation if source to target binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation of target to source binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets or sets the to use. - - The formatter to use. - - - - Base implementation of the . - - Aleksandar Seovic - - - - An interface that has to be implemented by all data binding containers. - - Aleksandar Seovic - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Gets a value indicating whether this data binding container - has bindings. - - - true if this data binding container has bindings; - false otherwise. - - - - - Creates a new instance of . - - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Implemented as a NOOP for containers. - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Gets a list of bindings for this container. - - - A list of bindings for this container. - - - - - Gets a value indicating whether this instance has bindings. - - - true if this instance has bindings; otherwise, false. - - - - - BaseBindingManager keeps track of all registered bindings and - represents an entry point for the binding and unbinding process. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Enumeration that defines possible values for data binding direction. - - Aleksandar Seovic - - - - Specifies that value from the control property should be bound to a data model. - - - - - Specifies that value from the data model should be bound to control property. - - - - - Specifies that binding is bidirectional. - - - - - Represents an ErrorMessage specific to a binding instance. - - Erich Eichinger - - - - Represents a single validation error message. - - Aleksandar Seovic - Goran Milosavljevic - - - - Default constructor. - - - - - Initializes a new instance of the class. - - Error message resource identifier. - Parameters that should be used for message resolution. - - - - Initializes a new instance of the class copying values from another instance. - - Another Error message instance to copy values from. - - - - This property is reserved, apply the - - to the class instead. - - - An - that describes the XML representation of the object that - is produced by the - - method and consumed by the - - method. - - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Resolves the message against specified . - - Message source to resolve this error message against. - Resolved error message. - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets or sets the resource identifier for this message. - - The resource identifier for this message. - - - - Gets or sets the message parameters. - - The message parameters. - - - - Initializes a new instance of the class. - - the id of the binding this error message is associated with - the message id - optional parameters to this message - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Get the ID of the binding this message instance relates to. - - - - - Interface that should be implemented by data bound objects, such as - web pages, user controls, windows forms, etc. - - Aleksandar Seovic - - - - Gets the binding manager. - - The binding manager. - - - - implementation that allows - data binding between collections that implement - interface. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Simple, expression-based implementation of that - binds source to target one-to-one. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - The formatter to use. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the source expression. - - The source expression. - - - - Gets the target expression. - - The target expression. - - - - Minimal AST node interface used by ANTLR AST generation and tree-walker. - - - - - Add a (rightmost) child to this node - - - - - - Get the first child of this node; null if no children - - - - - Get the next sibling in line after this one - - - - - Get the token text for this node - - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Set the first child of a node. - - - - - - Set the next sibling after this one. - - - - - - Set the token text for this node - - - - - - Set the token type for this node - - - - - - Get the token type for this node - - - - - Event type. - - - - Used for creating Token instances. - - - Used for caching lookahead characters. - - - - This method is executed by ANTLR internally when it detected an illegal - state that cannot be recovered from. - The previous implementation of this method called - and writes directly to , which is usually not - appropriate when a translator is embedded into a larger application. - - Error message. - - - - A creator of Token object instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of Token objects. - - - Since Lexers in ANTLR use a single Token type, each TokenCreator can - create one class of Token objects (that's why it's not called TokenFactory). - - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - The fully qualified name of the Token type to create. - - - - - Type object used as a template for creating tokens by reflection. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - This type was created in VisualAge. - - - - Report exception errors caught in nextToken() - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - - Represents a stream of characters fed to the lexer from that can be rewound - via mark()/rewind() methods. - - - - A dynamic array is used to buffer up all the input characters. Normally, - "k" characters are stored in the buffer. More characters may be stored - during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. - Consumption of characters is deferred. In other words, reading the next - character is not done by conume(), but deferred until needed by LA or LT. - - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "CharConsumed" event. - - Event source object - Event data object - - - - Handle the "CharLA" event. - - Event source object - Event data object - - - - Handle the "Mark" event. - - Event source object - Event data object - - - - Handle the "Rewind" event. - - Event source object - Event data object - - - charBufferConsume method comment. - - - - charBufferLA method comment. - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Specify an object with support code (shared by Parser and TreeParser. - Normally, the programmer does not play with this, using - instead. - - - - - - Specify the type of node to create during tree building. - - Fully qualified AST Node type name. - - - - Specify the type of node to create during tree building. - use now to be consistent with - Token Object Type accessor. - - Fully qualified AST Node type name. - - - - - - - - Get another token object from the token stream - - - - Return the token type of the ith token of lookahead where i=1 - is the current token being examined by the parser (i.e., it - has not been matched yet). - - - - Make sure current lookahead symbol matches token type t. - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Make sure current lookahead symbol matches the given set - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Parser error-reporting function can be overridden in subclass - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - User can override to do their own debugging - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Specifies the behaviour required (i.e. parser modifications) - specifically to support parse tree debugging and derivation. - - - - Override the standard matching and rule entry/exit routines - to build parse trees. This class is useful for 2.7.3 where - you can specify a superclass like - - - class TinyCParser extends Parser(ParseTreeDebugParser); - - - - - - Each new rule invocation must have it's own subtree. Tokens are - added to the current root so we must have a stack of subtree roots. - - - - - Track most recently created parse subtree so that when parsing - is finished, we can get to the root. - - - - - For every rule replacement with a production, we bump up count. - - - - - Adds LT(1) to the current parse subtree. - - - - Note that the match() routines add the node before checking for - correct match. This means that, upon mismatched token, there - will a token node in the tree corresponding to where that token - was expected. For no viable alternative errors, no node will - be in the tree as nothing was matched() (the lookahead failed - to predict an alternative). - - - - - - Create a rule node, add to current tree, and make it current root - - - - - - Pop current root; back to adding to old root - - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - AST Support code shared by TreeParser and Parser. - - - - We use delegation to share code (and have only one - bit of code to maintain) rather than subclassing - or superclassing (forces AST support code to be - loaded even when you don't want to do AST stuff). - - - Typically, is used to specify the - homogeneous type of node to create, but you can override - to make heterogeneous nodes etc... - - - - - - Constructs an ASTFactory with the default AST node type of - . - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - Name of default AST node type for this factory. - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - MetaType of default AST node type for this factory. - - - - - Stores the Type of the default AST node class to be used during tree construction. - - - - - Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass - and ASTNodeCreator. - - - - - Stores the mapping between AST node typenames and their token ID. - - - - - Specify an "override" for the type created for - the specified Token type. - - - This method is useful for situations that ANTLR cannot oridinarily deal - with (i.e., when you create a token based upon a nonliteral token symbol - like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token - type (and hence the AST) statically. - - Token type to override. - - Fully qualified AST typename (or null to specify - the factory's default AST type). - - - - - Register an AST Node Type for a given Token type ID. - - The Token type ID. - The AST Node Type to register. - - - - Register an ASTNodeCreator for a given Token type ID. - - The Token type ID. - The creater to register. - - - - Register an ASTNodeCreator to be used for creating node by default. - - The ASTNodeCreator. - - - - Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings - to the specified size. - This is primarily a convenience method that can be used to prevent - unnecessary and costly re-org of the mappings list. - - Maximum Token Type ID. - - - - Add a child to the current AST - - The AST to add a child to - The child AST to be added - - - - Creates a new uninitialized AST node. Since a specific AST Node Type - wasn't indicated, the new AST node is created using the current default - AST Node type - - - An uninitialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. Once created, - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - Fully qualified name of the Type to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. - - Token instance to be used to initialize the new AST Node. - - Fully qualified name of the Type to be used for creating the new AST Node. - - A newly created and initialized AST node object. - - Once created, the new AST node is initialized with the specified Token - instance. The used for creating this new AST - node is determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - - - - Creates and initializes a new AST node using the specified AST Node instance. - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by aNode. - The AST Node type must have a default/parameterless constructor. - - AST Node instance to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token instance. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token instance to be used to create new AST Node. - An initialized AST node object. - - - - Returns a copy of the specified AST Node instance. The copy is obtained by - using the method Clone(). - - AST Node to copy. - An AST Node (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node and all of it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Make a tree from a list of nodes. The first element in the - array is the root. If the root is null, then the tree is - a simple list not a tree. Handles null children nodes correctly. - For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) - yields tree (nil a b). - - List of Nodes. - AST Node tree. - - - - Make a tree from a list of nodes, where the nodes are contained - in an ASTArray object. - - List of Nodes. - AST Node tree. - - - - Make an AST the root of current AST. - - - - - - - Sets the global default AST Node Type for this ASTFactory instance. - This method also attempts to load the instance - for the specified typename. - - Fully qualified AST Node Type name. - - - - To change where error messages go, can subclass/override this method - and then setASTFactory in Parser and TreeParser. This method removes - a prior dependency on class antlr.Tool. - - - - - - A creator of AST node instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of AST node objects. - - - Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever - they need to create an AST node objeect. What this class does is to support - performant extensibility of the basic ASTFactory. The ASTFactory can now be - extnded as run-time to support more new AST node types without using needing - to use reflection. - - - - - - Constructs an instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Summary description for ASTVisitor. - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Small buffer used to avoid reading individual chars - - - - - Small buffer used to avoid reading individual chars - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - A token is minimally a token type. Subclasses can add the text matched - for the token and line info. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Summary description for DumpASTVisitor. - - Simple class to dump the contents of an AST to the output - - - - Append a char to the msg buffer. If special, then show escaped version - - Message buffer - Char to append - - - - Walk parse tree and return requested number of derivation steps. - If steps less-than 0, return node text. If steps equals 1, return derivation - string at step. - - derivation steps - - - - - Get derivation and return how many you did (less than requested for - subtree roots. - - string buffer - derivation steps - - - - - Do a step-first walk, building up a buffer of tokens until - you've reached a particular step and print out any rule subroots - insteads of descending. - - derivation buffer - derivation steps - - - - - This token stream tracks the *entire* token stream coming from - a lexer, but does not pass on the whitespace (or whatever else - you want to discard) to the parser. - - - - This class can then be asked for the ith token in the input stream. - Useful for dumping out the input stream exactly after doing some - augmentation or other manipulations. Tokens are index from 0..n-1 - - - You can insert stuff, replace, and delete chunks. Note that the - operations are done lazily--only if you convert the buffer to a - string. This is very efficient because you are not moving data around - all the time. As the buffer of tokens is converted to strings, the - toString() method(s) check to see if there is an operation at the - current index. If so, the operation is done and then normal string - rendering continues on the buffer. This is like having multiple Turing - machine instruction streams (programs) operating on a single input tape. :) - - - Since the operations are done lazily at toString-time, operations do not - screw up the token index values. That is, an insert operation at token - index i does not change the index values for tokens i+1..n-1. - - - Because operations never actually alter the buffer, you may always get - the original token stream back without undoing anything. Since - the instructions are queued up, you can easily simulate transactions and - roll back any changes if there is an error just by removing instructions. - For example, - - For example: - - TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); - JavaRecognizer parser = new JavaRecognizer(rewriteEngine); - ... - rewriteEngine.insertAfter("pass1", t, "foobar");} - rewriteEngine.insertAfter("pass2", u, "start");} - System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); - System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); - - - - You can also have multiple "instruction streams" and get multiple - rewrites from a single pass over the input. Just name the instruction - streams and use that name again when printing the buffer. This could be - useful for generating a C file and also its header file--all from the - same buffer. - - - If you don't use named rewrite streams, a "default" stream is used. - - - Terence Parr, parrt@cs.usfca.edu - University of San Francisco - February 2004 - - - - - - Track the incoming list of tokens - - - - - You may have multiple, named streams of rewrite operations. - I'm calling these things "programs." - Maps string (name) -> rewrite (List) - - - - - Map string (program name) -> Integer index - - - - - track index of tokens - - - - - Who do we suck tokens from? - - - - - Which (whitespace) token(s) to throw out - - - - - Rollback the instruction stream for a program so that - the indicated instruction (via instructionIndex) is no - longer in the stream. - - - UNTESTED! - - - - - - - Reset the program so that no instructions exist - - - - - - If op.index > lastRewriteTokenIndexes, just add to the end. - Otherwise, do linear - - - - - - Execute the rewrite operation by possibly adding to the buffer. - - rewrite buffer - The index of the next token to operate on. - - - - This token tracks it's own index 0..n-1 relative to the beginning - of the stream. It is designed to work with - in TokenStreamRewriteEngine.cs - - - - - Index into token array indicating position in input stream - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Implementation of the average aggregator. - - Aleksandar Seovic - - - - Defines an interface that should be implemented - by all collection processors and aggregators. - - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Returns the average of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The average of the numeric values in the source collection. - - - - - Converts all elements in the input list to a given target type. - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the count aggregator. - - Aleksandar Seovic - - - - Returns the number of items in the source collection. - - - The source collection to process. - - - Ignored. - - - The number of items in the source collection, - or zero if the collection is empty or null. - - - - - Converts a string literal to a instance. - - Erich Eichinger - - - - - Erich Eichinger - - - - Implementation of the distinct processor. - - Aleksandar Seovic - - - - Returns distinct items from the collection. - - - The source collection to process. - - - 0: boolean flag specifying whether to include null - in the results or not. Default is false, which means that - null values will not be included in the results. - - - A collection containing distinct source collection elements. - - - If there is more than one argument, or if the single optional argument - is not Boolean. - - - - - Implementation of the maximum aggregator. - - Aleksandar Seovic - - - - Returns the largest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The largest item in the source collection. - - - - - Implementation of the minimum aggregator. - - Aleksandar Seovic - - - - Returns the smallest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The smallest item in the source collection. - - - - - Implementation of the non-null processor. - - Aleksandar Seovic - - - - Returns non-null items from the collection. - - - The source collection to process. - - - Ignored. - - - A collection containing non-null source collection elements. - - - - - Implementation of the 'order by' processor. - - Aleksandar Seovic - Erich Eichinger - - - - Sorts the source collection using custom sort criteria. - - - Please note that your compare function needs to take care about - proper conversion of types to be comparable! - - - The source collection to sort. - - - Sort criteria to use. - - - A sorted array containing collection elements. - - - - - Reverts order of elements in the list - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the sort processor. - - Aleksandar Seovic - - - - Sorts the source collection. - - - Please not that this processor requires that collection elements - are of a uniform type and that they implement - interface. -

- If you want to perform custom sorting based on element properties - you should consider using instead. - - - The source collection to sort. - - - Ignored. - - - An array containing sorted collection elements. - - - If collection is not empty and it is - neither nor . - - - -

- Implementation of the sum aggregator. - - Aleksandar Seovic -
- - - Returns the sum of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The sum of the numeric values in the source collection. - - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Base type for nodes that accept arguments. - - Aleksandar Seovic - - - - Base type for all expression nodes. - - Aleksandar Seovic - - - - For internal purposes only. Use for expression node implementations. - - - This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST - unfortunately is not marked as [Serializable].
-
- Note:Since SpringAST implements , deriving classes - have to explicitely override if they need to persist additional - data during serialization. -
-
- - - The global SpringAST node factory - - - - - Create an instance - - - - - Create an instance from a token - - - - - initialize this instance from an AST - - - - - initialize this instance from an IToken - - - - - initialize this instance from a token type number and a text - - - - - sets the text of this node - - - - - gets the text of this node - - - - - Create a new instance from SerializationInfo - - - - - populate SerializationInfo from this instance - - - - - gets or sets the token type of this node - - - - - gets or sets the text of this node - - - - - Interface that all navigation expression nodes have to implement. - - Aleksandar Seovic - - - - Returns expression value. - - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Expression variables map. - Value of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - New value for the last node of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - Expression variables map. - New value for the last node of the expression. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value. - - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Expression variables map. - Node's value. - - - - Returns node's value for the given context. - - Node's value. - - - - Evaluates this node for the given context, switching local variables map to the ones specified in . - - - - - Sets node's value for the given context. - - Object to evaluate node against. - New value for this node. - - - - Sets node's value for the given context. - - Object to evaluate node against. - Expression variables map. - New value for this node. - - - - Sets node's value for the given context. - - -

- This is a default implementation of Set method, which - simply throws . -

-

- This was done in order to avoid redundant Set method implementations, - because most of the node types do not support value setting. -

-
-
- - - Returns a string representation of this node instance. - - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Holds the state during evaluating an expression. - - - - - Gets/Sets the root context of the current evaluation - - - - - Gets/Sets the current context of the current evaluation - - - - - Gets/Sets global variables of the current evaluation - - - - - Gets/Sets local variables of the current evaluation - - - - - Initializes a new EvaluationContext instance. - - The root context for this evaluation - dictionary of global variables used during this evaluation - - - - Switches current ThisContext. - - - - - Switches current LocalVariables. - - - - - Gets the type of the - - - - - Create a new instance - - - - - Create a new instance - - - - - Append an argument node to the list of child nodes - - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - - - - Asserts the argument count. - - The required count. - - - - Resolves the arguments. - - Current expression evaluation context. - An array of argument values - - - - Resolves the named arguments. - - Current expression evaluation context. - A dictionary of argument name to value mappings. - - - - Resolves the argument. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the argument without ensuring was called. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the named argument. - - Argument name. - Current expression evaluation context. - Resolved named argument value. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed assignment node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed attribute node in the navigation expression. - - Aleksandar Seovic - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Determines the type of object that should be instantiated. - - - The type name to resolve. - - - The type of object that should be instantiated. - - - If the type cannot be resolved. - - - - - Initializes this node by caching necessary constructor and property info. - - - - - - - Sets the named arguments (properties). - - Instance to set property values on. - Argument (property) name to value mappings. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Tries to determine attribute type based on the specified - attribute type name. - - - Attribute type name to resolve. - - - Resolved attribute type. - - - If type cannot be resolved. - - - - - Base class for binary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance with the supplied operands - - - - - - - Create a new instance from SerializationInfo - - - - - Evaluate the left operand - - - - - Evaluate the left operand - - - - - Gets the left operand. - - The left operand. - - - - Gets the right operand. - - The right operand. - - - - Represents parsed boolean literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the boolean literal node. - - - This is the entrypoint into evaluating this expression. - - Node's value. - - - - Represents parsed default node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns left operand if it is not null, or the right operand if it is. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Container object for the parsed expression. - - -

- Preparing this object once and reusing it many times for expression - evaluation can result in significant performance improvements, as - expression parsing and reflection lookups are only performed once. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of the class - by parsing specified expression string. - - Expression to parse. - - - - Registers lambda expression under the specified . - - Function name to register expression as. - Lambda expression to register. - Variables dictionary that the function will be registered in. - - - - Initializes a new instance of the class - by parsing specified primary expression string. - - Primary expression to parse. - - - - Initializes a new instance of the class - by parsing specified property expression string. - - Property expression to parse. - - - - Initializes a new instance of the class. - - - - - Create a new instance from SerializationInfo - - - - - Evaluates this expression for the specified root object and returns - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value of the last node. - - - - Evaluates this expression for the specified root object and sets - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value to set last node to. - If navigation expression is empty. - - - - Evaluates this expression for the specified root object and returns - of the last node, if possible. - - Context to evaluate expression against. - Expression variables map. - Value of the last node. - - - - Contains a list of reserved variable names. - You must not use any variable names with the reserved prefix! - - - - - Variable Names using this prefix are reserved for internal framework use - - - - - variable name of the currently processed object factory, if any - - - - - Converts string representation of expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Utility class that enables easy expression evaluation. - - -

- This class allows users to get or set properties, execute methods, and evaluate - logical and arithmetic expressions. -

-

- Methods in this class parse expression on every invocation. - If you plan to reuse the same expression many times, you should prepare - the expression once using the static method, - and then call to evaluate it. -

-

- This can result in significant performance improvements as it avoids expression - parsing and node resolution every time it is called. -

-

-

-
- Aleksandar Seovic -
- - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Value of the last node in the expression. - - - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Expression variables map. - Value of the last node in the expression. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Value to set last node to. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Expression variables map. - Value to set last node to. - - - - Represents parsed expression list node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a result of the last expression in a list. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the last expression in a list - - - - Represents parsed function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed hexadecimal integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the hexadecimal integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed indexer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - - Context to resolve property against. - Expression variables map. - PropertyInfo for this node. - - - - Represents parsed integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents lambda expression. - - Aleksandar Seovic - - - - caches argumentNames of this instance - - - - - caches body expression of this lambda function - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Gets argument names for this lambda expression. - - - - - Represents parsed list initializer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the list defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents local function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Represents parsed map entry node. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map entry defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed map initializer node in the navigation expression. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Static constructor. Initializes a map of special collection processor methods. - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Gets the best method given the name, argument values, for a given type. - - The type on which to search for the method. - Name of the method. - The binding flags. - The arg values. - Best matching method or null if none found. - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed null literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the null literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic addition operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic addition operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents AND operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical BETWEEN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents arithmetic division operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic division operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical equality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical equality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical IN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical IS operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IS operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical "less than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "less than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents VB-style logical LIKE operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical LIKE operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents logical MATCHES operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical MATCHES operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents arithmetic modulus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic modulus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic multiplication operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic multiplication operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents NOT operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Base class for unary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Gets the operand. - - The operand. - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical NOT operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical inequality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical inequality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents OR operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical OR operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic exponent operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic exponent operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic subtraction operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic subtraction operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary minus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary plus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - - Erich Eichinger - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed projection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of projection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents node that navigates to object's property or public field. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - The parent. - - - - Attempts to resolve property or field. - - - Type to search for a property or a field. - - - Property or field name. - - - Binding flags to use. - - - Resolved property or field accessor, or null - if specified cannot be resolved. - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Retrieves property or field value. - - Context to evaluate expressions against. - Current expression evaluation context. - Property or field value. - - - - Sets property value, doing any type conversions that are necessary along the way. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Sets property or field value using either dynamic or standard reflection. - - Object to evaluate node against. - New value for this node, converted to appropriate type. - - - - In the case of read only collections or custom collections that are not assignable from - IList, try to add to the collection. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - true if was able add to IList, IDictionary, or ISet - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... - - Context to resolve property against. - PropertyInfo for this node. - - - - Gets a value indicating whether this node represents a property. - - - true if this node is a property; otherwise, false. - - - - - Gets a value indicating whether this node represents a field. - - - true if this node is a field; otherwise, false. - - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified identifier. - - - Fully qualified identifier as a string. - - - - - Represents parsed real literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the real literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents a reference to a Spring-managed object. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the first context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the last context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of selection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed string literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Exception thrown when detecting invalid SpEL syntax - - Erich Eichinger - - - - TODO - - - - - TODO - - - - - - - - - - - - - - - - - - - - Gets a message that provides details on the syntax error. - - - - - The expression that caused the error - - - - - Represents ternary expression node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed type node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified typename. - - - Fully qualified typename as a string. - - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Implementation of that can be used to - format and parse boolean values. - - Erich Eichinger - - - - Interface that should be implemented by all formatters. - - - - Formatters assume that source value is a string, and make no assumptions - about the target value's type, which means that Parse method can return - object of any type. - - - Aleksandar Seovic - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Initializes a new instance of the class - using default values - - - - - Initializes a new instance of the class - - - - - Formats the specified boolean value. - - The value to format. - Formatted boolean value. - If is null. - If is not of type . - - - - Parses the specified boolean value according to settings of and - - The boolean value to parse. - Parsed boolean value as a . - If does not match or . - - - - Set/Get value to control casesensitivity of - - - Defaults to true - - - - - Set/Get value to recognize as boolean "true" value - - - Defaults to - - - - - Set/Get value to recognize as boolean "false" value - - - Defaults to - - - - - Implementation of that can be used to - format and parse currency values. - - - - CurrencyFormatter uses currency related properties of the - to format and parse currency values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of CurrencyFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the CurrencyFormatter in order - to override some of the default currency formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - currency values are formatted. - - - - - Formats the specified currency value. - - The value to format. - Formatted currency . - If is null. - If is not a number. - - - - Parses the specified currency value. - - The currency value to parse. - Parsed currency value as a . - - - - Gets or sets the currency decimal digits. - - The currency decimal digits. - - - - - Gets or sets the currency decimal separator. - - The currency decimal separator. - - - - - Gets or sets the currency group sizes. - - The currency group sizes. - - - - - Gets or sets the currency group separator. - - The currency group separator. - - - - - Gets or sets the currency symbol. - - The currency symbol. - - - - - Gets or sets the currency negative pattern. - - The currency negative pattern. - - - - - Gets or sets the currency positive pattern. - - The currency positive pattern. - - - - - Implementation of that can be used to - format and parse values. - - - - DateTimeFormatter uses properties of the - to format and parse values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of DateTimeFormatter, default DateTimeFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the DateTimeFormatter in order - to override some of the default formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - Date/time format string. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture. - - - - Formats the specified value. - - The value to format. - Formatted value. - If is null. - If is not an instance of . - - - - Parses the specified value. - - The string to parse. - Parsed value. - - - - Provides base functionality for filtering values before they actually get parsed/formatted. - - Erich Eichinger - - - - Creates a new instance of this FilteringFormatter. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Allows to rewrite a value before it gets parsed by the underlying formatter - - - - - Allows to change a value before it gets formatted by the underlying formatter - - - - - Implementation of that can be used to - format and parse floating point numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign, decimal point, exponent). - - - Aleksandar Seovic - - - - Default format string. - - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and current thread's culture. - - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and specified culture. - - The culture. - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - The culture name. - - - - Initializes a new instance of the class, - using specified format string and culture. - - The format string. - The culture. - - - - Formats the specified float value. - - The value to format. - Formatted floating point number. - If is null. - If is not a number. - - - - Parses the specified float value. - - The float value to parse. - Parsed float value as a . - - - - Replaces input strings with a given default value, - if they are null or contain whitespaces only, - - Erich Eichinger - - - - Creates a new instance of this HasTextFilteringFormatter using null as default value. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Creates a new instance of this HasTextFilteringFormatter. - - the default value to be returned, if input text doesn't contain text - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - If value contains no text, it will be replaced by a defaultValue. - - - - - Implementation of that can be used to - format and parse integer numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign). - - - Aleksandar Seovic - - - - Initializes a new instance of the class, - using default format string of '{0:D}'. - - - - - Initializes a new instance of the class, - using specified format string. - - - - - Formats the specified integer value. - - The value to format. - Formatted integer number. - If is null. - If is not an integer number. - - - - Parses the specified integer value. - - The integer value to parse. - Parsed number value as a . - - - - Implementation of that simply calls . - - - This formatter is a no-operation implementation. - - Erich Eichinger - - - - Initializes a new instance of the class. - - - - - Converts the passed value to a string by calling . - - The value to convert. - to string converted value. - - - - Returns the passed string "as is". - - The value to return. - The value passed into this method. - - - - Implementation of that can be used to - format and parse numbers. - - - - NumberFormatter uses number-related properties of the - to format and parse numbers. - - - This formatter works with both integer and decimal numbers and allows - you to format and parse numbers that conform to - number style (leading and trailing white space and/or sign, thousands separator, - decimal point) - - - If you use one of the constructors that accept culture as a parameter - to create an instance of NumberFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the NumberFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified number value. - - The value to format. - Formatted number . - If is null. - If is not a number. - - - - Parses the specified number value. - - The number value to parse. - Parsed number value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the number group sizes. - - The number group sizes. - - - - - Gets or sets the number group separator. - - The number group separator. - - - - - Gets or sets the negative pattern. - - The number negative pattern. - - - - - Implementation of that can be used to - format and parse numbers. - - - - PercentFormatter uses percent-related properties of the - to format and parse percentages. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of PercentFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the PercentFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified percentage value. - - The value to format. - Formatted percentage. - If is null. - If is not a number. - - - - Parses the specified percentage value. - - The percentage value to parse. - Parsed percentage value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the percent group sizes. - - The percent group sizes. - - - - - Gets or sets the percent group separator. - - The percent group separator. - - - - - Gets or sets the negative pattern. - - The percent negative pattern. - - - - - Gets or sets the positive pattern. - - The percent positive pattern. - - - - - Gets or sets the percent symbol. - - The percent symbol. - - - - - Gets or sets the per mille symbol. - - The per mille symbol. - - - - - Loads a list of resources that should be applied from the .NET . - - -

- This implementation will iterate over all resource managers - within the message source and return a list of all the resources whose name starts with '$this'. -

-

- All other resources will be ignored, but you can retrieve them by calling one of - GetMessage methods on the message source directly. -

-
- Aleksandar Seovic -
- - - Abstract base class that all localizers should extend - - -

- This class contains the bulk of the localizer logic, including implementation - of the ApplyResources methods that are defined in - interface. -

-

- All specific localizers need to do is inherit this class and implement - GetResources method that will return a list of - objects that should be applied to a specified target. -

-

- Custom implementations can use whatever type of resource storage they want, - such as standard .NET resource sets, custom XML files, database, etc. -

-
- Aleksandar Seovic -
- - - Defines an interface that localizers have to implement. - - -

- Localizers are used to automatically apply resources to object's members - using reflection. -

-
- Aleksandar Seovic -
- - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's culture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's uiCulture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Returns a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - implementation - that simply returns the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . - - Aleksandar Seovic - - - - Strategy interface for - resolution. - - Aleksandar Seovic - - - - Resolves the - from some context. - - -

- The 'context' is determined by the appropriate implementation class. - An example of such a context might be a thread local bound - , or a - sourced from an HTTP - session. -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - -

- This is an optional operation and does not need to be implemented - such that it actually does anything useful (i.e. it can be a no-op). -

-
- - The new or - to clear the current . - -
- - - Returns the default . - - -

- It tries to get the - from the value of the - - property and falls back to the of the - current thread if the - - is . -

-
- - The default - -
- - - Resolves the - from some context. - - -

- The 'context' in this implementation is the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - - The new or - to clear the current . - - - - - - - The default . - - - The default . - - - - - Abstract base class that all resource cache implementations should extend. - - Aleksandar Seovic - - - - Defines an interface that resource cache adapters have to implement. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Gets the list of resources from the cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Crates resource cache key for the specified target object and culture. - - Target object to apply resources to. - Resource culture to use for resource lookup. - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Resource cache implementation that doesn't cache resources. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - Always returns null. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - - - - Holds mapping between control property and it's value - as read from the resource file. - - Aleksandar Seovic - - - - Creates instance of resource mapper. - - Target property. - Resource value. - - - - Gets parsed target property expression. See - for more information on object navigation expressions. - - - - - Value of the resource that target property should be set to. - - - - - Utility class to aid in the manipulation of events and delegates. - - Griffin Caprio - - - - Returns a new instance of the requested . - - -

- Often used to wire subscribers to event publishers. -

-
- - The of delegate to create. - - - The target subscriber object that contains the delegate implementation. - - - referencing the delegate method on the subscriber. - - - A delegate handler that can be added to an events list of handlers, or called directly. - -
- - - Queries the input type for a signature matching the input - signature. - - - Typically used to query a potential subscriber to see if they implement an event handler. - - to match against - to query - - matching input - signature, or if there is no match. - - - - - Creates a new instance of the EventManipulationUtilities class. - - -

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

-
-
- - - Default implementation of the - interface. - - Griffin Caprio - - - - Creates a new instance of the EventRegistry class. - - - - - Adds the input object to the list of publishers. - - - This publishes all events of the source object to any object - wishing to subscribe - - The source object to publish. - - - - Subscribes to all events published, if the subscriber implements - compatible handler methods. - - The subscriber to use. - - - - Subscribes to published events of all objects of a given type, if the - subscriber implements compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - The target to unsubscribe from - - - - The list of event publishers. - - The list of event publishers. - - - - To be implemented by any object that wishes to receive a reference to - an . - - -

- This interface only applies to objects that have been instantiated - within the context of an - . This interface does - not typically need to be implemented by application code, but is rather - used by classes internal to Spring.NET. -

-
- Mark Pollack - Rick Evans -
- - - Set the - associated with the - that created this - object. - - -

- This property will be set by the relevant - after all of this - object's dependencies have been resolved. This object can use the - supplied - immediately to publish or subscribe to one or more events. -

-
-
- - - Marks a property as being 'required': that is, the setter property - must be configured to be dependency-injected with a value. - - Consult the SDK documentation for , - which, by default, checks for the presence of this annotation. - - Rob Harrop - Mark Pollack - - - - A implementation that enforces required properties to have been configured. - Required properties are detected through an attribute, by default, Spring's - attribute. - - - The motivation for the existence of this IObjectPostProcessor is to allow - developers to annotate the setter properties of their own classes with an - arbitrary attribute to indicate that the container must check - for the configuration of a dependency injected value. This neatly pushes - responsibility for such checking onto the container (where it arguably belongs), - and obviates the need (in part) for a developer to code a method that - simply checks that all required properties have actually been set. - - Please note that an 'init' method may still need to implemented (and may - still be desirable), because all that this class does is enforce that a - 'required' property has actually been configured with a value. It does - not check anything else... In particular, it does not check that a - configured value is not null. - - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Adapter that implements all methods on - as no-ops, which will not change normal processing of each object instantiated - by the container. Subclasses may override merely those methods that they are - actually interested in. - - - Note that this base class is only recommendable if you actually require - functionality. If all you need - is plain functionality, prefer a straight - implementation of that (simpler) interface. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Extension of the interface, - adding a callback for predicting the eventual type of a processed object. - - This interface is a special purpose interface, mainly for - internal use within the framework. In general, application-provided - post-processors should simply implement the plain - interface or derive from the - class. New methods might be added to this interface even in point releases. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Subinterface of - - that adds a before-instantiation callback and a callback after instantiation but before - explicit properties are set or autowiring occurs. - - - - Typically used to suppress default instantiation for specific target objects, - for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, - lazily initializing targets, etc), or to implement additional injection strategies such as field - injection. - - - This interface is a special purpose interface, mainly for internal use within the framework. - It is recommended to implement the plain interface as far as - possible, or to derive from in order to be shielded - from extension to this interface. - - - Juergen Hoeller - Rick Evans (.NET) - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Predicts the type of the object to be eventually returned from this - processors callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Predicts the type of the object to be eventually returned from this - processors PostProcessBeforeInstantiation callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Cache for validated object names, skipping re-validation for the same object - - - - - Post-process the given property values before the factory applies them - to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. - - The property values that the factory is about to apply (never null). - The 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances or null to skip property population. - - If a required property value has not been specified - in the configuration metadata. - - - - Determines whether the supplied property is required to have a value, that is to be dependency injected. - - - This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that - the property has a setter method. - - The target PropertyInfo - - true if the supplied property has been marked as being required;; otherwise, false if - not or if the supplied property does not have a setter method - - - - - Builds an exception message for the given list of invalid properties. - - The list of names of invalid properties. - Name of the object. - The exception message - - - - Sets the type of the required attribute, to be used on a property setter - - - The default required attribute type is the Spring-provided attribute. - This setter property exists so that developers can provide their own - (non-Spring-specific) annotation type to indicate that a property value is required. - - The type of the required attribute. - - - - Base class that provides common functionality needed for several IObjectFactoryPostProcessor - implementations - - Mark Pollack - - - - Allows for custom modification of an application context's object - definitions, adapting the object property values of the context's - underlying object factory. - - -

- Application contexts can auto-detect - IObjectFactoryPostProcessor objects in their object definitions and - apply them before any other objects get created. -

-

- Useful for custom config files targeted at system administrators that - override object properties configured in the application context. -

-

- See PropertyResourceConfigurer and its concrete implementations for - out-of-the-box solutions that address such configuration needs. -

-
- Juergen Hoeller - Rick Evans (.Net) -
- - - Modify the application context's internal object factory after its - standard initialization. - - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - The object factory used by the application context. - - - In case of errors. - -
- - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Resolves the supplied into a - instance. - - The object that is to be resolved into a - instance. - The error context source. - The error context string. - A resolved . - -

- This (default) implementation supports resolving - s and s. - Only override this method if you want to key your type alias - on something other than s - and s. -

-
- - If the supplied is , - or the supplied cannot be resolved. - -
- - - Return the order value of this object, with a higher value meaning - greater in terms of sorting. - - The order value. - - - - - Simple template superclass for - implementations that allows for the creation of a singleton or a prototype - instance (depending on a flag). - - - If the value of the - - property is (this is the default), this class - will create a single instance of it's object upon initialization and - subsequently return the singleton instance; else, this class will - create a new instance each time (prototype mode). Subclasses must - implement the - - template method to actually create objects. - - Juergen Hoeller - Keith Donald - Simon White (.NET) - - - - Interface to be implemented by objects used within an - that are themselves - factories. - - -

- If an object implements this interface, it is used as a factory, - not directly as an object. s - can support singletons and prototypes - ()... - please note that an - itself can only ever be a singleton. It is a logic error to configure an - itself to be a prototype. -

- - An object that implements this interface cannot be used as a normal object. - -
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - - If this method is being called in the context of an enclosing IoC container and - returns , the IoC container will consider this factory - object as not being fully initialized and throw a corresponding (and most - probably fatal) exception. - - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - 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? - - - - - Invoked by an - after it has injected all of an object's dependencies. - - - In the event of misconfiguration (such as the failure to set a - required property) or if initialization fails. - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - Template method that subclasses must override to construct - the object returned by this factory. - - - Invoked once immediately after the initialization of this - in the case of - a singleton; else, on each call to the - - method. - - - If an exception occured during object creation. - - - A distinct instance of the object created by this factory. - - - - - Performs cleanup on any cached singleton object. - - -

- Only makes sense in the context of a singleton object. -

-
- - -
- - - Is the object managed by this factory a singleton or a prototype? - - -

- Please note that changing the value of this property after - this factory object instance has been created by an enclosing - Spring.NET IoC container really is a programming error. This - property should really only be set once, prior to the invocation - of the - - callback method. -

-
- -
- - - Return the of object that this - creates, or - if not known in advance. - - - - - - The various autowiring modes. - - Rick Evans - - - - Do not autowire. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Implementation of that - resolves variable name against command line arguments. - - Aleksandar Seovic - - - - Defines contract that different variable sources have to implement. - - -

- The "variable sources" are objects containing name-value pairs - that allow a variable value to be retrieved for the given name.

-

- Out of the box, Spring.NET supports a number of variable sources, - that allow users to obtain variable values from .NET config files, - Java-style property files, environment, registry, etc.

-

- Users can always write their own variable sources implementations, - that will allow them to load variable values from the database or - other proprietary data source.

-
- - - - - - - Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Default constructor. - Initializes command line arguments from the environment. - - - - - Constructor that allows arguments to be passed externally. - Useful for testing. - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes command line arguments dictionary. - - - - - Gets or sets a prefix that should be used to - identify arguments to extract values from. - - - A prefix that should be used to identify arguments - to extract values from. Defaults to slash ("/"). - - - - - Gets or sets a character that should be used to - separate argument name from its value. - - - A character that should be used to separate argument - name from its value. Defaults to colon (":"). - - - - - Implementation of that - resolves variable name against name-value sections in - the standard .NET configuration file. - - Aleksandar Seovic - - - - Initializes a new instance of - - - - - Initializes a new instance of from the given - - - - - Initializes a new instance of from the given - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets a list of section names variables should be loaded from. - - - All sections specified need to be handled by the - in order to be processed successfully. - - - A list of section names variables should be loaded from. - - - - - Convinience property. Gets or sets a single section - to read properties from. - - - The section specified needs to be handled by the - in order to be processed successfully. - - - A section to read properties from. - - - - - Implementation of that - resolves variable name against provided variables. - - - Variable name resolution is case insensitive. - - Bruno Baia - - - - Initializes a new instance of . - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets variables. - - - - - Various utility methods for .NET style .config files. - - -

- Currently supports reading custom configuration sections and returning them as - objects. -

-
- Simon White - Mark Pollack -
- - - Initializes the type members - - - - - Reads the specified configuration section into a - . - - The resource to read. - The section name. - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - The populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Read from the specified configuration from the supplied XML - into a - . - - - - Does not support section grouping. The supplied XML - must already be loaded. - - - - The to read from. - - - The configuration section name to read. - - - A newly populated - . - - - If any errors are encountered while reading (this only applies to - v1.1 and greater of the .NET Framework). - - - If any errors are encountered while reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Returns the section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed result of evaluating the specified . - - if the result's type does not match the expected type - - - - Reads the specified configuration section from the given - - - - - - - - Reads the specified configuration section from the given - - - - - - - - - Determine the configuration section handler type - - - - - Populates the supplied with values from - a .NET application configuration file. - - - The - to add any key-value pairs to. - - - The configuration section name in the a .NET application configuration - file. - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - if the supplied - was found. - - - - - Creates a new instance of the ConfigurationReader class. - - -

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

-
-
- - - Implementation of that - resolves variable name connection strings defined in - the standard .NET configuration file. - - -

- When the <connectionStrings> configuration section is processed by this class, - two variables are defined for each connection string: one for connection string and - the second one for the provider name.

-

- Variable names are generated by appending '.connectionString' and '.providerName' - literals to the value of the name attribute of the connection string element. - For example:

-
-            
-               
-            
-            
-

- will result in two variables being created: myConn.connectionString and myConn.providerName. - You can reference these variables within your object definitions, just like any other variable.

-
- Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Holder for constructor argument values for an object. - - -

- Supports values for a specific index or parameter name (case - insensitive) in the constructor argument list, and generic matches by - . -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Can be used as an argument filler for the - - overload when one is not looking for an argument by index. - - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Add argument value for the given index in the constructor argument list. - - - The index in the constructor argument list. - - - The argument value. - - - - - Add argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - The argument value. - - The of the argument - . - - - - - Add argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - The argument value. - - If the supplied is - or is composed wholly of whitespace. - - - - - Get argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - - The required of the argument. - - - The - - for the argument, or if none set. - - - - - Get argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - - The - - for the argument, or if none set. - - - - - Does this set of constructor arguments contain a named argument matching the - supplied name? - - - - The comparison is performed in a case-insensitive fashion. - - - The named argument to look up. - - if this set of constructor arguments - contains a named argument matching the supplied - name. - - - - - Add generic argument value to be matched by type. - - - The argument value. - - - - - Add generic argument value to be matched by type. - - The argument value. - - The of the argument - . - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - The - - for the argument, or if none set. - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list, or to the named argument, or - generically matches by . - - - The index of the argument in the constructor argument list. May be - negative, to denote the fact that we are not looking for an - argument by index (see - . - - - The name of the argument in the constructor argument list. May be - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Return the map of indexed argument values. - - - An with - indices as keys and - s - as values. - - - - - Return the map of named argument values. - - - An with - named arguments as keys and - s - as values. - - - - - Return the set of generic argument values. - - - A of - s. - - - - - Return the number of arguments held in this instance. - - - - - Returns true if this holder does not contain any argument values, - neither indexed ones nor generic ones. - - - - - Holder for a constructor argument value, with an optional - attribute indicating the target - of the actual constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - The of the argument - . Can also be one of the common - aliases (int, bool, - float, etc). - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Gets and sets the value for the constructor argument. - - -

- Only necessary for manipulating a registered value, for example in - s. -

-
-
- - - Return the of the constructor - argument. - - - - - - implementation that allows for convenient registration of custom - s. - - - - The use of this class is typically not required; the .NET - mechanism of associating a - with a - via the use of the - is the - recommended (and standard) way. This class primarily exists to cover - those cases where third party classes to which one does not have the - source need to be exposed to the type conversion mechanism. - -

- Because the - - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever type conversion is required. If - one is using a - - object definition within the scope of an - , no such automatic - pickup of the - - is performed (custom converters will have to be added manually using the - - method). For most application scenarios, one will get better - mileage using the - abstraction. -

-
- -

- The following examples all assume XML based configuration, and use - inner object definitions to define the custom - objects (nominally to - avoid polluting the object name space, but also because the - configuration simply reads better that way). -

- - - - - - - - - - - - - - - - -

- The following example illustrates a complete (albeit naieve) use case - for this class, including a custom - implementation, said - converters domain class, and the XML configuration that hooks the - converter in place and makes it available to a Spring.NET container for - use during object resolution. -

-

- The domain class is a simple data-only object that contains the data - required to send an email message (such as the host and user account - name). A developer would prefer to use a string of the form - UserName=administrator,Password=r1l0k1l3y,Host=localhost to - configure the mail settings and just let the container take care of the - conversion. -

- - namespace ExampleNamespace - { - public sealed class MailSettings - { - private string _userName; - private string _password; - private string _host; - - public string Host - { - get { return _host; } - set { _host = value; } - } - - public string UserName - { - get { return _userName; } - set { _userName = value; } - } - - public string Password - { - get { return _password; } - set { _password = value; } - } - } - - public sealed class MailSettingsConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (typeof (string) == sourceType) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - string text = value as string; - if(text != null) - { - MailSettings mailSettings = new MailSettings(); - string[] tokens = text.Split(','); - for (int i = 0; i < tokens.Length; ++i) - { - string token = tokens[i]; - string[] settings = token.Split('='); - typeof(MailSettings).GetProperty(settings[0]) - .SetValue(mailSettings, settings[1], null); - } - return mailSettings; - } - return base.ConvertFrom(context, culture, value); - } - } - - // a very naieve class that uses the MailSettings class... - public sealed class ExceptionLogger - { - private MailSettings _mailSettings; - - public MailSettings MailSettings { - { - set { _mailSettings = value; } - } - - public void Log(object value) - { - Exception ex = value as Exception; - if(ex != null) - { - // use _mailSettings instance... - } - } - } - } - -

- The attendant XML configuration for the above classes would be... -

- - - - - - - - - - - - - - - - Juergen Hoeller - Simon White (.NET) - - - - - - - Registers any custom converters with the supplied - . - - - The object factory to register the converters with. - - - In case of errors. - - - - - Resolves the supplied into a - instance. - - - The object that is to be resolved into a - instance. - - - A resolved instance. - - - If the supplied is , - or the supplied cannot be resolved. - - - - - The custom converters to register. - - -

- The uses the type name - of the class that requires conversion as the key, and an - instance of the - that will effect - the conversion. Alternatively, the actual - of the class that requires conversion - can be used as the key. -

-
- -

- - IDictionary converters = new Hashtable(); - converters.Add( "System.Date", new MyCustomDateConverter() ); - // a System.Type instance can also be used as the key... - converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); - -

-
-
- - - implementation that - creates delegates. - - -

- Supports the creation of s for both - instance and methods. -

-
- Rick Evans -
- - - Callback method called once all factory properties have been set. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Creates the delegate. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - The of - created by this factory. - - -

- Returns the - if accessed prior to the method - being called. -

-
-
- - - The of the - created by this factory. - - - - - The name of the method that is to be invoked by the created - delegate. - - - - - The target if the - refers to a method. - - - - - The target object if the - refers to an instance method. - - - - - A generic implementation of an , that delegates post processing to a passed delegate - - - This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. - - - The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on - the context instance: - - IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); - ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => - { - of.RegisterSingleton("someObject", someObject); - })); - - - Erich Eichinger - - - - Get or Set the handler to delegate configuration to - - - - - Descriptor for a specific dependency that is about to be injected. - Wraps a constructor parameter, a method parameter or a field, - allowing unified access to their metadata. - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for a method or constructor parameter. - Considers the dependency as 'eager' - - The MethodParameter to wrap. - if set to true if the dependency is required. - - - - Initializes a new instance of the class for a method or a constructor parameter. - - The MethodParameter to wrap. - if set to true the dependency is required. - if set to true the dependency is 'eager' in the sense of - eagerly resolving potential target objects for type matching. - - - - Gets a value indicating whether this dependency is required. - - true if required; otherwise, false. - - - - Determine the declared (non-generic) type of the wrapped parameter/field. - - The type of the dependency (never null - - - - Gets a value indicating whether this is eager in the sense of - eagerly resolving potential target beans for type matching. - - true if eager; otherwise, false. - - - - Gets the wrapped MethodParameter, if any. - - The method parameter. - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
- - If the value is . - - - If the value is an . - - - If the value is an interface. - -
- - - The of objects created by this factory. - - - Always returns the . - - - - - A very simple, hashtable-based implementation of - - Erich Eichinger - - - - Creates a new, empty variable source - - - - - Creates a new, empty and case-insensitive variable source - - - - - Create a new variable source from a list of paired string values. - - - - The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: - - new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) - - - - the argument list containing pairs, or null - - - - Initializes a new instance of the DictionaryVariableSource class. - - - - - Creates a new variable source, reading values from another dictionary - and converting them to strings if necessary - - - - - Adds a key/value pair - - this dictionary. allows for fluent config - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Performs a variable name lookup - - - - - Specifies how instances of the - - class must apply environment variables when replacing values. - - Mark Pollack - - - - Never replace environment variables. - - - - - If properties are not specified via a resource, - then resolve using environment variables. - - - - - Apply environment variables first before applying properties from a - resource. - - - - - Implementation of that - resolves variable name against environment variables. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Holder for event handler values for an object. - - Rick Evans (.NET) - - - - The empty array of s. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Adds the supplied handler to the collection of event handlers. - - The handler to be added. - - - - The mapping of event names to an - of - s. - - - - - Gets the of events - that have handlers associated with them. - - - - - Gets the of - s for the supplied - event name. - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to a Spring that should be evaluated at runtime. - - Aleksandar Seovic - - - - Creates a new instance of the - - class. - - The expression to resolve. - - - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Gets or sets the expression string. Setting the expression string will cause - the expression to be parsed. - - The expression string. - - - - Return the expression. - - - - - Properties for this expression node. - - - - - implementation that - retrieves a static or non-static public field value. - - -

- Typically used for retrieving public constants. -

-
- -

- The following example retrieves the field value... -

- - - - - - -

- The previous example could also have been written using the convenience - - property, like so... -

- - - - - -

- This class also implements the - interface - (). - If the id (or name) of one's - - object definition is set to the - of the field to be retrieved, then the id (or - name) of one's object definition will be used for the name of the - field lookup. See below for an example of this - concise style of definition. -

- - - - - - - -

- The usage for retrieving instance fields is similar. No example is shown - because public instance fields are generally bad practice; but if - you have some legacy code that exposes public instance fields, or if you - just really like coding public instance fields, then you can use this - implementation to - retrieve such field values. -

- - Juergen Hoeller - Rick Evans (.NET) - - - - Interface to be implemented by objects that wish to be aware of their object - name in an . - - -

- Note that most objects will choose to receive references to collaborating - objects via respective properties. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. -

-
-
- - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - -

- This method allows the object instance to perform initialization only - possible when all object properties have been set and to throw an - exception in the event of misconfiguration. -

-
- - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The of the - field to be retrieved. - - - - - Set the name of the object in the object factory that created this object. - - - The name of the object in the factory. - - -

- In the context of the - - class, the - - value will be interepreted as the value of the - - property if no value has been explicitly assigned to the - - property. This allows for concise object definitions with just an id or name; - see the class documentation for - - for an example of this style of usage. -

-
-
- - - The name of the field the value of which is to be retrieved. - - -

- If the - - has been set (and is not ), then the value of this property - refers to an instance field name; it otherwise refers to a - field name. -

-
-
- - - The object instance on which the field is defined. - - - - - The on which the field is defined. - - - - - The of object that this - creates, or - if not known in advance. - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - Extension of the - interface to be implemented by object factories that are capable of - autowiring and expose this functionality for existing object instances. - - Juergen Hoeller - Rick Evans (.NET) - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - the resolved object, or null if none found - if dependency resolution failed - - - - Extension of the interface - that injects dependencies into the object managed by the factory. - - Bruno Baia - - - - Gets the template object definition that should be used - to configure the instance of the object managed by this factory. - - - - - SPI interface to be implemented by most if not all listable object factories. - - -

- Allows for framework-internal plug'n'play, e.g. in - . -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Configuration interface to be implemented by most if not all object - factories. - - -

- Provides the means to configure an object factory in addition to the - object factory client methods in the - interface. -

-

- Allows for framework-internal plug'n'play even when needing access to object - factory configuration methods. -

-

- When disposed, it will destroy all cached singletons in this factory. Call - when you want to shutdown - the factory. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Interface that defines a registry for shared object instances. - - - Can be implemented by - implementations in order to expose their singleton management facility - in a uniform manner. - - The interface extends this interface. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Registers the given existing object as singleton in the object registry, - under the given object name. - - - - The given instance is supposed to be fully initialized; the registry - will not perform any initialization callbacks (in particular, it won't - call IInitializingObject's AfterPropertiesSet method). - The given instance will not receive any destruction callbacks - (like IDisposable's Dispose method) either. - - - If running within a full IObjectFactory: Register an object definition - instead of an existing instance if your object is supposed to receive - initialization and/or destruction callbacks. - - - Typically invoked during registry configuration, but can also be used - for runtime registration of singletons. As a consequence, a registry - implementation should synchronize singleton access; it will have to do - this anyway if it supports a BeanFactory's lazy initialization of singletons. - - - Name of the object. - The singleton object. - - - - - - Return the (raw) singleton object registered under the given name. - - - - Only checks already instantiated singletons; does not return an Object - for singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to access manually registered singletons - . Can also be used to access a singleton - defined by an object definition that already been created, in a raw fashion. - - - Name of the object to look for. - the registered singleton object, or null if none found - - - - - Check if this registry contains a singleton instance with the given name. - - - - Only checks already instantiated singletons; does not return true - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check whether a - singleton defined by an object definition has already been created. - - - To check whether an object factory contains an object definition with a given name, - use ListableBeanFactory's ContainsObjectDefinition. Calling both - ContainsObjectDefinition and ContainsSingleton answers - whether a specific object factory contains an own object with the given name. - - - Use IObjectFactory's ContainsObject for general checks whether the - factory knows about an object with a given name (whether manually registered singleton - instance or created by bean definition), also checking ancestor factories. - - - Name of the object to look for. - - true if this bean factory contains a singleton instance with the given name; otherwise, false. - - - - - - - - Gets the names of singleton objects registered in this registry. - - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - The list of names as String array (never null). - - - - - - - Gets the number of singleton beans registered in this registry. - - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - The number of singleton objects. - - - - - - - Ignore the given dependency type for autowiring. - - -

- To be invoked during factory configuration. -

-

- This will typically be used for dependencies that are resolved - in other ways, like - through . -

-
- - The to be ignored. - -
- - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - -

- To be invoked during factory configuration. -

-
- - The - to register. - -
- - - Given an object name, create an alias. - - -

- This is typically used to support names that are illegal within - XML ids (which are used for object names). -

-

- Typically invoked during factory configuration, but can also be - used for runtime registration of aliases. Therefore, a factory - implementation should synchronize alias access. -

-
- The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - -
- - - Register the given custom - for all properties of the given . - - -

- To be invoked during factory configuration. -

-
- - The required of the property. - - - The to register. - -
- - - Set the parent of this object factory. - - -

- Note that the parent shouldn't be changed: it should only be set outside - a constructor if it isn't available when an object of this class is - created. -

-
-
- - - Returns the current number of registered - s. - - - The current number of registered - s. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - -

- Typically invoked at the end of factory setup, if desired. -

-

- As this is a startup method, it should destroy already created singletons if - it fails, to avoid dangling resources. In other words, after invocation - of that method, either all or no singletons at all should be - instantiated. -

-
- - If one of the singleton objects could not be created. - -
- - - Register a special dependency type with corresponding autowired value. - - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the BeanFactory interface itself. - - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - May be used to store custom value references in object definition properties. - - - Erich Eichinger - - - - - - the object factory holding the given object definition - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Subinterface of - that adds - a before-destruction callback. - - - The typical usage will be to invoke custom destruction callbacks on - specific object types, matching corresponding initialization callbacks. - - Juergen Hoeller - Simon White (.NET) - - - - Apply this - to the - given new object instance before its destruction. Can invoke custom - destruction callbacks. - - The new object instance. - The name of the object. - - In case of errors. - - - - - Denotes a special placeholder collection that may contain - s or - other placeholder objects that will need to be resolved. - - -

- 'A special placeholder collection' means that the elements of this - collection can be placeholders for objects that will be resolved later by - a Spring.NET IoC container, i.e. the elements themselves will be - resolved at runtime by the enclosing IoC container. -

-

- The core Spring.NET library already provides three implementations of this interface - straight out of the box; they are... -

- - - - . - - - - - . - - - - - . - - - -

- If you have a custom collection class (i.e. a class that either implements the - directly or derives from a class that does) - that you would like to expose as a special placeholder collection (i.e. one that can - have s as elements - that will be resolved at runtime by an appropriate Spring.NET IoC container, just - implement this interface. -

-
- -

- Lets say one has a Bag class (i.e. a collection that supports bag style semantics). -

- - using System; - - using Spring.Objects.Factory.Support; - - namespace MyNamespace - { - public sealed class Bag : ICollection - { - // ICollection implementation elided for clarity... - - public void Add(object o) - { - // implementation elided for clarity... - } - } - - public class ManagedBag : Bag, IManagedCollection - { - public ICollection Resolve( - string objectName, RootObjectDefinition definition, - string propertyName, ManagedCollectionElementResolver resolver) - { - Bag newBag = new Bag(); - string elementName = propertyName + "[bag-element]"; - foreach(object element in this) - { - object resolvedElement = resolver(objectName, definition, elementName, element); - newBag.Add(resolvedElement); - } - return newBag; - } - } - } - -
- Rick Evans -
- - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Resolves a single element value of a managed collection. - - -

- If the does not need to be resolved or - converted to an appropriate , the - will be returned as-is. -

-
- - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - That element of a managed collection that may need to be resolved - to a concrete value. - - A fully resolved element. -
- - - Describes an object instance, which has property values, constructor - argument values, and further information supplied by concrete implementations. - - -

- This is just a minimal interface: the main intention is to allow - - (like PropertyPlaceholderConfigurer) to access and modify property values. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - Return the event handlers for any events exposed by this object. - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The name of the parent definition of this object definition, if any. - - - - - The target scope for this object. - - - - - Get the role hint for this object definition - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition. - - Note that this does not have to be the actual type name used at runtime, - in case of a child definition overrding/inheriting the the type name from its - parent. It can be modifed during object factory post-processing, typically - replacing the original class name with a parsed variant of it. - Hence, do not consider this to be the definitive bean type at runtime - but rather only use it for parsing purposes at the individual object - definition level. - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - implementation that - creates instances of the class. - - -

- Typically used for retrieving shared - instances for common topics (such as the 'DAL', 'BLL', etc). The - - property determines the name of the - Common.Logging logger. -

-
- Rick Evans - -
- - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The name of the instance served up by - this factory. - - - If the supplied is - or contains only whitespace character(s). - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object - managed by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The name of the instance served up by - this factory. - - - The name of the instance served up by - this factory. - - - If the supplied to the setter is - or contains only whitespace character(s). - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Tag subclass used to hold a dictionary of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Interface representing an object whose value set can be merged with that of a parent object. - - Rob Harrop - Mark Pollack (.NET) - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. - - - - - Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. - - The approximate number of elements that the object can initially contain. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the keys of this managed dictionary. - - The unresolved name for the type of the keys of this managed dictionary. - - - - Gets or sets the unresolved name for the - of the values of this managed dictionary. - - The unresolved name for the type of the values of this managed dictionary. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a list of managed elements. - - Rod Johnson - Rick Evans (.NET) - - - - Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. - - - - - Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. - - The number of elements that the new list can initially store. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed list. - - The unresolved name for the type of the elements of this managed list. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag class which represent a Spring-managed instance that - supports merging of parent/child definitions. - - - - - Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - - - - Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - The initial number of entries that the can contain. is less than zero. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a set of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed set. - - The unresolved name for the type of the elements of this managed set. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - An that returns a value - that is the result of a or instance method invocation. - - -

- Note that this class generally is expected to be used for accessing factory methods, - and as such defaults to operating in singleton mode. The first request to - - by the owning object factory will cause a method invocation, the return - value of which will be cached for all subsequent requests. The - property may be set to - , to cause this factory to invoke the target method each - time it is asked for an object. -

-

- A target method may be specified by setting the - property to a string representing - the method name, with specifying - the that the method is defined on. - Alternatively, a target instance method may be specified, by setting the - property as the target object, and - the property as the name of the - method to call on that target object. Arguments for the method invocation may be - specified by setting the property. -

-

- Another (esoteric) use case for this factory object is when one needs to call a method - that doesn't return any value (for example, a class method to - force some sort of initialization to happen)... this use case is not supported by - factory-methods, since a return value is needed to become the object. -

-

- - This class depends on the - - method being called after all properties have been set, as per the - contract. If you are - using this class outside of a Spring.NET IoC container, you must call one of either - or - yourself to ready the object's internal - state, or you will get a nasty . - -

-
- -

- The following example uses an instance of this class to call a - factory method... -

- - - - - - - - 1st - 2nd - and 3rd arguments - - - - -

- The following example is similar to the preceding example; the only pertinent difference is the fact that - a number of different objects are passed as arguments, demonstrating that not only simple value types - are valid as elements of the argument list... -

- - - - - - - - - - - 1st - - - - - - - http://www.springframework.net/ - - - - - -

- Named parameters are also supported... this next example yields the same results as - the preceding example (that did not use named arguments). -

- - - - - - - - - - 1st - and 3rd arguments - 2nd - - - - -

- Similarly, the following example uses an instance of this class to call an instance method... -

- - - - - - - - - -

- The above example could also have been written using an anonymous inner object definition... if the - object on which the method is to be invoked is not going to be used outside of the factory object - definition, then this is the preferred idiom because it limits the scope of the object on which the - method is to be invoked to the surrounding factory object. -

- - - - - - - - - - Colin Sampaleanu - Juergen Hoeller - Rick Evans (.NET) - Simon White (.NET) - - - - - - Specialisation of the class that tries - to convert the given arguments for the actual target method via an - appropriate implementation. - - Juergen Hoeller - Rick Evans - - - - - Helper class allowing one to declaratively specify a method call for later invocation. - - -

- Typically not used directly but via its subclasses such as - . -

-

- Usage: specify either the and - or the - and - properties respectively, and - (optionally) any arguments to the method. Then call the - method to prepare the invoker. - Once prepared, the invoker can be invoked any number of times. -

-
- -

- The following example uses the class to invoke the - ToString() method on the Foo class using a mixture of both named and unnamed - arguments. -

- - public class Foo - { - public string ToString(string name, int age, string address) - { - return string.Format("{0}, {1} years old, {2}", name, age, address); - } - - public static void Main() - { - Foo foo = new Foo(); - MethodInvoker invoker = new MethodInvoker(); - invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; - invoker.AddNamedArgument("age", 29); - invoker.Prepare(); - // at this point, the arguments that will be passed to the method invocation - // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} - string details = (string) invoker.Invoke(); - Console.WriteLine (details); - // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' - } - } - -
- Colin Sampaleanu - Juergen Hoeller - Simon White (.NET) -
- - - The used to search for - the method to be invoked. - - - - - The value returned from the invocation of a method that returns void. - - - - - The method that will be invoked. - - - - - Creates a new instance of the class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set, or a matching argument could not be found - for a named argument (typically down to a typo). - - - If the specified method could not be found. - -
- - - Searches for and returns the method that is to be invoked. - - - The return value of this method call will subsequently be returned from the - . - - The method that is to be invoked. - - If no method could be found. - - - If more than one method was found. - - - - - Adds the named argument to this instances mapping of argument names to argument values. - - - The name of an argument on the method that is to be invoked. - - - The value of the named argument on the method that is to be invoked. - - - - - Returns the prepared object that - will be invoked. - - -

- A possible use case is to determine the return of the method. -

-
- - The prepared object that - will be invoked. - -
- - - Invoke the specified method. - - -

- The invoker needs to have been prepared beforehand (via a call to the - method). -

-
- - The object returned by the method invocation, or - if the method returns void. - - - If at least one of the arguments passed to this - was incompatible with the signature of the invoked method. - -
- - - The target on which to call the target method. - - -

- Only necessary when the target method is ; - else, a target object needs to be specified. -

-
-
- - - The target object on which to call the target method. - - -

- Only necessary when the target method is not ; - else, a target class is sufficient. -

-
-
- - - The name of the method to be invoked. - - -

- Refers to either a method - or a non- method, depending on - whether or not a target object has been set. -

-
- -
- - - Arguments for the method invocation. - - -

- Ordering is significant... the order of the arguments in this - property must match the ordering of the various parameters on the target - method. There does however exist a small possibility for confusion when - the arguments in this property are supplied in addition to one or more named - arguments. In this case, each named argument is slotted into the index position - corresponding to the named argument... once once all named arguments have been - resolved, the arguments in this property are slotted into any remaining (empty) - slots in the method parameter list (see the example in the overview of the - class if this is not clear). -

-

- If this property is not set, or the value passed to the setter invocation - is or a zero-length array, a method with no (un-named) arguments is assumed. -

-
- -
- - - The resolved arguments for the method invocation. - - - - This property is not set until the target method has been resolved via a call to the - method). It is a combination of the - named and plain vanilla arguments properties, and it is this object array that - will actually be passed to the invocation of the target method. - -

- Setting the value of this property to results in basically clearing out any - previously prepared arguments... another call to the - method will then be required to prepare the arguments again (or the prepared arguments - can be set explicitly if so desired). -

-
- - -
- - - Named arguments for the method invocation. - - -

- The keys of this dictionary are the () names of the - method arguments, and the () values are the actual - argument values themselves. -

-

- If this property is not set, or the value passed to the setter invocation - is a reference, a method with no named arguments is assumed. -

-
- -
- - - Creates a new instance of the - class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set. - - - If the specified method could not be found. - -
- - - Register the given custom - for all properties of the given . - - - The of property. - - - The to register. - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - -

- Returns the return value of the method that is to be invoked. -

-

- Will return the same value each time if the - - property value is . -

-
- - An instance (possibly shared or independent) of the object managed by - this factory. - - -
- - - Prepares this method invoker. - - - If all required properties are not set. - - - If the specified method could not be found. - - - - - - If a singleton should be created, or a new object on each request. - Defaults to . - - - - - Return the return value of the method - that this factory invokes, or if not - known in advance. - - -

- If the return value of the method that this factory is to invoke is - , then the - will be returned (in accordance with the - contract that - treats a value as a configuration error). -

-
- -
- - - Holder for an with - name and aliases. - - -

- Recognized by - - for inner object definitions. Registered by - , - which also uses it as general holder for a parsed object definition. -

-

- Can also be used for programmatic registration of inner object - definitions. If you don't care about the functionality offered by the - interface and the like, - registering - or is good enough. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - - The name of the object definition. - - - - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - The name of the object. - - Any aliases for the supplied - - - - - The held by this - instance. - - - - - The name of the object definition. - - - - - Any aliases for the object definition. - - -

- Guaranteed to never return ; if the associated - - does not have any aliases associated with it, then an empty - array will be returned. -

-
-
- - - Visitor class for traversing objects, in particular - the property values and constructor arguments contained in them resolving - object metadata values. - - - Used by and - to parse all string values contained in a ObjectDefinition, resolving any placeholders found. - - Mark Pollack - - - - Initializes a new instance of the class. - - The handler to be called for resolving variables contained in a string. - - - - Initializes a new instance of the class - for subclassing - - Subclasses should override the ResolveStringValue method - - - - Traverse the given ObjectDefinition object and the MutablePropertyValues - and ConstructorArgumentValues contained in them. - - The object definition to traverse. - - - - Visits the ObjectDefinition property ObjectTypeName, replacing string values using - the specified IVariableSource. - - The object definition. - - - - Visits the property values of the ObjectDefinition, replacing string values - using the specified IVariableSource. - - The object definition. - - - - Visits the indexed constructor argument values, replacing string values using the - specified IVariableSource. - - The indexed argument values. - - - - Visits the named constructor argument values, replacing string values using the - specified IVariableSource. - - The named argument values. - - - - Visits the generic constructor argument values, replacing string values using - the specified IVariableSource. - - The genreic argument values. - - - - Configures the constructor argument ValueHolder. - - The vconstructor alue holder. - - - - Resolves the given value taken from an object definition according to its type - - the value to resolve - the resolved value - - - - Visits the ManagedList property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet properties KeyTypeName and ValueTypeName and - calls for dictionary's value element. - - - - - Visits the elements of a NameValueCollection and calls - for value of each element. - - - - - calls the to resolve any variables contained in the raw string. - - the raw string value containing variable placeholders to be resolved - If no has been configured. - the resolved string, having variables being replaced, if any - - - - Returns a value that is an - that - returns an object from an - . - - -

- The primary motivation of this class is to avoid having a client object - directly calling the - - method to get a prototype object out of an - , which would be a - violation of the inversion of control principle. With the use of this - class, the client object can be fed an - as a property - that directly returns one target prototype object. -

-

- The object referred to by the value of the - - property does not have to be a prototype object, but there is little - to no point in using this class in conjunction with a singleton object. -

-
- -

- The following XML configuration snippet illustrates the use of this - class... -

- - - - - - - - - - - - - - - - Colin Sampaleanu - Simon White (.NET) - - - - Interface to be implemented by objects that wish to be aware of their owning - . - - -

- For example, objects can look up collaborating objects via the factory. -

-

- Note that most objects will choose to receive references to collaborating - objects via respective properties and / or an appropriate constructor. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - 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. - -
- - - Returns an instance of the object factory. - - The object factory. - - - - Invoked by an - after it has set all supplied object properties. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Sets the name of the target object. - - - - - 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 of object created by this factory. - - - - - Interface defining a factory which can return an object instance - (possibly shared or independent) when invoked. - - - This interface is typically used to encapsulate a generic factory - which returns a new instance (prototype) on each invocation. - It is similar to the , but - implementations of the aforementioned interface are normally meant to be defined - as instances by the user in an , - while implementations of this class are normally meant to be fed as a property to - other objects; as such, the - method - has different exception handling behavior. - - Colin Sampaleanu - Simon White (.NET) - - - - Return an instance (possibly shared or independent) - of the object managed by this factory. - - - An instance of the object (should never be ). - - - - - Creates a new instance of the GenericObjectFactory class. - - - The enclosing - . - - - - - Returns the object created by the enclosed object factory. - - The created object. - - - - An implementation - that exposes an arbitrary target object under a different name. - - -

- Usually, the target object will reside in a different object - definition file, using this - to link it in - and expose it under a different name. Effectively, this corresponds - to an alias for the target object. -

- - For XML based object definition files, a <alias> - tag is available that effectively achieves the same. - -
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Initialize a new default instance - - - - - Initialize this instance with the predefined and . - - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The name of the target object. - - -

- The target object may potentially be defined in a different object - definition file. -

-
- The name of the target object. -
- - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Callback that supplies the owning factory to an object instance. - - - The owning - (may not be ). The object can immediately - call methods on the factory. - - - In case of initialization errors. - - - - - - - Erich Eichinger - - - - Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. - - - - - Role hint indicating that a is a supporting - part of some larger configuration, typically an outer ComponentDefinition - SUPPORT objects are considered important enough to be aware - of when looking more closely at a particular ComponentDefinition, - but not when looking at the overall configuration of an application. - - - - - Role hint indicating that a is providing an - entirely background role and has no relevance to the end-user. This hint is - used when registering objects that are completely part of the internal workings - of a ComponentDefinition. - - - - - Implementation of that - resolves variable name against Java-style property file. - - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets the locations of the property files - to read properties from. - - - The locations of the property files - to read properties from. - - - - - Convinience property. Gets or sets a single location - to read properties from. - - - A location to read properties from. - - - - - Sets a value indicating whether to ignore resource locations that do not exist. This will call - the Exists property. - - - true if one should ignore missing resources; otherwise, false. - - - - - Overrides default values in one or more object definitions. - - -

- Instances of this class override already existing values, and is - thus best suited to replacing defaults. If you need to replace - placeholder values, consider using the - - class instead. -

-

- In contrast to the - - class, the original object definition can have default - values or no values at all for such object properties. If an overriding - configuration file does not have an entry for a certain object property, - the default object value is left as is. Also note that it is not - immediately obvious to discern which object definitions will be mutated by - one or more - s - simply by looking at the object configuration. -

-

- Each line in a referenced configuration file is expected to take the - following form... -

- - - -

- The name.property key refers to the object name and the - property that is to be overridden; and the value is the overridding - value that will be inserted into the appropriate object definition's - named property. -

-

- Please note that in the case of multiple - s - that define different values for the same object definition value, the - last overridden value will win (due to the fact that the values - supplied by previous - s - will be overridden). -

-
- -

- The following XML context definition defines an object that has a number - of properties, all of which have default values... -

- - - - - - - - -

- What follows is a .NET config file snippet for the above example (assuming - the need to override one of the default values)... -

- - - - - - -
- Juergen Hoeller - Simon White (.NET) - - - -
- - - Allows for the configuration of individual object property values from - a .NET .config file. - - -

- Useful for custom .NET .config files targetted at system administrators - that override object properties configured in the application context. -

-

- Two concrete implementations are provided in the Spring.NET core library: - - - - - for <add key="placeholderKey" value="..."/> style - overriding (pushing values from a .NET .config file into object - definitions). - - - - - - for replacing "${...}" placeholders (pulling values from a .NET .config - file into object definitions). - - - -

-

- Please refer to the API documentation for the concrete implementations - listed above for example usage. -

-
- Juergen Hoeller - Simon White (.NET) - - -
- - - The default configuration section name to use if none is explictly supplied. - - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Modify the application context's internal object factory after its - standard initialization. - - - The object factory used by the application context. - - - In case of errors. - - - - - - Loads properties from the configuration sections - specified in into . - - The instance to be filled with properties. - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Validates the supplied . - - -

- Basically, if external locations are specified, ensure that either - one or a like number of config sections are also specified. -

-
- - The to be validated. - -
- - - Simply initializes the supplied - collection with this instances default - (if any). - - - The collection to be so initialized. - - - - - The policy for resolving conflicting property overrides from - several resources. - - -

- When merging conflicting property overrides from several resources, - should append an override with the same key be appended to the - current value, or should the property override from the last resource - processed override previous values? -

-

- The default value is ; i.e. a property - override from the last resource to be processed overrides previous - values. -

-
- - if the property override from the last resource - processed overrides previous values. - -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - The default properties to be applied. - - -

- These are to be considered defaults, to be overridden by values - loaded from other resources. -

-
-
- - - The location of the .NET .config file that contains the property - overrides that are to be applied. - - - - - The locations of the .NET .config files containing the property - overrides that are to be applied. - - - - - The configuration sections to look for within the .config files. - - - - - - - Should a failure to find a .config file be ignored? - - -

- is only appropriate if the .config file is - completely optional. The default is . -

-
- - if a failure to find a .config file is to be - ignored. - -
- - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Process the given key as 'name.property' entry. - - - The object factory containing the object definitions that are to be - processed. - - The key. - The value. - - If an error occurs. - - - If the property was not well formed (i.e. not in the format "name.property"). - - - - - implementation that - evaluates a property path on a given target object. - - -

- The target object can be specified directly or via an object name (see - example below). -

-

- Please note that the - is an implementation, and as such has - to comply with the contract of the - interface; more specifically, this means that the end result of the property lookup path - evaluation cannot be ( - implementations are not permitted to return ). If the resut of a - property lookup path evaluates to , an exception will be thrown. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Juergen Hoeller - Rick Evans (.NET) - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The target object that the property path lookup is to be applied to. - - -

- This would most likely be an inner object, but can of course be - any object reference. -

-
- - The target object that the property path lookup is to be applied to. - - -
- - - The (object) name of the target object that the property path lookup - is to be applied to. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this name prior to resolution. The implication of this is that - one cannot use the - class in conjunction with object names that start or end with whitespace. -

-
- - The (object) name of the target object that the property path lookup - is to be applied to. - - -
- - - The property (lookup) path to be applied to the target object. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this path prior to resolution. Whitespace is not a valid - identifier for property names (in part or whole) in CLS-based languages, - so this is a not unreasonable action. Please also note that whitespace - that is embedded within the property path will be left as-is (which may - or may not result in an error being thrown, depending on the context of - the whitespace). -

-
- -

- Examples of such property lookup paths can be seen below; note that - property lookup paths can be nested to an arbitrary level. -

- - name.length - accountManager.account['the key'].name - accounts[0].name - -
- - The property (lookup) path to be applied to the target object. - -
- - - The 'expected' of the result from evaluating the - property path. - - -

- This is not necessary for directly specified target objects, or - singleton target objects, where the can - be determined via reflection. Just specify this in case of a - prototype target, provided that you need matching by type (for - example, for autowiring). -

-

- It is permissable to set the value of this property to - (which in any case is the default value). -

-
- - The 'expected' of the result from evaluating the - property path. - -
- - - 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? - - - - - - Set the name of the object in the object factory that created this object. - - -

- The object name of this - - will be interpreted as "objectName.property" pattern, if neither the - - - have been supplied (set). -

-

- This allows for concise object definitions with just an id or name. -

-
- - The name of the object in the factory. - -
- - - 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. - - - - - Resolves placeholder values in one or more object definitions. - - -

- The default placeholder syntax follows the NAnt style: ${...}. - Instances of this class can be configured in the same way as any other - object in a Spring.NET container, and so custom placeholder prefix - and suffix values can be set via the - and properties. -

- -

- The following example XML context definition defines an object that has - a number of placeholders. The placeholders can easily be distinguished - by the presence of the ${} characters. -

- - - - - - - - -

- The associated XML configuration file for the above example containing the - values for the placeholders would contain a snippet such as .. -

- - - - - - - - -

- The preceding XML snippet listing the various property keys and their - associated values needs to be inserted into the .NET config file of - your application (or Web.config file for your ASP.NET web application, - as the case may be), like so... -

- - - - - - - - -
-

- - checks simple property values, lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. -

- - - - - - - - -

- In contrast to the - - class, this configurer only permits the replacement of explicit - placeholders in object definitions. Therefore, the original definition - cannot specify any default values for its object properties, and the - placeholder configuration file is expected to contain an entry for each - defined placeholder. That is, if an object definition contains a - placeholder ${foo}, there should be an associated - <add key="foo" value="..."/> entry in the - referenced placeholder configuration file. Default property values - can be defined via the inherited - - collection to overcome any perceived limitation of this feature. -

-

- If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. If you want to resolve properties from multiple configuration - resources, simply specify multiple resources via the - - property. Finally, please note that you can also define multiple - - instances, each with their own custom placeholder syntax. -

-
- Juergen Hoeller - Simon White (.NET) - - - -
- - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Initializes the new instance - - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Parse values recursively to be able to resolve cross-references between - placeholder values. - - - The map of constructor arguments / property values. - - The string to be resolved. - The placeholders that have already been visited - during the current resolution attempt (used to detect circular references - between placeholders). Only non-null if we're parsing a nested placeholder. - - If an error occurs. - - The resolved string. - - - - Resolve the given placeholder using the given name value collection, - performing an environment variables check according to the given mode. - - -

- The default implementation delegates to - - before/afer the environment variable check. Subclasses can override - this for custom resolution strategies, including customized points - for the environment properties check. -

-
- The placeholder to resolve - - The merged name value collection of this configurer. - - The environment variable mode. - - The resolved value or if none. - - -
- - - Resolve the given placeholder using the given name value collection. - - -

- This (the default) implementation simply looks up the value of the - supplied key. -

-

- Subclasses can override this for customized placeholder-to-key - mappings or custom resolution strategies, possibly just using the - given name value collection as fallback. -

-
- The placeholder to resolve. - - The merged name value collection of this configurer. - - The resolved value. -
- - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Controls how environment variables will be used to - replace property placeholders. - - -

- See the overview of the - - enumeration for the available options. -

-
-
- - - implementation that - retrieves a or non-static public property value. - - -

- Typically used for retrieving public property values. -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - Template method that subclasses must override to construct the object - returned by this factory. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - The of the static property - to be retrieved. - - - - - Arguments for the property invocation. - - -

- If this property is not set, or the value passed to the setter invocation - is a null or zero-length array, a property with no arguments is assumed. -

-
-
- - - The name of the property the value of which is to be retrieved. - - -

- Refers to either a property or a non-static property, - depending on a target object being set. -

-
-
- - - The object instance on which the property is defined. - - - - - The on which the property is defined. - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - Implementation of that - resolves variable name against registry key. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, - strings are concatenated to a comma-separated list following - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets the registry key to obtain variable values from. - - - The registry key to obtain variable values from. - - - - - - implementation that allows for convenient registration of custom - IResource implementations. - - -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of IResources is required. -

-
- Mark Pollack - - -
- - - Registers custom IResource implementations. The supplied - is not used since IResourse implementations - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The IResource implementations, i.e. resource handlers, to register. - - -

- The has the - contains the resource protocol name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - The value can be the fully qualified name of the IResource - implementation, a string, or - an actual of the IResource class - -

-
-
- - - A convenience class to create a - given the resource base - name and assembly name. - - -

- This is currently the preferred way of injecting resources into view - tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). - A GUI component (typically a Windows Form) is injected with - an instance, and can - then proceed to use the various GetXxx() methods on the - to retrieve images, - strings, custom resources, etc. -

-
- Mark Pollack - - - -
- - - Creates a . - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The root name of the resources. - - -

- For example, the root name for the resource file named - "MyResource.en-US.resources" is "MyResource". -

- - The namespace is also prefixed before the resource file name. - -
-
- - - The string representation of the assembly that contains the resource. - - - - - The . - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to another object in this factory to be resolved at runtime. - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - -

- This does not mark this object as being a reference to - another object in any parent factory. -

-
- The name of the target object. -
- - - Creates a new instance of the - - class. - - -

- This variant constructor allows a client to specifiy whether or not - this object is a reference to another object in a parent factory. -

-
- The name of the target object. - - Whether this object is an explicit reference to an object in a - parent factory. - -
- - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Return the target object name. - - - - - Is this is an explicit reference to an object in the parent - factory? - - - if this is an explicit reference to an - object in the parent factory. - - - - - Simple factory object for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target set. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - Configure all ISharedStateAware objects, delegating concrete handling to the list of . - - - - - Creates a new empty instance. - - - - - Creates a new preconfigured instance. - - - priority value affecting order of invocation of this processor. See interface. - - - - Iterates over configured list of s until - the first provider is found that
- a) true == provider.CanProvideState( instance, name )
- b) null != provider.GetSharedState( instance, name )
-
-
- - - A NoOp for this processor - - - The new object instance. - - - The name of the object. - - - the original . - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Get/Set the (already ordererd!) list of instances. - - - If this list is not set, the containing object factory will automatically - be scanned for instances. - - - - - Implementation of that - resolves variable name against special folders (as defined by - enumeration). - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves specified special folder to its full path. - - - The name of the special folder to resolve. Should be one of the values - defined by the enumeration. - - - The folder path if able to resolve, null otherwise. - - - - - - implementation that allows for convenient registration of custom - type aliases. - - - Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of type aliases is required. -

-
- Mark Pollack - - -
- - - Registers any type aliases. The supplied - is not used since type aliases - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The type aliases to register. - - -

- The has the - contains the alias name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - the value can be the fully qualified name of the type as a string or - an actual of the class that - being aliased. -

-
-
- - - Holder for a typed value. - - -

- Can be added to object definitions to explicitly specify - a target type for a value, - for example for collection - elements. -

-

- This holder just stores the value and the target - . The actual conversion will be performed by - the surrounding object factory. -

-
- Juergen Hoeller - Rick Evans (.NET) - Bruno Baia (.NET) -
- - - Creates a new instance of the - - class. - - - - - Initializes a new instance of the class. - - The value. - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The to convert to. - - - If the supplied is - . - - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The unresolved type to convert to. - - - If the supplied is a - or an empty string. - - - - - Determine the type to convert to, resolving it from a specified type name if necessary. - - The resolved type to convert to. - - - - The value that is to be converted. - - -

- Obviously if the - - is the , no conversion - will actually be performed. -

-
-
- - - The to convert to. - - - If the setter is supplied with a value. - - - - - The unresolved type to convert to. - - - If the setter is supplied with a value or an empty string. - - - - - Gets a value indicating whether this instance has target type. - - - true if this instance has target type; otherwise, false. - - - - - Provides methods for type-safe accessing s. - - Erich Eichinger - - - - Initialize a new instance of an - - The underlying to read values from. - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - An of 's type that contains the value of the specified variable - or , if returns null. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - An of 's type that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns or . - - A that contains the value of the specified variable - or , if returns null. - - - - - Resolves placeholder values in one or more object definitions - - - The placeholder syntax follows the NAnt style: ${...}. - Placeholders values are resolved against a list of - s. In case of multiple definitions - for the same property placeholder name, the first one in the - list is used. - Variable substitution is performed on simple property values, - lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. - - - - - - - - - - If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. - - Mark Pollack - - - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Create a new instance without any variable sources - - - - - Create a new instance and initialize with the given variable source - - - - - - Create a new instance and initialize with the given list of variable sources - - - - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Apply the property replacement using the specified s for all - object in the supplied - . - - - The - used by the application context. - - - If an error occured. - - - - - Sets the list of s that will be used to resolve placeholder names. - - A list of s. - - - - Sets that will be used to resolve placeholder names. - - A instance. - - - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - Initializes a new instance of the Location class. - - - - - - - Initializes a new instance of the Location class. - - - - - - Thrown when an - encounters an internal error, and its definitions are invalid. - - -

- An example of a situation when this exception would be thrown is - in the case of an XML document containing object definitions being - malformed. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectDefinitionStoreException class. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The description of the resource associated with the object - - - - - The name of the object that trigger the exception. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Initializes a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Initializes a new instance of the class. - - The message. - The location. - - - - Initializes a new instance of the Problem class. - - - - - - - - Context that gets passed along an object definition reading process, - encapsulating all relevant configuraiton as well as state. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The resource. - - - - Gets the resource. - - The resource. - - - - Abstract superclass - that implements default object creation. - - -

- Provides object creation, initialization and wiring, supporting - autowiring and constructor resolution. Handles runtime object - references, managed collections, and object destruction. -

-

- The main template method to be implemented by subclasses is - , - used for autowiring by type. Note that this class does not implement object - definition registry capabilities - ( - does). -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Abstract superclass for - implementations. - - -

- This class provides singleton / prototype determination, singleton caching, - object definition aliasing, - handling, and object definition merging for child object definitions. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Marker object to be temporarily registered in the singleton cache, - while instantiating an object (in order to be able to detect circular references). - - - - - Used as value in hashtable that keeps track of singleton names currently in the - process of being created. Would not be necessary if we created a case insensitive implementation of - ISet. - - - - - The instance for this class. - - - - - Cache of singleton objects created by s: FactoryObject name -> product - - - - - Creates a new instance of the - class. - - -

- This constructor implicitly creates an - - that treats the names of objects in this factory in a case-sensitive fashion. -

-

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - -
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - - - Any parent object factory; may be . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - In case of errors. - -
- - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - In case of errors. - -
- - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Create instance only - suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself, - nor throw an exception. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Does this object factory contain an object definition with the - supplied ? - - -

- Does not consider any hierarchy this factory may participate in. - Invoked by - - when no cached singleton instance is found. -

-
- - The name of the object to look for. - - - if this object factory contains an object - definition with the supplied . - -
- - - Adds the supplied (object) to this factory's - singleton cache. - - -

- To be called for eager registration of singletons, e.g. to be able to - resolve circular references. -

- - If a singleton has already been registered under the same name as - the supplied , then the old singleton will - be replaced. - -
- The name of the object. - The singleton object. - - If the argument is - or consists wholly of whitespace characters; or if the - is . - -
- - - Return the object name, stripping out the factory dereference prefix if - necessary, and resolving aliases to canonical names. - - - The transformed name of the object. - - - - - Ensures, that the given name is prefixed with - if it incidentially already starts with this prefix. This avoids troubles when dereferencing - the object name during - - - - - Determines whether the specified name is defined as an alias as opposed - to the name of an actual object definition. - - The object name to check. - - true if the specified name is alias; otherwise, false. - - - - - Return a , - even by traversing parent if the parameter is a child definition. - - - The name of the object. - - - Are ancestors to be included in the merge? - - -

- Will ask the parent object factory if not found in this instance. -

-
- - A merged - with overridden properties. - -
- - - Return a , - even by traversing parent if the parameter is a child definition. - - - A merged - with overridden properties. - - - - - Creates the root object definition. - - The template definition to base root definition on. - Root object definition. - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Gets the type for the given FactoryObject. - - The factory object instance to check. - the FactoryObject's object type - - - - Gets the object type for the given FactoryObject definition, as far as possible. - Only called if there is no singleton instance registered for the target object already. - - - The default implementation creates the FactoryObject via GetObject - to call its ObjectType property. Subclasses are encouraged to optimize - this, typically by just instantiating the FactoryObject but not populating it yet, - trying whether its ObjectType property already returns a type. - If no type found, a full FactoryObject creation as performed by this implementation - should be used as fallback. - - Name of the object. - The merged object definition for the object. - The type for the object if determinable, or null otherwise - - - - Predict the eventual object type (of the processed object instance) for the - specified object. - - - Does not need to handle FactoryObjects specifically, since it is only - supposed to operate on the raw object type. - This implementation is simplistic in that it is not able to - handle factory methods and InstantiationAwareBeanPostProcessors. - It only predicts the object type correctly for a standard object. - To be overridden in subclasses, applying more sophisticated type detection. - - Name of the object. - The merged object definition to determine the type for. May be null - The type of the object, or null if not predictable - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - - The name that may include the factory dereference prefix. - - The object instance. - - The singleton instance of the object. - - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - The object instance. - - The name that may include the factory dereference prefix (=the requested name). - - - The canonical object name - - the merged object definition - - The singleton instance of the object. - - - - - Obtain an object to expose from the given IFactoryObject. - - The IFactoryObject instance. - Name of the object. - The merged object definition. - The object obtained from the IFactoryObject - If IFactoryObject object creation failed. - - - - Post-process the given object that has been obtained from the FactoryObject. - The resulting object will be exposed for object references. - - The default implementation simply returns the given object - as-is. Subclasses may override this, for example, to apply - post-processors. - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Convenience method to pull an - from this factory. - - - The name of the factory object to be retrieved. If this name is not a valid - name, it will be converted - into one. - - - The associated with the - supplied . - - - - - Is the supplied a factory object dereference? - - - - - Determines whether the type of the given object definition matches the - specified target type. - - Allows for lazy load of the actual object type, provided that the - type match can be determined otherwise. - The default implementation simply delegates to the standard - ResolveObjectType method. Subclasses may override this to use - a differnt strategy. - - Name of the object (for error handling purposes). - The merged object definition to determine the type for. - Type to match against (never null). - - true if object definition matches tye specified target type; otherwise, false. - - if we failed to load the type." - - - - Resolves the type of the object for the specified object definition resolving - an object type name to a Type (if necessary) and storing the resolved Type - in the object definition for further use. - - The merged object definition to dertermine the type for. - Name of the object (for error handling purposes). - - - - - Is the object (definition) with the supplied an - ? - - The name of the object to be checked. - - the object (definition) with the supplied - an ? - - - - - Remove the object identified by the supplied - from this factory's singleton cache. - - - The name of the object that is to be removed from the singleton - cache. - - - If the argument is or - consists wholly of whitespace characters. - - - - - Return the names of objects in the singleton cache that match the given - object type (including subclasses). - - - The class or interface to match, or for all object names. - - -

- Will not consider s - as the type of their created objects is not known before instantiation. -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of objects in the singleton cache that match the given - object type (including subclasses), or an empty array if none. - -
- - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determines the of the object with the - supplied . - - -

- More specifically, checks the of object that - would return. - For an , returns the - of object that the - creates. -

-

- Please note that (prototype) objects created via a factory method or - objects are handled - slightly differently, in that we don't want to needlessly create - instances of such objects just to determine the - of object that they create. -

-
- The name of the object to query. - - The of the object or - if not determinable. - -
- - - Determines the of the object defined - by the supplied object . - - -

- This, the default, implementation returns - to indicate that the type cannot be determined. Subclasses are - encouraged to try to determine the actual return - here, matching their strategy of resolving - factory methods in the - Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject - implementation. -

-
- - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - -
- - - Returns the names of the objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The names of the objects in the singleton cache. -
- - - Returns the number of objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The number of objects in the singleton cache. -
- - - Destroys the named singleton object. - - -

- Delegates to - - if a corresponding singleton instance is found. -

-
- - The name of the singleton object that is to be destroyed. - - -
- - - Check the supplied merged object definition for any possible - validation errors. - - - The object definition to be checked for validation errors. - - - The name of the object associated with the supplied object definition. - - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - - In the case of object validation errors. - - - - - Parent object factory, for object inheritance support - - - - - Dependency types to ignore on dependency check and autowire, as Set of - Type objects: for example, string. Default is none. - - - - - ObjectPostProcessors to apply in CreateObject - - - - - Indicates whether any IInstantiationAwareBeanPostProcessors have been registered - - - - - Indicates whether any IDestructionAwareBeanPostProcessors have been registered - - - - - Set of registered singletons, containing the bean names in registration order - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Is this object a singleton? - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Does this object factory or one of its parent factories contain an object with the given name? - - - This method scans the object factory hierarchy starting with the current factory instance upwards. - Use if you want to explicitely check just this object factory instance. - - . - - - - Return the aliases for the given object name, if defined. - - . - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Return an instance (possibly shared or independent) of the given object name. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name, - optionally injecting dependencies. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - whether to inject dependencies or not. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - - Checks, if the passed instance is of the required type. - - the name of the object - the actual instance - the type contract the given instance must adhere. - the object instance passed in via (for more fluent usage) - - if is null or not assignable to . - - - - - Creates a singleton instance for the specified object name and definition. - - - The object name (will be used as the key in the singleton cache key). - - The object definition. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The created object instance. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - - - - Destroy all cached singletons in this factory. - - - - - Ignore the given dependency type for autowiring - - . - - - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - - The - to register. - - . - - - - Given an object name, create an alias. - - . - - - - Register the given custom - for all properties of the given . - - . - - - - Register the given existing object as singleton in the object factory, - under the given object name. - - . - - - - Does this object factory contains a singleton instance with the - supplied ? - - - - - - Tries to find a cached object for the specified name. - - Teh object name to look for. - The cached object if found, otherwise. - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - Name of the object to check. - - true if is object name in use; otherwise, false. - - - - - Gets the singleton lock for a given object name. - - Name of the object. - lock object - - - - Returns, whether this factory treats object names case sensitive or not. - - - - - Gets the of - s - that will be applied to objects created by this factory. - - - - - Gets the set of classes that will be ignored for autowiring. - - -

- The elements of this are - s. -

-
-
- - - Returns, whether this object factory instance contains objects. - - - - - Returns, whether this object factory instance contains objects. - - - - - Gets the temporary object that is placed - into the singleton cache during object resolution. - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - The parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Returns the current number of registered - s. - - - The current number of registered - s. - - . - - - - Gets the names of singleton objects registered in this registry. - - The list of names as String array (never null). - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - - - - - - - Gets the number of singleton beans registered in this registry. - - The number of singleton objects. - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - - - - - - - Makes a distinction between sort order and object identity. - This is important when used with , since most - implementations assume Order == Identity - - - - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - The used during the invocation and - searching for of methods. - - - - - The instance for this class. - - - - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. -
- - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. - The parent object factory, or if none. -
- - - Predict the eventual object type (of the processed object instance) for the - specified object. - - Name of the object. - The merged object definition to determine the type for. May be null - - The type of the object, or null if not predictable - - - - - Determines the of the object defined - by the supplied object . - - - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - - - Apply any - s. - - -

- The returned instance may be a wrapper around the original. -

-
- - The of the object that is to be - instantiated. - - - The name of the object that is to be instantiated. - - - An instance to use in place of the original instance. - - - In case of errors. - -
- - - Apply the given property values, resolving any runtime references - to other objects in this object factory. - - - The object name passed for better exception information. - - - The definition of the named object. - - - The wrapping the target object. - - - The new property values. - - -

- Must use deep copy, so that we don't permanently modify this property. -

-
-
- - - Create the value resolver strategy to use for resolving raw property values - - - - - Return an array of object-type property names that are unsatisfied. - - -

- These are probably unsatisfied references to other objects in the - factory. Does not include simple properties like primitives or - s. -

-
- - An array of object-type property names that are unsatisfied. - - - The definition of the named object. - - - The wrapping the target object. - -
- - - Destroy all cached singletons in this factory. - - -

- To be called on shutdown of a factory. -

-
-
- - - Populate the object instance in the given - with the property values from the - object definition. - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Wires up any exposed events in the object instance in the given - with any event handler - values from the . - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Fills in any missing property values with references to - other objects in this factory if autowire is set to - . - - - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - - - - - Defines "autowire by type" (object properties by type) behavior. - - -

- This is like PicoContainer default, in which there must be exactly one object - of the property type in the object factory. This makes object factories simple - to configure for small namespaces, but doesn't work as well as standard Spring - behavior for bigger applications. -

-
- - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - -
- - - Ignore the given dependency type for autowiring - - - This will typically be used by application contexts to register - dependencies that are resolved in other ways, like IOjbectFactory through - IObjectFactoryAware or IApplicationContext through IApplicationContextAware. - By default, IObjectFactoryAware and IObjectName interfaces are ignored. - For further types to ignore, invoke this method for each type. - - . - - - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Add the created, but yet unpopulated singleton to the singleton cache - to be able to resolve circular references - - the name of the object to add to the cache. - the definition used to create and populated the object. - the raw object instance. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Remove the specified singleton from the singleton cache that has - been added before by a call to - - the name of the object to remove from the cache. - the definition used to create and populated the object. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Creates an instance from the passed in - using constructor - - The name of the object to create - used for error messages. - The describing the object to be created. - optional arguments to pass to the constructor - An wrapping the already instantiated object - - - - Instantiates the given object using its default constructor - - Name of the object. - The definition. - IObjectWrapper for the new instance - - - - Determines candidate constructors to use for the given object, checking all registered - - - Raw type of the object. - Name of the object. - the candidate constructors, or null if none specified - In case of errors - - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - "autowire constructor" (with constructor arguments by type) behaviour. - - The name of the object to autowire by type. - The object definition to update through autowiring. - The chosen candidate constructors. - The argument values passed in programmatically via the GetObject method, - or null if none (-> use constructor argument values from object definition) - - An for the new instance. - - - - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: in this mode, a Spring.NET - object factory is able to host components that expect constructor-based - dependency resolution. - - - - - - Perform a dependency check that all properties exposed have been set, if desired. - - -

- Dependency checks can be objects (collaborating objects), simple (primitives - and ), or all (both). -

-
- - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - The property values to be checked. - - - If all of the checked dependencies were not satisfied. - -
- - - Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding - ignored dependency types. - - The object wrapper the object was created with. - The filtered PropertyInfos - - - - Determine whether the given bean property is excluded from dependency checks. - This implementation excludes properties whose type matches an ignored dependency type - or which are defined by an ignored dependency interface. - - - - the of the object property - whether the object property is excluded - - - - Give an object a chance to react now all its properties are set, - and a chance to know about its owning object factory (this object). - - -

- This means checking whether the object implements - and / or - , and invoking the - necessary callback(s) if it does. -

-

- Custom init methods are resolved in a case-insensitive manner. -

-
- - The new object instance we may need to initialise. - - - The name the object has in the factory. Used for logging output. - - - The definition of the target object instance. - -
- - - Invoke the specified custom destroy method on the given object. - - -

- This implementation invokes a no-arg method if found, else checking - for a method with a single boolean argument (passing in "true", - assuming a "force" parameter), else logging an error. -

-

- Can be overridden in subclasses for custom resolution of destroy - methods with arguments. -

-

- Custom destroy methods are resolved in a case-insensitive manner. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself. - Should not throw any exceptions. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Destroys all of the objects registered as dependant on the - object (definition) identified by the supplied . - - - The name of the root object (definition) that is itself being destroyed. - - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - Find object instances that match the required . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The of the objects to look up. - - - An of object names and object - instances that match the required , or - if none are found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - Called by DestroyObject, to be able to destroy depending objects first. - - - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Configures object instance by injecting dependencies, satisfying Spring lifecycle - interfaces and applying object post-processors. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - A wrapped object instance that is to be so configured. - - - - - - Applies the PostProcessAfterInitialization callback of all - registered IObjectPostProcessors, giving them a chance to post-process - the object obtained from IFactoryObjects (for example, to auto-proxy them) - - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - If the supplied is not one of the - or - - values. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Cache of filtered PropertyInfos: object Type -> PropertyInfo array - - - - - Dependency interfaces to ignore on dependency check and autowire, as Set of - Class objects. By default, only the IObjectFactoryAware and IObjectNameAware - interfaces are ignored. - - - - - The - implementation to be used to instantiate managed objects. - - - - - An - implementation that provides some convenience support for - derived classes. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Permits the (re)implementation of an arbitrary method on a Spring.NET - IoC container managed object. - - -

- Encapsulates the notion of the Method-Injection form of Dependency - Injection. -

-

- Methods that are dependency injected with implementations of this - interface may be (but need not be) , in which - case the container will create a concrete subclass of the - class prior to instantiation. -

-

- Do not use this mechanism as a means of AOP. See the reference - manual for examples of appropriate usages of this interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Reimplement the supplied . - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the (re)implementation of the method call. - - - - - Creates a new instance of the - - class. - - -

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

-
- - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - -
- - - Is ; derived classes must supply an implementation. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - The result of the object lookup. - - - - Helper method for subclasses to retrieve the appropriate - for the - supplied . - - - The to use to retrieve - the appropriate - . - - - The appropriate - . - - - - - Helper method for subclasses to lookup an object from an enclosing - IoC container. - - - The name of the object that is to be looked up. - - - The named object. - - - - - Common base class for object definitions, factoring out common - functionality from - and - . - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Describes a configurable object instance, which has property values, - constructor argument values, and further information supplied by concrete - implementations. - - Rick Evans - - - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - The method overrides (if any) for this object. - - - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - - - - - Return the event handlers for any events exposed by this object. - - - - - Get or set the role hint for this object definition - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition (if any). - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The dependency check code. - - - - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The object definition used to initialise the member fields of this - instance. - - -

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

-
-
- - - Resolves the type of the object, resolving it from a specified - object type name if necessary. - - - A resolved instance. - - - If the type cannot be resolved. - - - - - Validate this object definition. - - - In the case of a validation failure. - - - - - Validates all - - - - - Validate the supplied . - - - The - to be validated. - - - - - Override settings in this object definition from the supplied - object definition. - - - The object definition used to override the member fields of this instance. - - - - - Returns a that represents the current - . - - - A that represents the current - . - - - - - The name of the parent definition of this object definition, if any. - - - - - The property values that are to be applied to the object - upon creation. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The property values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - Does this definition have any - ? - - - if this definition has at least one - . - - - - - The constructor argument values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The constructor argument values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The event handler values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The event handler values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The method overrides (if any) for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The name of the target scope for the object. - Defaults to "singleton", ootb alternative is "prototype". Extended object factories - might support further scopes. - - - - - Get or set the role hint for this object definition - - - - - Is this definition a singleton, with - a single, shared instance returned on all calls to an enclosing - container (typically an - or - ). - - -

- If , an object factory will apply the - prototype design pattern, with each caller requesting an - instance getting an independent instance. How this is defined - will depend on the object factory implementation. singletons - are the commoner type. -

-
- -
- - - Gets a value indicating whether this instance is prototype, with an independent instance - returned for each call. - - - true if this instance is prototype; otherwise, false. - - - - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup - by object factories that perform eager initialization of - singletons. -

-
-
- - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be - instantiated itself but rather just serving as a parent for concrete - child object definitions. - - - if this object definition is "abstract". - - - - - The of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - - Is the of the object definition a resolved - ? - - - - - Returns the of the - of the object definition (if any). - - - - - A description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. The default is - , - which means that no autowiring will be performed. -

-
-
- - - Gets the resolved autowire mode. - - -

- This resolves - - to one of - - or - . -

-
-
- - - The dependency checking mode. - - -

- The default is - . -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before this object definition. -

- - Dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - The name of the initializer method. - - -

- The default value is the constant, - in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default value is the constant, - in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The - method will be invoked on the specified - . -

-
-
- - - The name of the factory object to use (if any). - - - - - Does this object definition have any constructor argument values? - - - if his object definition has at least one - element in it's - - property. - - - - - Abstract base class for object definition readers. - - -

- Provides common properties like the object registry to work on. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Simple interface for object definition readers. - - Juergen Hoeller - Rick Evans - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The against which any class names - will be resolved into instances. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - Gets the resource loader to use for resource locations. - - There is also a method - available for loading object definitions from a resource location. This is - a convenience to avoid explicit ResourceLoader handling. - The resource loader. - - - - The instance for this class (and derived classes). - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - The against which any class names - will be resolved into instances. - - -

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

-
-
- - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - - The against which any class names - will be resolved into instances. - - - - - Gets or sets the resource loader to use for resource locations. - - The resource loader. - - - - Utility class that contains various methods useful for the implementation of - autowire-capable object factories. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the AutowireUtils class. - - -

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

-
-
- - - Gets those s - that are applicable for autowiring the supplied . - - - The - (definition) that is being autowired by constructor. - - - The absolute minimum number of arguments that any returned constructor - must have. If this parameter is equal to zero (0), then all constructors - are valid (regardless of their argument count), including any default - constructor. - - - Those s - that are applicable for autowiring the supplied . - - - - - Determine a weight that represents the class hierarchy difference between types and - arguments. - - -

- A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase - the result - all direct matches means weight zero (0). A match between the argument type - and a MyInteger instance argument would increase the weight by - 1, due to the superclass () being one (1) steps up in the - class hierarchy being the last one that still matches the required type. -

-

- Therefore, with an argument of type , a - constructor taking a argument would be - preferred to a constructor taking an argument - which would be preferred to a constructor taking an - argument which would in turn be preferred - to a constructor taking an argument. -

-

- All argument weights get accumulated. -

-
- - The argument s to match. - - The arguments to match. - The accumulated weight for all arguments. -
- - - Algorithm that judges the match between the declared parameter types of a candidate method - and a specific list of arguments that this method is supposed to be invoked with. - - - Determines a weight that represents the class hierarchy difference between types and - arguments. The following a an example based on the Java class hierarchy for Integer. - A direct match, i.e. type Integer -> arg of class Integer, does not increase - the result - all direct matches means weight 0. A match between type Object and arg of - class Integer would increase the weight by 2, due to the superclass 2 steps up in the - hierarchy (i.e. Object) being the last one that still matches the required type Object. - Type Number and class Integer would increase the weight by 1 accordingly, due to the - superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. - Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a - constructor (Number) which would in turn be preferred to a constructor (Object). - All argument weights get accumulated. - - The param types. - The args. - - - - - Determines whether the given object property is excluded from dependency checks. - - The PropertyInfo of the object property. - - true if is excluded from dependency check; otherwise, false. - - - - - Sorts the supplied , preferring - public constructors and "greedy" ones (that have lots of arguments). - - -

- The result will contain public constructors first, with a decreasing number - of arguments, then non-public constructors, again with a decreasing number - of arguments. -

-
- - The array to be sorted. - -
- - - Determines whether the setter property is defined in any of the given interfaces. - - The PropertyInfo of the object property - The ISet of interfaces. - - true if setter property is defined in interface; otherwise, false. - - - - - Creates the autowire candidate resolver. - - A SimpleAutowireCandidateResolver - - - - Returns the list of that are not satisfied by . - - the filtered list. Is never null - - - - Object definition for definitions that inherit settings from their - parent (object definition). - - -

- Will use the - of the parent object definition if none is specified, but can also - override it. In the latter case, the child's - - must be compatible with the parent, i.e. accept the parent's property values - and constructor argument values (if any). -

-

- A will - inherit all of the , - , and - from it's parent - object definition, with the option to add new values. If the - , - , - and / or - - properties are specified, they will override the corresponding parent settings. -

-

- The remaining settings will always be taken from the child definition: - , - , - , - , - and - -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - - class. - - - The name of the parent object. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The class of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The of the object to - instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Validate this object definition. - - -

- A common cause of validation failures is a missing value for the - - property; by - their very nature require that the - - be set. -

-
- - In the case of a validation failure. - -
- - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Helper class for resolving constructors and factory methods. - Performs constructor resolution through argument matching. - - - Operates on a and an . - Used by . - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for the given factory - and instantiation strategy. - - The object factory to work with. - The object factory as IAutowireCapableObjectFactory. - The instantiation strategy for creating objects. - the resolver to resolve property value placeholders if any - - - - "autowire constructor" (with constructor arguments by type) behavior. - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: In this mode, a Spring - object factory is able to host components that expect constructor-based - dependency resolution. - - Name of the object. - The merged object definition for the object. - The chosen chosen candidate constructors (or null if none). - The explicit argument values passed in programmatically via the getBean method, - or null if none (-> use constructor argument values from object definition) - An IObjectWrapper for the new instance - - - - Gets the constructor instantiation info given the object definition. - - Name of the object. - The RootObjectDefinition - The explicitly chosen ctors. - The explicit chose ctor args. - A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or - one based on type matching. - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - Create an array of arguments to invoke a constructor or static factory method, - given the resolved constructor arguments values. - - When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain - information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using - exceptions for flow control as in the original implementation. - - - - Resolves the - of the supplied . - - The name of the object that is being resolved by this factory. - The rod. - The wrapper. - The cargs. - Where the resolved constructor arguments will be placed. - - The minimum number of arguments that any constructor for the supplied - must have. - - -

- 'Resolve' can be taken to mean that all of the s - constructor arguments is resolved into a concrete object that can be plugged - into one of the s constructors. Runtime object - references to other objects in this (or a parent) factory are resolved, - type conversion is performed, etc. -

-

- These resolved values are plugged into the supplied - object, because we wouldn't want to touch - the s constructor arguments in case it (or any of - its constructor arguments) is a prototype object definition. -

-

- This method is also used for handling invocations of static factory methods. -

-
-
- - - Returns an array of all of those - methods exposed on the - that match the supplied criteria. - - - Methods that have this name (can be in the form of a regular expression). - - - Methods that have exactly this many arguments. - - - Methods that are static / instance. - - - The on which the methods (if any) are to be found. - - - An array of all of those - methods exposed on the - that match the supplied criteria. - - - - - Concrete implementation of the - and - - interfaces. - - -

- This class is a full-fledged object factory based on object definitions - that is usable straight out of the box. -

-

- Can be used as an object factory in and of itself, or as a superclass - for custom object factory implementations. Note that readers for - specific object definition formats are typically implemented separately - rather than as object factory subclasses. -

-

- For an alternative implementation of the - interface, - have a look at the - - class, which manages existing object instances rather than creating new - ones based on object definitions. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - - - - Creates a new instance of the - class. - - The parent object factory. - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory. - - - - Find object instances that match the . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The type of the objects to look up. - - - An of object names and object - instances that match the , or - if none is found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - - -

- Called by the - - so that dependant objects are able to be disposed of first. -

-
- - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - -
- - - Check whether the specified object matches the supplied . - - The name of the object to check. - - The to check for. - - - if the object matches the supplied , - or if the supplied is . - - - - - The instance for this class. - - - - - Whether to allow re-registration of a different definition with the - same name. - - - - - The mapping of object definition objects, keyed by object name. - - - - - List of object definition names, in registration order. - - - - - Resolver to use for checking if an object definition is an autowire candidate - - - - - IDictionary from dependency type to corresponding autowired value - - - - - Check if this registry contains a object definition with the given - name. - - - The name of the object to look for. - - - if this object factory contains an object - definition with the given name. - - - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - - If one of the singleton objects could not be created. - - - - - - Register a special dependency type with corresponding autowired value. - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the IObjectFactory interface itself. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Check whether the specified bean would need to be eagerly initialized - in order to determine its type. - - a factory-bean reference that the bean definition defines a factory method for - whether eager initialization is necessary - - - - Check whether the given bean is defined as a . - - the name of the object - the corresponding object definition - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Raises the no such object definition exception for an unresolvable dependency - - The type. - The dependency description. - The descriptor. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - Determine whether the specified object definition qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - - Name of the object definition to check. - The merged object definiton to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - - - - Should object definitions registered under the same name as an - existing object definition be allowed? - - -

- If , then the new object definition will - replace (override) the existing object definition. If - , an exception will be thrown when - an attempt is made to register an object definition under the same - name as an already existing object definition. -

-

- The default is . -

-
- - is the registration of an object definition - under the same name as an existing object definition is allowed. - -
- - - Get or set custom autowire candidate resolver for this IObjectFactory to use - when deciding whether a bean definition should be considered as a - candidate for autowiring. Never null - - - - - Return the number of objects defined in this registry. - - - The number of objects defined in this registry. - - - - - - Default implementation of the - - interface. - - -

- Does not support per - loading. -

-
- Aleksandar Seovic -
- - - Central interface for factories that can create - - instances. - - -

- Allows for replaceable object definition factories using the Strategy - pattern. -

-
- Aleksandar Seovic -
- - - Factory style method for getting concrete - - instances. - - - The FullName of the of the defined object. - - The name of the parent object definition (if any). - - The against which any class names - will be resolved into instances. It can be null to register the - object class just by name. - - - An - - instance. - - - - - Factory style method for getting concrete - - instances. - - /// If no parent is specified, a RootObjectDefinition is created, otherwise a - ChildObjectDefinition. - The of the defined object. - The name of the parent object definition (if any). - The against which any class names - will be resolved into instances. - - An - - instance. - - - - - Default implementation of the interface, deleagting to - 's GenerateObjectName. - - Note that this implementation is only able to handle - subclasses such as - and - - Juergen Hoeller - Mark Pollack (.NET) - - - - Strategy interface for generating object names for object definitions - - Juergen Hoeller - Mark Pollack (.NET) - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - An - implementation that delegates to an - that is - obtained as the result of a lookup in an associated IoC container. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by delegating to - another - looked up in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the delegated call to the looked up - . - - - - - The various modes of dependency checking. - - Rick Evans (.NET) - - - - DO not do any dependency checking. - - - - - Check object references. - - - - - Just check primitive (string, int, etc) values. - - - - - Check everything. - - - - - GenericObjectDefinition is a one-stop shop for standard object definition purposes. - Like any object definition, it allows for specifying a class plus optionally - constructor argument values and property values. Additionally, deriving from a - parent bean definition can be flexibly configured through the "parentName" property. - - In general, use this class for the purpose of - registering user-visible object definitions (which a post-processor might operate on, - potentially even reconfiguring the parent name). - Use / - where parent/child relationships happen to be pre-determined. - - - - Juergen Hoeller - Erich Eichinger - - - - Creates a new to be configured through its - object properties and configuration methods. - - - - - Creates a new as deep copy of the given - object definition. - - the original object definition to copy from - - - - Returns a representation of this - for debugging purposes. - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Strategy interface for determining whether a specific object definition - qualifies as an autowire candidate for a specific dependency. - - Mark Fisher - Juergen hoeller - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Responsible for creating instances corresponding to a - . - - Rod Johnson - Rick Evans (.NET) - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Represents an override of a method that looks up an object in the same IoC context. - - -

- Methods eligible for lookup override must not have arguments. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Represents the override of a method on a managed object by the IoC container. - - -

- Note that the override mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - -

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

-
- - The name of the method that is to be overridden. - - - If the supplied is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - -

- By 'match' one means does this particular - - instance apply to the supplied ? -

-

- This allows for argument list checking as well as method name checking. -

-
- The method to be checked. - - if this override matches the supplied - . - -
- - - The name of the method that is to be overridden. - - - - - Is the method that is ot be injected - () - to be considered as overloaded? - - -

- If (the default), then argument type matching - will be performed (because one would not want to override the wrong - method). -

-

- Setting the value of this property to can be used - to optimize runtime performance (ever so slightly). -

-
-
- - - Creates a new instance of the - class. - - -

- Methods eligible for lookup override must not have arguments. -

-
- - The name of the method that is to be overridden. - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - If either of the supplied arguments is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - - - An - implementation that simply returns the result of a lookup in an - associated IoC container. - - -

- This class is Spring.NET's implementation of Dependency Lookup via - Method Injection. -

-

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by returning the - result of an object lookup in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the object lookup. - - - - - An - implementation that supports method injection. - - -

- Classes that want to take advantage of method injection must meet some - stringent criteria. Every method that is to be method injected - must be defined as either or - . An - will be thrown if these criteria are not met. -

-
- Rick Evans -
- - - Simple object instantiation strategy for use in - implementations. - - -

- Does not support method injection, although it provides hooks for subclasses - to override to add method injection support, for example by overriding methods. -

-
- Rod Johnson - Rick Evans (.NET) - -
- - - The shared instance for this class (and derived classes). - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type does not have a zero-arg constructor. - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use a no-arg constructor. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be a - or zero length string if we're autowiring an object that - doesn't belong to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - -
- - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use the supplied - and attendant . -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - -
- - - The name of the dynamic assembly that holds dynamically created code - - - - - A cache of generated instances, keyed on - the object name for which the was generated. - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- This method dynamically generates a subclass that supports method - injection for the supplied . It then - instantiates an new instance of said type using the constructor - identified by the supplied , - passing the supplied to said - constructor. It then manually injects (generic) method replacement - and method lookup instances (of - ) into - the new instance: those methods that are 'method-injected' will - then delegate to the approriate - - instance to effect the actual method injection. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The parameter s to use to find the - appropriate constructor to invoke. - - - The aguments that are to be passed to the appropriate constructor - when the object is being instantiated. - - - A new instance of the defined by the - supplied . - -
- - - A factory that generates subclasses of those - classes that have been configured for the Method-Injection form of - Dependency Injection. - - -

- This class is designed as for one-shot usage; i.e. it must - be used to generate exactly one method injected subclass and - then discarded (it maintains state in instance fields). -

-
-
- - - The name of the generated - property (for method replacement). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - The name of the generated - property (for method lookup). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - Creates a new instance of the - class. - - - The in which - the generated is to be defined. - - - The object definition that is the target of the method injection. - - - If either of the supplied arguments is . - - - - - Builds a suitable for Method-Injection. - - - A suitable for Method-Injection. - - - - - Defines overrides for those methods that are configured with an appropriate - . - - - The overarching that is defining - the generated . - - - - - Override the supplied with the logic - encapsulated by the - - defined by the supplied . - - - The builder for the subclass that is being generated. - - - The method on the superclass that is to be overridden. - - - The field defining the - - that the overridden method will delegate to to do the 'actual' - method injection logic. - - - - - Generates the MSIL for actually returning a return value if the - supplied is not - . - - - The definition of the return value; if , it - means that no return value is to required (a void - return type). - - - The to emit - the MSIL to. - - - - - Generates the MSIL for a return value if the supplied - returns a value. - - - The method to be checked. - - - The to emit - the MSIL to. - - - The return value, or if the method does not - return a value (has a void return type). - - - - - Pushes (sets up) the arguments for a call to the - - method of an appropriate - . - - - The parameters to the original method (will be bundled - up into a generic object[] and passed as the third - argument to the - - invocation. - - - The to emit - the MSIL to. - - - - - Simply generates the IL for a write only property for the - . - - - The in which the property is defined. - - - The name of the (to be) generated property. - - - The (instance) field that the property is to 'set'. - - - - - A collection (with set semantics) of method overrides, determining which, if any, - methods on a managed object the Spring.NET IoC container will override at runtime. - - Rod Johnson - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- Deep copy constructoe. -

-
- - The instance supplying initial overrides for this new instance. - -
- - - Copy all given method overrides into this object. - - - The overrides to be copied into this object. - - - - - Adds the supplied to the overrides contained - within this instance. - - - The to be - added. - - - - - Adds the supplied to the overloaded method names - contained within this instance. - - - The overloaded method name to be added. - - - - - Returns true if the supplied is present within - the overloaded method names contained within this instance. - - - The overloaded method name to be checked. - - - True if the supplied is present within - the overloaded method names contained within this instance. - - - - - Return the override for the given method, if any. - - - The method to check for overrides for. - - - the override for the given method, if any. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - The collection of method overrides. - - - - - Returns true if this instance contains no overrides. - - - - - Programmatic means of constructing a using the builder pattern. Intended primarily - for use when implementing custom namespace parsers. - - Set methods are used instead of properties, so that chaining of methods can be used to create - 'one-liner'definitions that set multiple properties at one. - Rod Johnson - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class, private - to force use of factory methods. - - - - - Creates a new used to construct a . - - - - - Creates a new used to construct a . - - the of the object that the definition is being created for - - - - Creates a new used to construct a . - - the name of the of the object that the definition is being created for - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - The type name of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Name of the object type. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a child object definition.. - - The object definition factory. - Name of the parent object. - - - - - Adds the property value under the given name. - - The name. - The value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the specified object name under the property specified. - - The name. - Name of the object. - The current ObjectDefinitionBuilder. - - - - Adds an index constructor arg value. The current index is tracked internally and all addtions are - at the present point - - The constructor arg value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the named object as a constructor argument. - - Name of the object. - - - - - Sets the name of the factory method to use for this definition. - - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the factory object to use for this definition. - - The factory object. - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets whether or not this definition describes a singleton object. - - if set to true [singleton]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects or not this definition is abstract. - - if set to true [flag]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects for this definition should be lazily initialized or not. - - if set to true [lazy]. - The current ObjectDefinitionBuilder. - - - - Sets the autowire mode for this definition. - - The autowire mode. - The current ObjectDefinitionBuilder. - - - - Sets the dependency check mode for this definition. - - The dependency check. - The current ObjectDefinitionBuilder. - - - - Sets the name of the destroy method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the init method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the resource description for this definition. - - The resource description. - The current ObjectDefinitionBuilder. - - - - Adds the specified object name to the list of objects that this definition depends on. - - Name of the object. - The current ObjectDefinitionBuilder. - - - - Gets the current object definition in its raw (unvalidated) form. - - The raw object definition. - - - - Validate and gets the object definition. - - The object definition. - - - - Utility methods that are useful for - - implementations. - - Juergen Hoeller - Rick Evans (.NET) - - - - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Registers the supplied with the - supplied . - - -

- This is a convenience method that registers the - - of the supplied under the - - property value of said . If the - supplied has any - , - then those aliases will also be registered with the supplied - . -

-
- - The object definition holder containing the - that - is to be registered. - - - The registry that the supplied - is to be registered with. - - - If either of the supplied arguments is . - - - If the could not be registered - with the . - -
- - - Generates an object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied . - - The - that requires a generated name. - The - - that the supplied is to be - registered with (needed so that the uniqueness of any generated - name can be guaranteed). - if set to true if the given object - definition will be registed as an inner object or as a top level objener objects - verses top level objects. - - An object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied and - never . - - - If either of the or - arguments is . - - - If a unique name cannot be generated. - - - - - Generates the name of the object for a top-level object definition unique within the given object factory. - - The object definition to generate an object name for. - The registry to check for existing names. - The generated object name - if no unique name can be generated for the given - object definition - - - - Factory method for getting concrete - instances. - - - The name of the event handler method. This may be straight text, a regular - expression, , or empty. - - - The name of the event being wired. This too may be straight text, a regular - expression, , or empty. - - - A concrete - instance. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Thrown when the validation of an object definition failed. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - The detail message. - - - - Creates a new instance of the - - class. - - - The detail message. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Helper class for use in object factory implementations, - resolving values contained in object definition objects - into the actual values applied to the target object instance. - - - Used by . - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The object factory. - - - - Given a property value, return a value, resolving any references to other - objects in the factory if necessary. - - -

- The value could be : - - -

- An , - which leads to the creation of a corresponding new object instance. - Singleton flags and names of such "inner objects" are always ignored: inner objects - are anonymous prototypes. -

- - -

- A , which must - be resolved. -

-
- -

- An . This is a - special placeholder collection that may contain - s or - collections that will need to be resolved. -

-
- -

- An ordinary object or , in which case it's left alone. -

-
- -

-
- - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - -
- - - TODO - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Resolve the target type of the passed . - - The who's target type is to be resolved - The resolved target type, if any. otherwise. - - - - Resolves an inner object definition. - - - The name of the object that surrounds this inner object definition. - - - The name of the inner object definition... note: this is a synthetic - name assigned by the factory (since it makes no sense for inner object - definitions to have names). - - - The name of the property the value of which is being resolved. - - - The definition of the inner object that is to be resolved. - - - if the owner of the property is a singleton. - - - The resolved object as defined by the inner object definition. - - - - - Checks the given bean name whether it is unique. If not already unique, - a counter is added, increasing the counter until the name is unique. - - Original Name of the inner object. - The Adapted name for the inner object - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - The possible object scope values. - - Aleksandar Seovic - - - - - - - - - Application scope. - - - - - Session scope. - - - - - Request scope. - - - - - - - - - - Default scope (currently - ). - - - - - - Object definition reader for a simple properties format. - - - Provides object definition registration methods for - and - instances. Typically applied to a - . - - Rod Johnson - Juergen Hoeller - Simon White (.NET) - - - - Value of a T/F attribute that represents true. - Anything else represents false. Case seNsItive. - - - - - Separator between object name and property name. - - - - - Prefix for the class property of a root object definition. - - - - - Special string added to distinguish if the object will be - a singleton. - - -

- Default is true. -

-
- -

- owner.(singleton)=true -

-
-
- - - Special string added to distinguish if the object will be - lazily initialised. - - -

- Default is false. -

-
- -

- owner.(lazy-init)=true -

-
-
- - - Reserved "property" to indicate the parent of a child object definition. - - - - - Property suffix for references to other objects in the current - : e.g. - owner.dog(ref)=fido. - - -

- Whether this is a reference to a singleton or a prototype - will depend on the definition of the target object. -

-
-
- - - Prefix before values referencing other objects. - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the specified properties file. - - - The resource descriptor for the properties file. - - - The match or filter for object definition names, e.g. 'objects.' - - in case of loading or parsing errors - the number of object definitions found - - - - Register object definitions contained in a - , using all property keys (i.e. - not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Similar syntax as for an . - This method is useful to enable standard .NET internationalization support. -

-
- - The containing object definitions. - - - The match or filter for object definition names, e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions registered. -
- - - Register object definitions contained in an - , using all property keys - (i.e. not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Registers object definitions contained in an - using all property keys ( i.e. not filtering by prefix ) - - The containing - object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Get all property values, given a prefix (which will be stripped) - and add the object they define to the factory with the given name - - The name of the object to define. - - The containing string pairs. - - The prefix of each entry, which will be stripped. - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - - - - Name of default parent object - - - - - Gets or sets object definition factory to use. - - - - - A plain-vanilla object definition. - - -

- This is the most common type of object definition; - instances - do not derive from a parent - , and usually - (but not always - see below) have an - - and (optionally) some - and - . -

-

- Note that - instances do not have to specify an - : - This can be useful for deriving - instances - from such definitions, each with it's own - , - inheriting common property values and other settings from the parent. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - - The of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - Whether to perform a dependency check for objects (not - applicable to autowiring a constructor, thus ignored there) - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - -

- Takes an object class name to avoid eager loading of the object class. -

-
- - The assembly qualified of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - The - to be applied to a new instance of the object. - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. -

-
- - The definition that is to be copied. - -
- - - Validate this object definition. - - - In the case of a validation failure. - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Is always null for a . - - - It is safe to request this property's value. Setting any other value than null will - raise an . - - Raised on any attempt to set a non-null value on this property. - - - - A implementation to use that checks - the object definitions only (no attributes) - - Mark Fisher - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Static factory that permits the registration of existing singleton instances. - - -

- Does not have support for prototype objects, aliases, and post startup object - configuration. -

-

- Serves as a simple example implementation of the - interface, that manages existing object instances as opposed to creating new ones - based on object definitions. -

-

- The - method is not supported by this class; this class deals exclusively with - existing singleton instances, thus the methods mentioned previously make little sense in this context. -

-
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Map from object name to object instance. - - - - - This method is not supported by . - - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - is not currently supported. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - True if an object with the given name is defined. - - - - Is this object a singleton? - - -

- That is, will - or - always return the same object? -

-
- The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Determine the type of the object with the given name. - - -

- More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. -

-
- The name of the object to query. - - The of the object or if - not determinable. - -
- - - Determines whether the object with the given name matches the specified type. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Not supported. - - The name of the object. - - The registered - . - - - Always, as object definitions are not supported by this - implementation. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Will not consider s, - as the type of their created objects is not known before instantiation. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Since this implementation of the - - interface does not support the notion of ptototype objects, the - parameter is ignored. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). Ignored. - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - -
- - - Tests whether this object factory contains an object definition for the - specified object name. - - The object name to query. - - True if an object defintion is contained within this object factory. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Add a new singleton object. - - - The name to be associated with the object name. - - The singleton object. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - This feature is not currently supported. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Defines a method to release allocated unmanaged resources. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - - - - Abstract implementation providing - a number of convenience methods and a - template method - that subclasses must override to provide the actual parsing logic. - - - Use this implementation when you want - to parse some arbitrarily complex XML into one or more - ObjectDefinitions. If you just want to parse some - XML into a single IObjectDefinition, you may wish to consider - the simpler convenience extensions of this class, namely - and - - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Interface used to handle custom, top-level tags. - - Implementations are free to turn the metadata in the custom tag into as - many as required. - - Rob Harrop - Mark Pollack (.NET) - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - -

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

-
- - The element to be parsed. - - - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - - - The primary object definition. - -
- - - Constant for the ID attribute - - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Resolves the ID for the supplied . - - - When using generation, a name is generated automatically. - Otherwise, the ID is extracted from the "id" attribute, potentially with a - fallback to a generated id. - - The element that the object definition has been built from. - The object definition to be registered. - The the object encapsulating the current state of the parsing process; - provides access to a - the resolved id - - if no unique name could be generated for the given object definition - - - - - Registers the supplied with the supplied - . - - Subclasses can override this method to control whether or not the supplied - is actually even registered, or to - register even more objects. - - The default implementation registers the supplied - with the supplied only if the IsNested - parameter is false, because one typically does not want inner objects - to be registered as top level objects. - - - - The object definition to be registered. - The registry that the bean is to be registered with. - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - Gets a value indicating whether an ID should be generated instead of read - from the passed in XmlElement. - - Note that this flag is about always generating an ID; the parser - won't even check for an "id" attribute in this case. - - true if should generate id; otherwise, false. - - - - Gets a value indicating whether an ID should be generated instead if the - passed in XmlElement does not specify an "id" attribute explicitly. - - Disabled by default; subclasses can override this to enable ID generation - as fallback: The parser will first check for an "id" attribute in this case, - only falling back to a generated ID if no value was specified. - - true if should generate id if no value was specified; otherwise, false. - - - - - Convenient base class for when there exists a one-to-one mapping - between attribute names on the element that is to be parsed and - the property names on the Type being configured. - - - - - Mark Pollack - - - - Base Type for those implementations that - need to parse and define just a single IObjectDefinition. - - - Extend this parser Type when you want to create a single object definition - from an arbitrarily complex XML element. You may wish to consider extending - the when you want to create a - single Object definition from a relatively simple custom XML element. - The resulting ObjectDefinition will be automatically registered - with the ObjectDefinitionRegistry. Your job simply is to parse the - custom XML element into a single ObjectDefinition - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - - Determine the name for the parent of the currently parsed object, - in case of the current object being defined as a child object. - The default implementation returns null - indicating a root object definition. - - - the name of the parent object for the currently parsed object. - - - - Gets the type of the object corresponding to the supplied XmlElement. - - Note that, for application classes, it is generally preferable to override - GetObjectTypeName instad, in order to avoid a direct - dependence on the object implementation class. The ObjectDefinitionParser - and its IXmlObjectDefinitionParser (namespace parser) can be used within an - IDE add-in then, even if the application classses are not available in the add-ins - AppDomain. - - The element. - The Type of the class that is being defined via parsing the supplied - Element. - - - - Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. - - The element. - The type name of the object that is being defined via parsing the supplied - XmlElement. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation delegates to the DoParse version without - ParameterContext argument. - The element. - The parser context. - The builder used to define the IObjectDefinition. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation does nothing. - The element. - The builder used to define the IObjectDefinition. - - - - Default implementation of the interface. - Resolves namespace URIs to implementation types based on mappings. - - Erich Eichinger - - - - - - Used by to locate - implementations for a particular namespace URI. - - TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now - Erich Eichinger - - - - - - - Lookup a for the given namespace URI. - - the namespace URI - the located namespace handler or null - - - - Resolve the namespace URI and return the corresponding - implementation. - - the namespace URI to get the matching parser for. - the matching parser or null - - - - XML resource reader. - - -

- Navigates through an XML resource and invokes parsers registered - with the . -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - SPI for parsing an XML document that contains Spring object definitions. - Used by for actually parsing a DOM - document. - - Instantiated per document to parse: Implementations can hold state in - instance variables during the execution of the RegisterObjectDefinitions - method, for example global settings that are defined for all object definitions - in the document. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the DefaultObjectDefinitionDocumentReader class. - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - Parses object definitions starting at the given - using the passed . - - The root element to start parsing from. - The instance to use. - - in case an error happens during parsing and registering object definitions - - - - - Process an alias element. - - - - - Process the object element - - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - - If the resource could not be imported. - - - - - Parses the given alias element, registering the alias with the registry. - - The alias element. - The registry. - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The helper. - - - - - - Allow the XML to be extensible by processing any custom element types last, - after we finished processing the objct definitions. This method is a natural - extension point for any other custom post-processing of the XML. - - The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. - - - The root. - - - - Allow the XML to be extensible by processing any custom element types first, - before we start to process the object definitions. - - This method is a natural - extension point for any other custom pre-processing of the XML. -

The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. -

-
- The root element of the XML document. -
- - - Creates an instance for the given and element. - - the to create the - the root to start reading from - a new instance - - - - Gets the reader context. - - The reader context. - - - - Simple class that holds the defaults specified at the <objects> - level in a standard Spring XML object definition document: - default-lazy-init, default-autowire, etc. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Gets or sets the autowire setting for the document that's currently parsed. - - The autowire. - - - - Gets or sets the dependency-check setting for the document that's currently parsed - - The dependency check. - - - - Gets or sets the lazy-init flag for the document that's currently parsed. - - The lazy init. - - - - Gets or sets the merge setting for the document that's currently parsed. - - The merge. - - - - Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. - - -

- Used by - for actually parsing a DOM document or - fragment. -

-
- Juergen Hoeller - Rick Evans (.NET) - Sandu Turcan (.NET) -
- - - Invoked by after construction but before any - elements have been parsed. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Attribute that should be used to specify the default namespace - and schema location for a custom namespace parser. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Gets or sets the default namespace for the configuration parser. - - - The default namespace for the configuration parser. - - - - - Gets or sets the default schema location for the configuration parser. - - - The default schema location for the configuration parser. - - - If the property is set, the will always resolve to an assembly-resource - and the set will be interpreted relative to this assembly. - - - - - Gets or sets a type from the assembly containing the schema - - - If this property is set, the will always resolve to an assembly-resource - and the will be interpreted relative to this assembly. - - - - - Provides a resolution mechanism for configuration parsers. - - -

- The uses this registry - class to find the parser handling a specific namespace. -

-
- Aleksandar Seovic -
- - - Name of the .Net config section that contains definitions - for custom config parsers. - - - - - Creates a new instance of the NamespaceParserRegistry class. - - - - - Reset the list of registered parsers to "factory"-setting - - use for unit tests only - - - - Registers the type for wellknown namespaces - - true if the parser could be registered, false otherwise - - - - Constructs a "assembly://..." qualified schemaLocation url using the given type - to obtain the assembly name. - - - - - Returns a parser for the given namespace. - - - The namespace for which to lookup the parser implementation. - - - A parser for a given , or - if no parser was found. - - - - - Returns a schema collection containing validation schemas for all registered parsers. - - - A schema collection containing validation schemas for all registered parsers. - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The of the parser that will be activated - when an element in its default namespace is encountered. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The of the parser that will be activated - when the attendant is - encountered. - - - The namespace with which to associate instance of the parser. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If the is not a - that implements the - interface. - - - If is . - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The parser instance. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The namespace with which to associate instance of the parser. - - - The parser instance. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If is , or if - is not specified and parser class - does not have default value defined using . - - - - - Register a schema as well-known - - - - - - - Returns default values for the parser namespace and schema location as - defined by the . - - - A type of the parser. - - - A instance containing - default values for the parser namsepace and schema location - - - - - Resolves xml entities by using the infrastructure. - - - - - Adapts the interface to . - Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 - - - - - Support class for implementing custom namespace parsers. - - Parsing of individual elements is done via a ObjectDefintionParser. - Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser - to handle a specific element. - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Invoked by after construction but before any - elements have been parsed. - - - - - Parses an element under the root node, typically - an object definition or import statement. - - - The element to be parsed. - - - The parser context. - - - The number of object defintions created from this element. - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Register the specified for the given - - - - - Constants defining the structure and values associated with the - Spring.NET XML object definition format. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Value of a boolean attribute that represents - . - - -

- Anything else represents . -

-
-
- - - Signifies that a default value is to be applied. - - - - - Defines an external XML object definition resource. - - - - - Specifies the relative path to an external XML object definition - resource. - - - - - Defines an alias for an object definition. - - - - - Specifies the alias of an object definition. - - - - - Specifies the default lazy initialization mode. - - - - - Specifies the default dependency checking mode. - - - - - Specifies the default autowire mode. - - - - - Specifies the default collection merge mode. - - - - - Defines a single named object. - - - - - Element containing informative text describing the purpose of the - enclosing element. - - -

- Always optional. -

-

- Used primarily for user documentation of XML object definition - documents. -

-
-
- - - Specifies a . - - -

- Does not have to be fully assembly qualified, but it is recommended - that the names of one's objects are - specified explicitly. -

-
-
- - - The name or alias of the parent object definition that a child - object definition inherits from. - - - - - Objects can be identified by an id, to enable reference checking. - - -

- There are constraints on a valid XML id: if you want to reference - your object in .NET code using a name that's illegal as an XML id, - use the optional "name" attribute - (). - If neither given, the objects name is - used as id. -

-
-
- - - Can be used to create one or more aliases illegal in an id. - - -

- Multiple aliases can be separated by any number of spaces, - semicolons, or commas - (). -

-

- Always optional. -

-
-
- - - Is this object a "singleton" (one shared instance, which will - be returned by all calls to - with the id), or a - "prototype" (independent instance resulting from each call to - ). - - -

- Singletons are most commonly used, and are ideal for multi-threaded - service objects. -

-
- -
- - - Controls object scope. Only applicable to ASP.NET web applications. - - -

- Scope can be defined as either application, session or request. It - defines when "singleton" instances are initialized, but has no - effect on prototype definitions. -

-
-
- - - The names of the objects that this object depends on being - initialized. - - -

- The object factory will guarantee that these objects - get initialized before this object definition. -

- - Dependencies are normally expressed through object properties or - constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Optional attribute for the name of the custom initialization method - to invoke after setting object properties. - - -

- The method must have no arguments. -

-
-
- - - Optional attribute for the name of the custom destroy method to - invoke on object factory shutdown. - - -

- Valid destroy methods have either of the following signatures... - - void MethodName() - void MethodName(bool force) - -

- - Only invoked on singleton objects! - -
-
- - - A constructor argument : the constructor-arg tag can have an - optional type attribute, to specify the exact type of the - constructor argument - - -

- Only needed to avoid ambiguities, e.g. in case of 2 single - argument constructors that can both be converted from a - . -

-
-
- - - The constructor-arg tag can have an optional index attribute, - to specify the exact index in the constructor argument list. - - -

- Only needed to avoid ambiguities, e.g. in case of 2 arguments of - the same type. -

-
-
- - - The constructor-arg tag can have an optional named parameter - attribute, to specify a named parameter in the constructor - argument list. - - - - - Is this object "abstract", i.e. not meant to be instantiated itself - but rather just serving as parent for concrete child object - definitions? - - -

- Default is . Specify - to tell the object factory to not try to instantiate that - particular object in any case. -

-
-
- - - A property definition : object definitions can have zero or more - properties. - - -

- Spring.NET supports primitives, references to other objects in the - same or related factories, lists, dictionaries, and name value - collections. -

-
-
- - - A reference to another managed object or static - . - - - - - ID refs must specify a name of the target object. - - - - - A reference to the name of another managed object in the same - context. - - - - - A reference to the name of another managed object in the same - context. - - -

- Local references, using the "local" attribute, have to use object - ids; they can be checked by a parser, thus should be preferred for - references within the same object factory XML file. -

-
-
- - - Alternative to type attribute for factory-method usage. - - -

- If this is specified, no type attribute should be used. This should - be set to the name of an object in the current or ancestor - factories that contains the relevant factory method. This allows - the factory itself to be configured using Dependency Injection, and - an instance (rather than static) method to be used. -

-
-
- - - Optional attribute specifying the name of a factory method to use - to create this object. - - -

- Use constructor-arg elements to specify arguments to the factory - method, if it takes arguments. Autowiring does not apply to - factory methods. -

-

- If the "type" attribute is present, the factory method will be a - static method on the type specified by the "type" attribute on - this object definition. Often this will be the same type as that - of the constructed object - for example, when the factory method - is used as an alternative to a constructor. However, it may be on - a different type. In that case, the created object will *not* be - of the type specified in the "type" attribute. This is analogous - to behaviour. -

-

- If the "factory-object" attribute is present, the "type" attribute - is not used, and the factory method will be an instance method on - the object returned from a - - call with the specified object name. The factory object may be - defined as a singleton or a prototype. -

-

- The factory method can have any number of arguments. Use indexed - constructor-arg elements in conjunction with the factory-method - attribute. -

-

- Setter Injection can be used in conjunction with a factory method. - Method Injection cannot, as the factory method returns an instance, - which will be used when the container creates the object. -

-
-
- - - A list can contain multiple inner object, ref, collection, or - value elements. - - -

- Lists are untyped, pending generics support, although references - will be strongly typed. -

-

- A list can also map to an array type. The necessary conversion is - automatically performed by the - . -

-
-
- - - A set can contain multiple inner object, ref, collection, or value - elements. - - -

- Sets are untyped, pending generics support, although references - will be strongly typed. -

-
-
- - - A Spring.NET map is a mapping from a string key to object (a .NET - ). - - -

- Dictionaries may be empty. -

-
-
- - - A lookup key (for a dictionary or name / value collection). - - - - - A lookup key (for a dictionary or name / value collection). - - - - - Contains a string representation of a value. - - -

- This is used by name-value, ctor argument, and property elements. -

-
-
- - - Contains delimiters that should be used to split delimited string values. - - -

- This is used by name-value element. -

-
-
- - - A reference to another objects. - - -

- Used as a convenience shortcut on property and constructor-arg - elements to refer to other objects. -

-
-
- - - Contains a string representation of an expression. - - -

- This is used by ctor argument and property elements. -

-
-
- - - A map entry can be an inner object, ref, collection, or value. - - -

- The name of the property is given by the "key" attribute. -

-
-
- - - Contains a string representation of a property value. - - -

- The property may be a string, or may be converted to the - required using the - - machinery. This makes it possible for application developers to - write custom - implementations that can convert strings to objects. -

- - This is recommended for simple objects only. Configure more complex - objects by setting properties to references to other objects. - -
-
- - - Contains a string representation of an expression. - - - - - Denotes value. - - -

- Necessary because an empty "value" tag will resolve to an empty - , which will not be resolved to - value unless a special - does so. -

-
-
- - - 'name-values' elements differ from dictionary elements in that - values must be strings. - - -

- May be empty. -

-
-
- - - Element content is the string value of the property. - - -

- The "key" attribute is the name of the property. -

-
-
- - - The lazy initialization mode for an individual object definition. - - - - - The dependency checking mode for an individual object definition. - - - - - Defines a subscription to one or more events published by one or - more event sources. - - - - - The name of an event handling method. - - -

- Defaults to On${event}. - Note : this default will probably change before the first 1.0 - release. -

-
-
- - - The name of an event. - - - - - The autowiring mode for an individual object definition. - - - - - Shortcut alternative to specifying a key element in a - dictionary entry element with <ref object="..."/>. - - - - - Shortcut alternative to specifying a value element in a - dictionary entry element with <ref object="..."/>. - - - - - Specify if the collection values should be merged with the parent. - - - - - The string of characters that delimit object names. - - - - - A lookup method causes the IoC container to override a given method and return - the object with the name given in the attendant object attribute. - - -

- This is a form of Method Injection. -

-

- It's particularly useful as an alternative to implementing the - interface, - in order to be able to make - - calls for non-singleton instances at runtime. In this case, Method Injection - is a less invasive alternative. -

-
-
- - - The name of a lookup method. This method must take no arguments. - - - - - The name of the object in the IoC container that the lookup method - must resolve to. - - -

- Often this object will be a prototype, in which case the lookup method - will return a distinct instance on every invocation. This is useful - for single-threaded objects. -

-
-
- - - A replaced method causes the IoC container to override a given method - with an (arbitrary) implementation at runtime. - - -

- This (again) is a form of Method Injection. -

-
-
- - - Name of the method whose implementation should be replaced by the - IoC container. - - -

- If this method is not overloaded, there's no need to use arg-type - subelements. -

-

- If this method is overloaded, arg-type subelements must be - used for all override definitions for the method. -

-
-
- - - The object name of an implementation of the - interface. - - -

- This may be a singleton or prototype. If it's a prototype, a new - instance will be used for each method replacement. Singleton usage - is the norm. -

-
-
- - - Subelement of replaced-method identifying an argument for a - replaced method in the event of method overloading. - - - - - - Specification of the of an overloaded method - argument as a . - - -

- For convenience, this may be a substring of the FQN. E.g. all the following would match - : -

-

- - - System.String - - - string - - - str - - -

-
- -
- - - Check everything. - - - - - Just check primitive (string, int, etc) values. - - - - - Check object references. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Stateful class used to parse XML object definitions. - - Not all parsing code has been refactored into this class. See - BeanDefinitionParserDelegate in Java for how this class should evolve. - Rob Harrop - Juergen Hoeller - Rod Johnson - Mark Pollack (.NET) - - - - The shared instance for this class (and derived classes). - - - - - Initializes a new instance of the class. - - The reader context. - - - - Initializes a new instance of the class. - - The reader context. - The root element of the definition document to parse - - - - Initialize the default lazy-init, dependency check, and autowire settings. - - The root element - - - - Determines whether the Spring object namespace is equal to the the specified namespace URI. - - The namespace URI. - - true if is the default Spring namespace; otherwise, false. - - - - - Decorates the object definition if required. - - The element. - The holder. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The containing object definition if is a nested element. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Create an instance from the given and . - - - This method may be used as a last resort to post-process an object definition before it gets added to the registry. - - - - - Allows deriving classes to post process the name and aliases for the current element. By default - does nothing and returns the unmodified . - - - The list passed in may be modified by an implementation of this method to reflect special needs. - - the object name obtained by the default algorithm from 'id' and 'name' attributes so far. - the object aliases obtained by the default algorithm from 'name' attribute so far. - the currently processed element. - the containing object definition, may be null - the new object name to be used. - - - - Validate that the specified object name and aliases have not been used already. - - - - - Parses an element in a custom namespace. - - - the parsed object definition or null if not supported by the corresponding parser. - - - - Parses an element in a custom namespace. - - - if a nested element, the containing object definition - the parsed object definition or null if not supported by the corresponding parser. - - - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Determines whether the string represents a 'true' boolean value. - - The value. - - true if is 'true' string value; otherwise, false. - - - - - Convenience method to create a builder for a root object definition. - - Name of the object type. - A builder for a root object definition. - - - - Convenience method to create a builder for a root object definition. - - Type of the object. - a builder for a root object definition - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Report a parser error. - - - - - Gets the defaults definition object, or null if the - default have not yet been initialized. - - The defaults. - - - - Gets the reader context. - - The reader context. - - - - Creates an instance - populated with the object definitions supplied in the configuration - section. - - -

- Applications will typically want to use an - , and instantiate it - via the use of the - class (which is similar in functionality to this class). This class is - provided for those times when only an - is required. -

- Creates an instance of the class XmlObjectFactory -
- -

- -

-
- Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a - instance populated with the object definitions supplied in the - configuration section. - - - The configuration settings in a corresponding parent configuration - section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - A instance - populated with the object definitions supplied in the configuration - section. - - - - - Default implementation of the - interface. - - -

- Parses object definitions according to the standard Spring.NET schema. -

-

- This schema is typically located at - http://www.springframework.net/xsd/spring-objects.xsd. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The namespace URI for the standard Spring.NET object definition schema. - - - - - The shared instance for this class (and derived classes). - - - - - Invoked by after construction but before any - elements have been parsed. - - This is a NoOp - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - The parser context. - - If the resource could not be imported. - - - - Parses an event listener definition. - - The name associated with the object that the event handler is being defined on. - - The events being populated. - - The element containing the event listener definition. - - - The namespace-aware parser. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The parser context. - if set to true if we are processing an inner - object definition. - - The object (definition) wrapped within an - - instance. - - -

- Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. -

-

- If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. -

-
-
- - - Calculates an id for an object definition. - - -

- Called when an object definition has not been explicitly defined - with an id. -

-
- - The element containing the object definition. - - - The list of names defined for the object; may be - or even empty. - - - A calculated object definition id. - -
- - - Parse a standard object definition. - - The element containing the object definition. - The id of the object definition. - parsing state holder - The object (definition). - - - - Parse method override argument subelements of the given object element. - - - - - Parse element and add parsed element to - - - - - Parse element and add parsed element to - - - - - Parse constructor argument subelements of the given object element. - - - - - Parse event handler subelements of the given object element. - - - - - Parse property value subelements of the given object element. - - - The name of the object (definition) associated with the property element (s) - - - The element containing the top level object definition. - - - The namespace-aware parser. - - - The property (s) associated with the object (definition). - - - - - Parse a constructor-arg element. - - - The name of the object (definition) associated with the ctor arg. - - - The list of constructor args associated with the object (definition). - - - The name of the element containing the ctor arg definition. - - - The namespace-aware parser. - - - - - Parse a property element. - - - The name of the object (definition) associated with the property. - - - The list of properties associated with the object (definition). - - - The name of the element containing the property definition. - - - The namespace-aware parser. - - - - - Get the value of a property element (may be a list). - -

- Please note that even though this method is named GetPropertyValue, - it is called by both the property and constructor argument element - handlers. -

-
- The property element. - - The name of the object associated with the property. - - - The namespace-aware parser. - -
- - - Parse a value, ref or collection subelement of a property element. - - - Subelement of property element; we don't know which yet. - - - The name of the object (definition) associated with the top level property. - - - The namespace-aware parser. - - - - - Gets a list definition. - - - The element describing the list definition. - - - The name of the object (definition) associated with the list definition. - - - The namespace-aware parser. - - The list definition. - - - - Gets a set definition. - - - The element describing the set definition. - - - The name of the object (definition) associated with the set definition. - - - The namespace-aware parser. - - The set definition. - - - - Gets a dictionary definition. - - The element describing the dictionary definition. - The name of the object (definition) associated with the dictionary definition. - The namespace-aware parser. - The dictionary definition. - - - - Selects sub-elements with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child nodes to look for. - - - The child s of the supplied - with the supplied - . - -
- - - Selects a single sub-element with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child node to look for. - - - The first child of the supplied - with the supplied - . - -
- - - Gets a name value collection mapping definition. - - - The element describing the name value collection mapping definition. - - - The name of the object (definition) associated with the - name value collection mapping definition. - - the context carrying parsing state information - The name value collection definition. - - - - Returns the text of the supplied , - or the empty string value if said is empty. - - -

- If the supplied is , - then the empty string value will be returned. -

-
-
- - - Strips the dependency check value out of the supplied string. - - -

- If the supplied is an invalid dependency - checking mode, the invalid value will be logged and this method will - return the value. - No exception will be raised. -

-
- - The string containing the dependency check value. - - The dependency check value. - -
- - - Strips the autowiring mode out of the supplied string. - - -

- If the supplied is an invalid autowiring mode, - the invalid value will be logged and this method will return the - value. No exception will be raised. -

-
- - The string containing the autowiring mode definition. - - The autowiring mode. - -
- - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Context that gets passed along an object definition parsing process, encapsulating - all relevant configuraiton as well as state. - - - - - Initializes a new instance of the class. - - The parser helper. - - - - Initializes a new instance of the class. - - The parser helper. - The containing object definition. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - The containing object definition. - - - - Gets the reader context. - - The reader context. - - - - Gets the registry. - - The registry. - - - - Gets the parser helper. - - The parser helper. - - - - Gets the containing object definition. - - The containing object definition. - - - - Gets a value indicating whether this instance is nested. - - true if this instance is nested; otherwise, false. - - - - Gets a value indicating whether this instance is default lazy init. - - - true if this instance is default lazy init; otherwise, false. - - - - - Represents the replacement of a method on a managed object by the IoC - container. - - -

- Note that this mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The name of the method that is to be overridden. - - - The object name of the - instance in the surrounding IoC container. - - - If either of the supplied arguments is or - contains only whitespace character(s). - - - - - Add a fragment of a instance's - such as 'Exception or System.Excep to identify an argument - for a dependency injected method. - - - A (sub) string of a instance's . - - - If the supplied is or - contains only whitespace character(s). - - - - - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The object name of the - instance in the surrounding IoC container. - - - - - Object definition reader for Spring's default XML object definition format. - - -

- Typically applied to a - instance. -

-

- This class registers each object definition with the given object factory superclass, - and relies on the latter's implementation of the - interface. -

-

- It supports singletons, prototypes, and references to either of these kinds of object. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - the to use for creating new s - - - - Load object definitions from the supplied XML . - - - The XML resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Actually load object definitions from the specified XML file. - - The input stream to read from. - The resource for the XML data. - - - - - Validation callback for a validating XML reader. - - The source of the event. - Any data pertinent to the event. - - - - Register the object definitions contained in the given DOM document. - - The DOM document. - - The original resource from where the - was read. - - - The number of object definitions that were registered. - - - In case of parsing errors. - - - - - Creates the to use for actually - reading object definitions from an XML document. - - Default implementation instantiates the specified - or if no reader type is specified. - - - - - Creates the to be passed along - during the object definition reading process. - - The underlying that is currently processed. - A new - - - - Create a instance for handling custom namespaces. - - - TODO (EE): make protected virtual, see remarks on - - - - - The to be used for parsing. - - - - - Sets the IObjectDefinitionDocumentReader implementation to use, responsible for - the actual reading of the XML object definition document.stype of the document reader. - - The type of the document reader. - - - - Specify a to use. If none is specified a default - instance will be created by - - - - - Specify a for creating instances of . - - - - - For retrying the parse process - - - - - Convenience extension of - - that reads object definitions from an XML document or element. - - -

- Delegates to - - underneath; effectively equivalent to using a - for a - . -

- - objects doesn't need to be the root element of - the XML document: this class will parse all object definition elements in the - XML stream. - -

- This class registers each object definition with the - - superclass, and relies on the latter's implementation of the - interface. It supports - singletons, prototypes and references to either of these kinds of object. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Gets object definition reader to use. - - - - - Extension of specific to use with an XmlObjectDefinitionReader. - Provides access to configured in - - - - - The maximum length of any XML fragment displayed in the error message - reporting. - - -

- Hopefully this will display enough context so that a user - can pinpoint the cause of the error. -

-
-
- - - Initializes a new instance of the class. - - The resource. - The reader. - - - - Initializes a new instance of the class. - - The resource. - The reader. - The factory to use for creating new instances. - - - - Generates the name of the object. - - The object definition. - the generated object name - - - - Registers the name of the with generated. - - The object definition. - the generated object name - - - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - - -
- - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the error. - - - The root cause of the parse error (if any - may be ). - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - -
- - - This method can be overwritten in order to implement validators - capable of displaying a full list of errors found in the definition. - - - The node that triggered the parse error. - - - A message about the exception. - - - - - Gets the reader. - - The reader. - - - - Gets the resource loader. - - The resource loader. - - - - Gets the registry. - - The registry. - - - - Gets or sets the object definition factory. - - The object definition factory. - - - - Get the instance to lookup parsers for custom namespaces. - - - - - Exception thrown if an - is not fully - initialized, for example if it is involved in a circular reference. - - -

- This is usually indicated by any of the variants of the - - method returning . -

-

- A circular reference with an - cannot be solved by eagerly caching singleton instances (as is the - case with normal objects. The reason is that every - needs to be fully - initialized before it can return the created object, while only specific - normal objects need to be initialized - that is, if a collaborating object - actually invokes them on initialization instead of just storing the reference. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Thrown when an - encounters an error when attempting to create an object from an object - definition. - - Juergen Hoeller - Rick Evans (.NET) - - - - 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 name of the object that triggered 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. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Describes the creation failure trace of this exception. - - - - - Creates a new instance of the - FactoryObjectNotInitializedException class. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - FactoryObjectCircularReferenceException class. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectCircularReferenceException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - is asked for an object instance name for which it cannot find a definition. - - Rod Johnson - Rick Evans (.NET) - - - - 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. - - - Name of the missing object. - - - A further, detailed message describing the problem. - - - - - Initializes a new instance of the class. - - The required type of the object. - A description of the originating dependency. - A message describing the problem. - - - - Creates a new instance of the - class. - - - The of the missing object. - - - A further, detailed message describing the problem. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Return the required of object, if it was a - lookup by that failed. - - - - - Return the name of the missing object, if it was a lookup by name that - failed. - - - - - Thrown in case of a reference to an object that is currently in creation. - - -

- Typically happens when constructor autowiring matches the currently - constructed object. -

-
- Juergen Hoeller - Rick Evans -
- - - The default error message text to be used, if none is specified. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectCurrentlyInCreationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - encounters an error when attempting to parse an object - definition. - - Federico Spinazzi (.NET) - - - - Creates a new instance of the ObjectDefinitionException class. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The value of the xml class attribute thet can be resolved - as a type - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The message about the exception. - - - - - Convenience methods operating on object factories, returning object instances, - names, or counts. - - -

- The nesting hierarchy of an object factory is taken into account by the various methods - exposed by this class. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Used to dereference an - and distinguish it from managed objects created by the factory. - - -

- For example, if the managed object identified as foo is a - factory, getting &foo will return the factory, not the - instance returned by the factory. -

-
-
- - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Count all object definitions in any hierarchy in which this - factory participates. - - -

- Includes counts of ancestor object factories. -

-

- Objects that are "overridden" (specified in a descendant factory - with the same name) are counted only once. -

-
- The object factory. - - The count of objects including those defined in ancestor factories. - -
- - - Return all object names in the factory, including ancestor factories. - - The object factory. - The array of object names, or an empty array if none. - - - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s - if is set to true, - which means that s will get initialized. -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - The array of object names, or an empty array if none. - -
- - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - The array of object names, or an empty array if none. - -
- - - Return all objects of the given type or subtypes, also picking up objects - defined in ancestor object factories if the current object factory is an - . - - -

- The return list will only contain objects of this type. - Useful convenience method when we don't care about object names. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the objects could not be created. - - - The of object instances, or an - empty if none. - -
- - - Return a single object of the given type or subtypes, also picking up objects defined - in ancestor object factories if the current object factory is an - . - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If more than one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. - This version of ObjectOfType automatically includes prototypes and - instances. -

-
- The object factory. - The of object to match. - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return the object name, stripping out the factory dereference prefix if necessary. - - The name of the object. - The object name sans any factory dereference prefix. - - - - Given an (object) name, builds a corresponding factory object name such that - the return value can be used as a lookup name for a factory object. - - - The name to be used to build the resulting factory object name. - - - The transformed into its factory object name - equivalent. - - - - - - - Is the supplied a factory dereference? - - -

- That is, does the supplied begin with - the - ? -

-
- The name to check. - - if the supplied is a - factory dereference; if not, or the - aupplied is or - consists solely of the - - value. - - -
- - - Exception that an object implementation is suggested to throw if its own - factory-aware initialization code fails. - thrown by object factory methods - themselves should simply be propagated as-is. - - -

- Note that non-factory-aware initialization methods like AfterPropertiesSet () - or a custom "init-method" can throw any exception. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectInitializationException class. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectInitializationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to an attempt to lookup a factory object, and - the object identified by the lookup key is not a factory. - - -

- An object is a factory if it implements (either directly or indirectly - via inheritance) the - interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Thrown when an object doesn't match the required . - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - Name of the object requested. - - - The required of the actual object - instance that was retrieved. - - - The instance actually returned, whose class did not match the - expected . - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The actual of the actual object - instance that was retrieved. - - - - - The required of the actual object - instance that was retrieved. - - - - - The instance actually returned, whose class did not match the - expected . - - - - - The name of the object requested. - - - - - 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 name of the object that was being retrieved from the factory. - - - The object instance that was retrieved. - - - - - 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. - - - - - Exception thrown when an object depends on other objects or simple properties - that were not specified in the object factory definition, although dependency - checking was enabled. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The constructor argument index at which the dependency is - unsatisfied. - - - The of the constructor argument at - which the dependency is unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The name identifying the property on which the dependency is - unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Base class implementation for classes that describe an event handler. - - Rick Evans - - - - Describes an event handler. - - Rick Evans - - - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - The source of the event. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Returns a stringified representation of this object. - - A stringified representation of this object. - - - - The source of the event (may be unresolved, as in the case - of a - value). - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Convenience base class for implementations. - - - - - Abstracts the state sharing strategy used - by - - Erich Eichinger - - - - Indicate, whether the given instance can be served by this factory - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state can - be served for the given instance or not. - - - - - Returns the shared state for the given instance. - - the instance to obtain shared state for. - the name of this instance - a dictionary containing shared state for or null. - - - - Gets a dictionary acc. to the type of . - If no dictionary is found, create it according to - - the instance to obtain shared state for - the name of the instance. - - A dictionary containing the 's state, - or null if no state can be served by this provider. - - - - - Creates a dictionary to hold the shared state identified by . - - a key to create the dictionary for. - a dictionary according to and . - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Create the key used for obtaining the state dictionary for . - - the instance to create the key for - the name of the instance. - - the key identifying the state dictionary to be used for - or null, if this state manager doesn't serve the given instance. - - - - Implementations may choose to return null from this method to indicate, - that they won't serve state for the given instance. - - - Note:Keys returned by this method are always treated case-sensitive! - - - - - - Create shared state dictionaries case-sensitive or case-insensitive? - - - - - A number indicating the priority of this ( for more). - - - - - Base class for all - implemenations that actually perform event wiring. - - Rick Evans - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Resolves the method metadata that describes the method that is to be used - as the argument to a delegate constructor. - - - The exposing the method. - - - The of the delegate (e.g. System.EventHandler). - - - The custom binding flags to use when searching for the method. - - The method metadata. - - If the method could not be found. - - - - - Describes an implementation - that autowires events to handler methods. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Wires up the specified handler to the named event on the supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a , - etc). - - - - - The name of the method that is going to handle the event. - - - - - Performs the matching up of handler methods to one or more source events. - - -

- This class merely marshals the matching of handler methods to the events exposed - by an event source, and then delegates to a concrete - implementation (such as - or - ) to do the heavy lifting of - actually wiring a handler method to an event. -

-

- Note : the order in which handler's are wired up to events is non-deterministic. -

-
-
- - - Creates a new instance of the - class. - - - The object exposing the event (s) being wired up. - - - The name of the event that is being wired up. - - - The object exposing the method (s) being wired to the event. - - - The name of the method that is going to handle the event. - - - - - Wires up events on the source to methods exposed on the handler. - - - - - Wires up the supplied event to any handler methods that match the event - signature. - - The event being wired up. - - - - Only replaces the first occurrence of the placeholder. - - The event whose name is going to be used. - - The method name customised for the name of the supplied event. - - - - - The object exposing the event (s) being wired up. - - - - - The object exposing the method (s) being wired to an event source. - - - - - The of the object that is handling any events. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Serves shared state on a by-type basis. - - - - - Creates a new instance matching all types by default. - - - - - Creates a new instance matching only specified list of types. - - the list of types to serve. - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Returns the for the given . - - the instance to obtain the key for. - the name of the instance (ignored by this provider) - instance.GetType() if it matches the list. Null otherwise. - - This method will only be called if returned true previously. - - - - - Limit object types to be served by this state manager. - - - Only objects assignable to one of the types in this list - will be served state by this manager. - - - - - Describes an event handler for an object instance. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Definition for sorting object instances by a property. - - Juergen Hoeller - Simon White (.NET) - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Mutable implementation of the - interface that - supports toggling the ascending value on setting the same property again. - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using - the specified . - - - The to use - as a source for initial property values. - - - - - Creates a new instance of the - class. - - - The name of the property to sort by. - - - Whether upper and lower case in string values should be ignored. - - - Whether or not the sorting should be ascending or descending. - - - - - Creates a new instance of the - class. - - - Whether or not the - - property should be toggled if the same name is set on the - - property. - - - - - Overrides the default method - - - The object to test against this instance for equality. - - - True if the supplied is equal to this instance. - - - - - Overrides the default method. - - The hashcode for this instance. - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Performs a comparison of two objects, using the specified object property via - an . - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - The to use for any - sorting. - - - If the supplied is . - - - - - Compares two objects and returns a value indicating whether one is less - than, equal to or greater than the other. - - The first object to compare. - The second object to compare. - - - - - Get the 's property - value for the given object. - - The object to get the property value for. - The property value. - - - - Sort the given according to the - given sort definition. - - - The to be sorted. - - The parameters to sort by. - - In the case of a missing property name. - - - If the supplied is . - - - - - Gets the to - use for any sorting. - - - The to use for - any sorting. - - - - - Describes an event handler for a static class method. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - The central interface of Spring.NET's low-level object infrastructure. - - -

- Typically not directly used by application code but rather implicitly - via an . -

-

- Implementing classes have the ability to get and set property values - (individually or in bulk), get property descriptors and query the - readability and writability of properties. -

-

- This interface supports nested properties enabling the setting - of properties on subproperties to an unlimited depth. -

-

- If a property update causes an exception, a - will be thrown. Bulk - updates continue after exceptions are encountered, throwing an exception - wrapping all exceptions encountered during the update. -

-

- implementations can be used - repeatedly, with their "target" or wrapped object changed. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - Get the value of a property. - - The name of the property to get the value of. May be nested. - - The value of the property. - - if the property isn't readable, or if the getting the value throws - an exception. - - - - - Get the for a particular - property. - - - The property to be retrieved. - - - The for the particular - property. - - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Get all of the instances for - all of the properties of the wrapped object. - - - An array of instances. - - - - - Set a property value. - - -

- This is the preferred way to update an individual property. -

-
- The new property value. -
- - - Set a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new property value. -
- - Set a number of property values in bulk. - -

- This is the preferred way to perform a bulk update. -

-

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

- Does not allow the setting of unknown fields. Equivalent to - - with an argument of false for the second parameter. -

-
- - The collection of instances to - set on the wrapped object. - -
- - - Set a number of property values in bulk with full control over behavior. - - -

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

Does not allow the setting of unknown fields. -

-
- - The to set on the target object - - - Should we ignore unknown values (not found in the object!?) - -
- - - The object wrapped by the wrapper (cannot be ). - - -

- Implementations are required to allow the type of the wrapped - object to change. -

-
- The object wrapped by this wrapper. -
- - - Convenience method to return the - of the wrapped object. - - The of the wrapped object. - - - - A collection style container for - instances. - - Rod Johnson - Mark Pollack (.NET) - - - - Return the instance with the - given name. - - The name to search for. - the , or null if a - the with the supplied - did not exist in this collection. - - - - - Is there a instance for this - property name? - - The name to search for. - - True if there is a instance for - the supplied . - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - -

- Subclasses should also override Equals. -

-
- The old property values. - - An containing any changes, or - an empty instance if there were - no changes. - -
- - - Return an array of the objects - held in this object. - - An array of the objects held - in this object. - - - - - This interface should be implemented by classes that want to - have access to the shared state. - - -

- Shared state is very useful if you have data that needs to be shared by all instances - of e.g. the same webform (or other IHttpHandlers). -

-

- For example, Spring.Web.UI.Page class implements this interface, which allows - each page derived from it to cache localizalization resources and parsed data binding - expressions only once and then reuse the cached values, regardless of how many instances - of the page are created. -

-
-
- - - Gets or sets the that should be used - to store shared state for this instance. - - - - - Default implementation of the - interface. - - -

- Allows simple manipulation of properties, and provides constructors to - support deep copy and construction from a number of collection types such as - and - . -

-
- Rod Johnson - Mark Pollack (.NET) - Rick Evans (.NET) -
- - - The list of objects. - - - - - Creates a new instance of the - class. - - -

- The returned instance is initially empty... - s can be added with the various - overloaded , - , - , - and - methods. -

-
- - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. Guarantees - references are independent, although it can't deep copy objects currently - referenced by individual objects. -

-
-
- - - Creates a new instance of the - class. - - - The with property values - keyed by property name, which must be a . - - - - - Overloaded version of Add that takes a property name and a property value. - - - The name of the property. - - - The value of the property. - - - - - Add the supplied object, - replacing any existing one for the respective property. - - - The object to add. - - - - - Merges the value of the supplied 'new' with that of - the current if merging is supported and enabled. - - - The new pv. - The current pv. - The possibly merged PropertyValue - - - - Add all property values from the given - . - - - The map of property values, the keys of which must be - s. - - - - - Add all property values from the given - . - - - The list of s to be added. - - - - - Remove the given , if contained. - - - The to remove. - - - - - Removes the named , if contained. - - - The name of the property. - - - - - Modify a object held in this object. Indexed from 0. - - - - - Return the property value given the name. - - - The property name is checked in a case-insensitive fashion. - - - The name of the property. - - - The property value. - - - - - Does the container of properties contain one of this name. - - The name of the property to search for. - - True if the property is contained in this collection, false otherwise. - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - Another property values collection. - - The collection of property values that are different than the supplied one. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - Convert the object to a string representation. - - - A string representation of the object. - - - - - Property to retrieve the array of property values. - - - - - Default implementation of the - interface that should be sufficient for all normal uses. - - -

- will convert - and array - values to the corresponding target arrays, if necessary. Custom - s that deal with - s or arrays can be written against a - comma delimited as - arrays are converted in such a format if the array itself is not assignable. -

-
- Rod Johnson - Juergen Hoeller - Jean-Pierre Pawlak - Mark Pollack (.NET) - Aleksandar Seovic(.NET) -
- - The wrapped object. - - - - The ILog instance for this class. We'll create a lot of these objects, - so we don't want a new instance every time. - - - - - Creates a new instance of the class. - - -

- The wrapped target instance will need to be set afterwards. -

-
- -
- - - Creates a new instance of the class. - - - The object wrapped by this . - - - If the supplied is . - - - - - Creates a new instance of the class, - instantiating a new instance of the specified and using - it as the . - - -

- Please note that the passed as the - argument must have a no-argument constructor. - If it does not, an exception will be thrown when this class attempts - to instantiate the supplied using it's - (non-existent) constructor. -

-
- - The to instantiate and wrap. - - - If the is , or if the - invocation of the s default (no-arg) constructor - fails (due to invalid arguments, insufficient permissions, etc). - -
- - Gets the value of a property. - - The name of the property to get the value of. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - Gets the value of a property. - - The property expression that should be used to retrieve the property value. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - - Sets a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new value. -
- - - Sets a property value. - - - The property expression that should be used to set the property value. - - The new value. - - - - Sets a property value. - - -

- This is the preferred way to update an individual property. -

-
- - The object containing new property value. - -
- - Set a number of property values in bulk. - -

- Does not allow unknown fields. Equivalent to - - with and for - arguments. -

-
- - The to set on the target - object. - - - If an error is encountered while setting a property. - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Perform a bulk update with full control over behavior. - - -

- This method may throw a reflection-based exception, if there is a critical - failure such as no matching field... less serious exceptions will be accumulated - and thrown as a single . -

-
- - The s to set on the target object. - - - Should we ignore unknown values (not found in the object!?). - - - If an error is encountered while setting a property (only thrown if the - parameter is set to ). - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Returns PropertyInfo for the specified property - - The name of the property to search for. - The for the specified property. - If cannot be determined. - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Returns MemberInfo for the specified property or field - - The name of the property or field to search for. - The or for the specified property or field. - If does not resolve to a property or field. - - - - Get the properties of the wrapped object. - - - An array of s. - - - - - This method is expensive! Only call for diagnostics and debugging reasons, - not in production. - - - A string describing the state of this object. - - - - - Attempts to parse property expression first and falls back to full expression - if that fails. Performance optimization. - - Property expression to parse. - Parsed proeprty expression. - - - - The object wrapped by this . - - - If the object cannot be changed; or an attempt is made to set the - value of this property to . - - - - - Convenience method to return the of the wrapped object. - - -

- Do not use this (convenience) method prior to setting the - property. -

-
- - The of the wrapped object. - - - If the property - is . - -
- - - Return the collection of property descriptors. - - - - - Combined exception, composed of individual binding - s. - - -

- An object of this class is created at the beginning of the binding - process, and errors added to it as necessary. -

-

- The binding process continues when it encounters application-level - s, applying those changes - that can be applied and storing rejected changes in an instance of this class. -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) -
- - - Creates a new instance of the PropertyAccessExceptionsException class. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Create new empty PropertyAccessExceptionsException. - We'll add errors to it as we attempt to bind properties. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The IObjectWrapper wrapping the target object at the root of the exception. - - - - The list of PropertyAccessException objects. - - - - Return the - for the supplied , or - if there isn't one. - - - - - Describe the number of exceptions contained in this container class. - - A description of the instance contents. - - - - Return the that generated - this exception. - - - - - Return the object we're binding to. - - - - - If this returns zero (0), no errors were encountered during binding. - - - - - Return an array of the s - stored in this object. - - -

- Will return the empty array (not ) if there were no errors. -

-
-
- - - Describe the group of exceptions. - - - - - Holds information and value for an individual property. - - -

- Using an object here, rather than just storing all properties in a - map keyed by property name, allows for more flexibility, and the - ability to handle indexed properties in a special way if necessary. -

-

- Note that the value doesn't need to be the final required - : an - implementation must - handle any necessary conversion, as this object doesn't know anything - about the objects it will be applied to. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - - If the supplied is or - contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - Pre-parsed property name. - - If the supplied or - is , or if the name contains only whitespace characters. - - - - - Print a string representation of the property. - - A string representation of the property. - - - - Determines whether the supplied - is equal to the current . - - The other instance. - - if they are equal in content. - - - - - 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 name of the property. - The name of the property. - - - - Parsed property expression. - - - - - Return the value of the property. - - -

- Note that type conversion will not have occurred here. - It is the responsibility of the - implementation to - perform type conversion. -

-
- The (possibly unresolved) value of the property. -
- - - A simple pool implementation - - -

- Based on the implementation found in Concurrent Programming in Java, - 2nd ed., by Doug Lea. -

-
- Doug Lea - Federico Spinazzi - Mark Pollack -
- - - A simple pooling interface for managing and monitoring a pool - of objects. - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - Obtain an instance from the pool. - - -

- By contract, clients must return the borrowed - instance using - or a related method as defined in an implementation or - sub-interface. -

-
- An instance from the pool. - - In case the pool is unusable. - - -
- - - Return an instance to the pool. - - -

- By contract, the object must have been obtained using - - or a related method as defined in an implementation or sub-interface. -

-
- The instance to be returned to the pool. - -
- - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This is an optional operation. AddObject is useful for "pre-loading" a - pool with idle objects. -

-
- - If the implementation does not support the operation. - -
- - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently borrowed from the pool. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently idle in the pool. - - -

- This is an optional operation. -

-

- This may be considered an approximation of the number of objects - that can be borrowed without creating any new instances. -

-
- - If the implementation does not support the operation. - -
- - - Set the factory used to create new instances. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Set of permits - - - - - Creates a new instance of the - class. - - - The factory used to instantiate and manage the lifecycle of pooled objects. - - The initial size of the pool. - - If the supplied is . - - - If the supplied is less than or equal to zero. - - - - - Obtain an instance from the pool. - - - In case the pool is unusable. - - - - - - - Return an instance to the pool. - - The instance to be returned to the pool. - - - - - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Synchronized borrow logic. - - - - - - Synchronized release logic. - - - The object to release to the pool. - - - if the object was not a busy one. - - - - - Instantiates the supplied number of instances and adds - them to the pool. - - - The initial number of objects to build. - - - If the supplied number of is - less than or equal to zero. - - - - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Change the state of the pool to unusable. - - - - - Gets the number of instances currently borrowed from the pool. - - - If the implementation does not support the operation. - - - - - - Gets the number of instances currently idle in the pool. - - - If the implementation does not support the operation. - - - - - - Set the factory used to create new instances. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Defines lifecycle methods for objects that are to be used in an - implementation. - - -

- The following methods summarize the contract between an - and an - an . -

- - - - is called whenever a new instance is needed. - - - - is invoked on every instance before it is returned from - the pool. - - - - is invoked on every instance when it is returned to the pool. - - - - is invoked on every instance when it is being dropped from the - pool (see - - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - 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. - - -

- Invoked on every instance when it is being "dropped" - from the pool (whether due to the return value from a call to the - - method, or for reasons specific to the pool implementation.) -

-
- 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. - - -

- Invoked in an implementation-specific fashion to determine if an - instance is still valid to be returned by the pool. - It will only be invoked on an "activated" instance. -

-
- 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. - - -

- Invoked on every instance before it is returned from the pool. -

-
- The instance to be activated. -
- - - Uninitialize an instance to be returned to the pool. - - -

- Invoked on every instance when it is returned to the pool. -

-
- The instance returned to the pool. -
- - - Base class for all pooling exceptions. - - Federico Spinazzi - - - - 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. - - - - - Base class for method builders that contains common functionalities. - - Bruno Baia - - - - Defines interface that proxy method builders have to implement. - - Aleksandar Seovic - Bruno Baia - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - The type builder to use. - - - - - The implementation to use. - - - - - Indicates whether interfaces should be implemented explicitly. - - - - - 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 . - - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Defines proxy method for the target object. - - The method to proxy. - - The interface definition of the method, if applicable. - - - if the supplied is to be - implemented explicitly; otherwise . - - - The for the proxy method. - - - - - Defines generic method parameters based on proxied method metadata. - - - The to use. - - The method to proxy. - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Calls target method directly. - - The IL generator to use. - The method to invoke. - - - - Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. - - The IL generator to use. - The method to test for - the name of the target to be used in error messages - - - - Calls base method directly. - - The IL generator to use. - The method to proxy. - - - - Replaces a raw reference with a reference to a proxy. - - -

- If the target object returns reference to itself -- 'this' -- - we need to treat it as a special case and return a reference - to a proxy object instead. -

-
- The IL generator to use. - The location of the return value. -
- - - Generates code that throws . - - IL generator to use. - the type of the exception to throw - Error message to use. - - - - Base class for proxy builders that can be used - to create a proxy for any class. - - -

- This class provides a set of template - methods that derived classes can override to provide custom behaviour - appropriate to the type of proxy that is being generated (one of - inheritance or composition-based proxying). -

-
- Aleksandar Seovic - Bruno Baia -
- - - Describes the operations for a generic proxy type builder that can be - used to create a proxy type for any class. - - Aleksandar Seovic - - - - Creates the proxy type. - - The generated proxy class. - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - - - - Gets or sets the list of interfaces proxy should implement. - - - - - Should we proxy target attributes? - - - by default. - Target type attributes, method attributes, method's return type attributes - and method's parameter attributes are copied to the proxy. - - - - - The list of custom s that the proxy - class must be decorated with. - - -

- Note that the list is composed of instances of the actual - s that are to be applied, not the - s of the s. -

-
- -

- The following code snippets show examples of how to decorate the - the proxied class with one or more s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary typeAtts = new Hashtable(); - builder.TypeAttributes = typeAtts; - - // applies a single Attribute to the proxied class... - typeAtts = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to the proxied class... - typeAtts = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - The custom s that the proxy - members must be decorated with. - - -

- This dictionary must use simple s for keys - (denoting the member names that the attributes are to be applied to), - with the corresponding values being - s. -

-

- The key may be wildcarded using the '*' character... if so, - then those proxy members that match against the key will be - decorated with the attendant list of - s. This naturally implies that using - the '*' character as a key will result in the attendant list - of s being applied to every member of - the proxied class. -

-
- -

- The following code snippets show examples of how to decorate the - members of a proxied class with one or more - s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary memAtts = new Hashtable(); - builder.MemberAttributes = memAtts; - - // applies a single Attribute to all members of the proxied class... - memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to all members of the proxied class... - memAtts ["*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - - // applies a single Attribute to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - Describes the operations that generates IL instructions - used to build the proxy type. - - Bruno Baia - - - - Generates the IL instructions that pushes - the proxy 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. - - - - The shared instance for this class (and derived classes). - - - - - Creates the proxy type. - - The generated proxy class. - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Creates an appropriate type builder. - - The name to use for the proxy type name. - The type to extends if provided. - The type builder to use. - - - - Applies attributes to the proxy class. - - The type builder to use. - The proxied class. - - - - - - Applies attributes to the proxied method. - - The method builder to use. - The proxied method. - - - - - - Applies attributes to the proxied method's return type. - - The method builder to use. - The proxied method. - - - - - Applies attributes to proxied method's parameters. - - The method builder to use. - The proxied method. - - - - - Calculates and returns the list of attributes that apply to the - specified type. - - The type to find attributes for. - - A list of custom attributes that should be applied to type. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method. - - The method to find attributes for. - - A list of custom attributes that should be applied to method. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method's return type. - - The method to find attributes for. - - A list of custom attributes that should be applied to method's return type. - - - - - - Calculates and returns the list of attributes that apply to the - specified method's parameters. - - The method to find attributes for. - The method's parameter to find attributes for. - - A list of custom attributes that should be applied to the specified method's parameter. - - - - - - Check that the specified object is matching the passed attribute type. - - -

- The specified object can be of different type : -

- - - - - - System.Reflection.CustomAttributeData (Only with .NET 2.0) - - - - - -
- The object instance to check. - The attribute type to test against. - - if the object instance matches the attribute type; - otherwise . - -
- - - Defines the types of the parameters for the specified constructor. - - The constructor to use. - The types for constructor's parameters. - - - - Implements constructors for the proxy class. - - - The builder to use. - - - - - Generates the proxy constructor. - - The constructor builder to use. - The IL generator to use. - The constructor to use. - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - if target virtual methods should not be proxied; - otherwise . - - - - - Gets the mapping of the interface to proxy - into the actual methods on the target type - that does not need to implement that interface. - - -

- If the target type does not implement the interface, - we return the interfaces methods as the target methods for many reasons : -

    -
  • - The target object can change for an object that implements the interface. - (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' - implementation in the Spring AOP framework for an example) -
  • -
  • - Allow Transparent proxies to be proxied. - (See Spring Remoting framework for an example) -
  • -
  • - Allow null target to be proxied. - (See Spring AOP framework which avoid calls to the target object - by intercepting all methods. Think "dynamic mock") - (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) -
  • -
-

-
- - The of the target object. - - The interface to implement. - - An interface mapping for the interface to proxy. - -
- - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - if only members declared at the level - of the supplied 's hierarchy should be proxied; - otherwise . - - - - - Implements the specified . - - The type builder to use. - The type the property is defined on. - The property to proxy. - The implemented methods map. - - - - Implements the specified event. - - The type builder to use. - The type the event is defined on. - The event to proxy. - The implemented methods map. - - - - Returns an array of s that represent - the proxiable interfaces. - - - An interface is proxiable if it's not marked with the - . - - - The array of interfaces from which - we want to get the proxiable interfaces. - - - An array containing the interface s. - - - - - Checks if specified interface is of a special type - that should never be proxied (i.e. ISerializable). - - Interface type to check. - - true if it is, false otherwise. - - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - -

- The default value of this property is the - . -

-
-
- - - Gets or sets the list of interfaces proxy should implement. - - - The default value of this property is all the interfaces - implemented or inherited by the target type. - - - - - Should we proxy target attributes? - - - - - - The list of custom s that the proxy - class must be decorated with. - - - - - - The custom s that the proxy - members must be decorated with. - - - - - - Implementation of IProxyMethodBuilder that delegates method calls to the base class. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Builds a proxy type using composition. - - - - In order for this builder to work, the target must implement - one or more interfaces. - - - Aleksandar Seovic - Bruno Baia - - - - Target instance calls should be delegated to. - - - - - Creates a new instance of the - class. - - - - - Creates a proxy that delegates calls to an instance of the - target object. - - -

- Only interfaces can be proxied using composition, so the target - must implement one or more interfaces. -

-
- The generated proxy class. - - If the - does not implement any interfaces. - -
- - - Create an to create interface implementations - - - - - Allows subclasses to generate additional code - - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Deaclares a field that holds the target object instance. - - - The builder to use for code generation. - - - - - Generates the proxy constructor. - - -

- This implementation creates instance of the target object for delegation - using constructor arguments. -

-
- The constructor builder to use. - The IL generator to use. - The constructor to delegate the creation to. -
- - - Gets or sets a value indicating whether interfaces should be implemented explicitly. - - - if they should be; otherwise, . - - - - - Allows easy access to existing and creation of new dynamic proxies. - - Aleksandar Seovic - Bruno Baia - - - - The name of the assembly that defines proxy types created. - - - - - The attributes of the proxy type to generate. - - - - - Creates an appropriate type builder. - - The proxy type name. - The type to extends if provided. - The type builder to use. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Builds a proxy type using inheritance. - - - - In order for this builder to work, target methods have to be either - , or belong to an interface. - - - Aleksandar Seovic - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Creates a proxy that inherits the proxied object's class. - - -

- Only (non-final) methods can be proxied, - unless they are members of one of the interfaces that target class - implements. In that case, methods will be proxied using explicit - interface implementation, which means that client code will have - to cast the proxy to a specific interface in order to invoke the - methods. -

-
- 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 proxy constructor. - - -

- This implementation delegates the call to a base class constructor. -

-
- The constructor builder to use. - The IL generator to use. - - The base class constructor to delegate the call to. - -
- - - Gets or sets a value indicating whether inherited members should be proxied. - - - if they should be; otherwise, . - - - - - This attribute can be used to mark interfaces that should not be proxied - - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Implementation of IProxyMethodBuilder that delegates method calls to target object. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Base class for dynamic members. - - Aleksandar Seovic - - - - Method attributes constant. - - - - - Sets up target instance for invocation. - - IL generator to use. - Type of target instance. - - - - Sets up invocation argument. - - IL generator to use. - Argument type. - Argument position. - - - - Generates method invocation code. - - IL generator to use. - Flag specifying whether method is static. - Flag specifying whether method is on the value type. - Method to invoke. - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Defines constructors that dynamic constructor class has to implement. - - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Safe wrapper for the dynamic constructor. - - - will attempt to use dynamic - constructor if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached constructor info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe constructor wrapper. - - Constructor to wrap. - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Factory class for dynamic constructors. - - Aleksandar Seovic - - - - Creates dynamic constructor instance for the specified . - - Constructor info to create dynamic constructor for. - Dynamic constructor for the specified . - - - - Defines methods that dynamic field class has to implement. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Safe wrapper for the dynamic field. - - - will attempt to use dynamic - field if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached fieldInfo or creates a new entry, if none is found. - - - - - Creates a new instance of the safe field wrapper. - - Field to wrap. - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Holds cached Getter/Setter delegates for a Field - - - - - Factory class for dynamic fields. - - Aleksandar Seovic - - - - Creates dynamic field instance for the specified . - - Field info to create dynamic field for. - Dynamic field for the specified . - - - - Defines methods that dynamic indexer class has to implement. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Safe wrapper for the dynamic indexer. - - - will attempt to use dynamic - indexer if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe indexer wrapper. - - Indexer to wrap. - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Internal PropertyInfo accessor. - - - - - Factory class for dynamic indexers. - - Aleksandar Seovic - - - - Prevent instantiation - - - - - Creates dynamic indexer instance for the specified . - - Indexer info to create dynamic indexer for. - Dynamic indexer for the specified . - - - - Defines methods that dynamic method class has to implement. - - - - - Invokes dynamic method on the specified target object. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Safe wrapper for the dynamic method. - - - will attempt to use dynamic - method if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe method wrapper. - - Method to wrap. - - - - Invokes dynamic method. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Gets the class, that declares this method - - - - - Factory class for dynamic methods. - - Aleksandar Seovic - - - - Creates dynamic method instance for the specified . - - Method info to create dynamic method for. - Dynamic method for the specified . - - - - Defines methods that dynamic property class has to implement. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Safe wrapper for the dynamic property. - - - will attempt to use dynamic - property if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached property info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe property wrapper. - - Property to wrap. - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Internal PropertyInfo accessor. - - - - - Holds cached Getter/Setter delegates for a Property - - - - - Factory class for dynamic properties. - - Aleksandar Seovic - - - - Creates safe dynamic property instance for the specified . - - -

This factory method will create a dynamic property with a "safe" wrapper.

-

Safe wrapper will attempt to use generated dynamic property if possible, - but it will fall back to standard reflection if necessary.

-
- Property info to create dynamic property for. - Safe dynamic property for the specified . - -
- - - Creates dynamic property instance for the specified . - - Property info to create dynamic property for. - Dynamic property for the specified . - - - - Represents a Get method - - the target instance when calling an instance method - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - Represents an Indexer Get method - - the target instance when calling an instance method - - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - - Represents a method - - the target instance when calling an instance method - arguments to be passed to the method - the value return by the method. null when calling a void method - - - - Represents a constructor - - arguments to be passed to the method - the new object instance - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Allows easy access to existing and creation of new dynamic relection members. - - Aleksandar Seovic - - - - The name of the assembly that defines reflection types created. - - - - - The attributes of the reflection type to generate. - - - - - Cache for dynamic property types. - - - - - Cache for dynamic field types. - - - - - Cache for dynamic indexer types. - - - - - Cache for dynamic method types. - - - - - Cache for dynamic constructor types. - - - - - Creates an appropriate type builder. - - - The base name to use for the reflection type name. - - The type builder to use. - - - - Returns dynamic property if one exists. - - Property to look up. - callback function that will be called to create the dynamic property - An for the given property info. - - - - Returns dynamic field if one exists. - - Field to look up. - callback function that will be called to create the dynamic field - An for the given field info. - - - - Returns dynamic indexer if one exists. - - Indexer to look up. - callback function that will be called to create the dynamic indexer - An for the given indexer. - - - - Returns dynamic method if one exists. - - Method to look up. - callback function that will be called to create the dynamic method - An for the given method. - - - - Returns dynamic constructor if one exists. - - Constructor to look up. - callback function that will be called to create the dynamic constructor - An for the given constructor. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG mode, per ConditionalAttribute rules. - - - - - Create a new Get method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field - - - - Create a new Set method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field. - - If the field's returns true, the returned method - will throw an when called. - - - - - Create a new Get method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to read the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new Set method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to write the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new method delegate for the specified method using - - the method to create the delegate for - a delegate that can be used to invoke the method. - - - - Creates a new delegate for the specified constructor. - - the constructor to create the delegate for - delegate that can be used to invoke the constructor. - - - - Creates a instance with the highest possible code access security. - - - If allowed by security policy, associates the method with the s declaring type. - Otherwise associates the dynamic method with . - - - - - Delegates a Method(object target, params object[] args) call to the actual underlying method. - - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Converts to an instance of if necessary to - e.g. avoid e.g. double/int cast exceptions. - - - - This method mimics the behavior of the compiler that - automatically performs casts like int to double in "Math.Sqrt(4)".
- See about implicit, widening type conversions on MSDN - Type Conversion Tables -
- - Note: is expected to be a value type! - -
-
- - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Indicates that an annotated class is a "component". - Such classes are considered as candidates for future features such - as auto-detection when using attribute-based configuration and assembly scanning. - - Other class-level annotations may be considered as identifying - a component as well, typically a special kind of component: - e.g. the Repository attribute. - - Mark Fisher - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the component. - - - - Gets or sets the name of the component - - The name of the component. - - - - Indicates that an annotated class is a "Repository" (or "DAO"). - - - A class with this attribute is eligible for Spring DataAccessException translation. A class - with the Repository attribute is also clarified as to its role in the overall application - architecture for the purpose of tools, aspects, etc. - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Rod Johnson - Jueren Hoeller - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the repository. - - - - Indicates that an annotated class is a "Service" (e.g. a business service facade). - - - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - - - - Implements by using . - - Erich Eichinger - - - - Specifies the contract a strategy must be implement to store and - retrieve data that is specific to the executing thread. - - - All implementations of this interface must treat keys case-sensitive. - - Erich Eichinger - - - - Retrieves an object with the specified . - - The name of the item. - - The object in the current thread's context associated with the - specified or null if no object has been stored previously - - - - - Stores a given object and associates it with the specified . - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - - If the object with the specified is not found, the method does nothing. - - The name of the object to remove. - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - - Acquire/Release protocol, base of many concurrency utilities. - - - -

objects isolate waiting and notification for particular logical - states, resource availability, events, and the like that are shared - across multiple threads.

- -

Use of s sometimes (but by no means always) adds - flexibility and efficiency compared to the use of plain - .Net monitor methods and locking, and are sometimes (but by no means - always) simpler to program with.

- -

Used for implementation of a

-
- - Doug Lea - Federico Spinazzi (.Net) -
- - Wait (possibly forever) until successful passage. - Fail only upon interuption. Interruptions always result in - `clean' failures. On failure, you can be sure that it has not - been acquired, and that no - corresponding release should be performed. Conversely, - a normal return guarantees that the acquire was successful. - - - - - Potentially enable others to pass. -

- Because release does not raise exceptions, - it can be used in `finally' clauses without requiring extra - embedded try/catch blocks. But keep in mind that - as with any java method, implementations may - still throw unchecked exceptions such as Error or NullPointerException - when faced with uncontinuable errors. However, these should normally - only be caught by higher-level error handlers. -

-
-
- - - Wait at most msecs to pass; report whether passed. -

- The method has best-effort semantics: - The msecs bound cannot - be guaranteed to be a precise upper bound on wait time in Java. - Implementations generally can only attempt to return as soon as possible - after the specified bound. Also, timers in Java do not stop during garbage - collection, so timeouts can occur just because a GC intervened. - So, msecs arguments should be used in - a coarse-grained manner. Further, - implementations cannot always guarantee that this method - will return at all without blocking indefinitely when used in - unintended ways. For example, deadlocks may be encountered - when called in an unintended context. -

-
- the number of milleseconds to wait - An argument less than or equal to zero means not to wait at all. - However, this may still require - access to a synchronization lock, which can impose unbounded - delay if there is a lot of contention among threads. - - true if acquired -
- - A latch is a boolean condition that is set at most once, ever. - Once a single release is issued, all acquires will pass. -

- Sample usage. Here are a set of classes that use - a latch as a start signal for a group of worker threads that - are created and started beforehand, and then later enabled. -

- - class Worker implements IRunnable { - private readonly Latch startSignal; - Worker(Latch l) - { - startSignal = l; - } - - public void Run() { - startSignal.acquire(); - DoWork(); - } - - void DoWork() { ... } - } - - class Driver { // ... - void Main() { - Latch go = new Latch(); - for (int i = 0; i < N; ++i) // make threads - new Thread(new ThreadStart(new Worker(go)).Start(); - DoSomethingElse(); // don't let run yet - go.Release(); // let all threads proceed - } - } - -
- Doug Lea - Federico Spinazzi (.Net) -
- - - can acquire ? - - - - - Method mainly used by clients who are trying to get the latch - - - - Wait at most msecs millisconds for a permit - - - - Enable all current and future acquires to pass - - - - - An abstraction to safely store "ThreadStatic" data. - - - By default, is used to store thread-specific data. - You may switch the storage strategy by calling .

- NOTE: Access to the underlying storage is not synchronized for performance reasons. - You should call only once at application startup! - - Erich Eichinger - - -

- Holds the current strategy. - - - Access to this variable is not synchronized on purpose for performance reasons. - Setting a different strategy should happen only once - at application startup. - -
- - - Set the new strategy. - - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - -

Base class for counting semaphores based on Semaphore implementation - from Doug Lea.

-
- - -

Conceptually, a semaphore - maintains a set of permits. Each acquire() blocks if - necessary until a permit is available, and then takes it.

- -

Each release adds a permit. However, no actual permit objects are used; - the Semaphore just keeps a count of the number available - and acts accordingly.

- -

A semaphore initialized to 1 can serve as a mutual exclusion lock.

- - Used for implementation of a -
- Doug Lea - Federico Spinazzi (.Net) -
- - - current number of available permits - - - - -

Create a Semaphore with the given initial number of permits.

-

Using a seed of 1 makes the semaphore act as a mutual - exclusion lock.

- -

Negative seeds are also allowed, - in which case no acquires will proceed until the number of - releases has pushed the number of permits past 0.

-
-
- - - Release a permit - - - - - Acquire a permit - - - - - Wait at most msecs millisconds for a permit - - number of ms to wait - true if aquired - - - Release N permits. release(n) is - equivalent in effect to: -
-            for (int i = 0; i < n; ++i) release();
-            
- But may be more efficient in some semaphore implementations. -
- if n is negative. - - -
- - Return the current number of available permits. - Returns an accurate, but possibly unstable value, - that may change immediately after returning. - - - - - Utility class to use an with the - C# using () {} idiom - - - - - Creates a new trying to the given - - - the to be held - - - - Creates a new trying to the given - - - the to be held - millisecond to try to acquire the lock - - - - Releases the held - - - - - initializes and acquire access to the - - - - - - Implements by using a hashtable. - - Erich Eichinger - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - Thrown by synchronization classes that report - timeouts via exceptions. The exception is treated - as a form (subclass) of InterruptedException. This both - simplifies handling, and conceptually reflects the fact that - timed-out operations are artificially interrupted by timers. - - - - - The approximate time that the operation lasted before - this timeout exception was thrown. - - - - - - 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. - - - 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. - - - - - Override of GetObjectData to allow for private serialization - - serialization info - streaming context - - - Constructs a TimeoutException with given duration value. - - - - - Constructs a TimeoutException with the - specified duration value and detail message. - - - - - Gets the approximate time that the operation lasted before - this timeout exception was thrown. - - - - A TimeoutSync is an adaptor class that transforms all - calls to acquire to instead invoke attempt with a predetermined - timeout value. - - - - - - the adapted sync - - - - - timeout value - - - - Create a TimeoutSync using the given Sync object, and - using the given timeout value for all calls to acquire. - - - - - Try to acquire the sync before the timeout - - In case a time out occurred - - - - - - - - - - - - - - Support to account for differences between java nad .NET: -
    -
-
-
- - - .NET threads have not a method to check if they have been interrupted. - Moreover, differently from java threads, when entering locked - blocks, Monitor, Sleep, SpinWait and so on, a - will be raised by the runtime. -

Spring.Threading classes usually call this method before entering a lock block, to mirror java code -

Usually this is non issue because the same exception will be raised entering the monitor - associated with the lock () -

-
- if the thread has been interrupted -
- - - Normalize the given so that - is is comparable with . - - Date. - - - - - - - - - the difference between millisecodns of the first and second date - - - - Returns the number of nanoseconds for the current value of - - Current number of nanoseconds - - - - Returns the number of nano seconds represented by the - - to use - Number of nano seconds for - - - - Returns a representing the number of nanoseconds passed in via . - - Number of nanoseconds. - representing the number of nanoseconds passed in. - - - - Placeholder for java.lang.System.currentTimeMillis - - The current machine time in milliseconds - - - - Has been interrupted this thread - - - - - Miscellaneous generic collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Various utility methods relating to the manipulation of arrays. - - Aleksandar Seovic - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Use this sort method instead of to overcome - bugs in Mono. - - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Tests equality of two single-dimensional arrays by checking each element - for equality. - - The first array to be checked. - The second array to be checked. - True if arrays are the same, false otherwise. - - - - Returns hash code for an array that is generated based on the elements. - - - Hash code returned by this method is guaranteed to be the same for - arrays with equal elements. - - - Array to calculate hash code for. - - - A hash code for the specified array. - - - - - Returns string representation of an array. - - - Array to return as a string. - - - String representation of the specified . - - - - - Concatenates 2 arrays of compatible element types - - - If either of the arguments is null, the other array is returned as the result. - The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. - - - - - Assertion utility methods that simplify things such as argument checks. - - -

- Not intended to be used directly by applications. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Checks, whether may be invoked on . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the method to test for - - if is null - - - if it is not possible to invoke on - - - - - checks, whether supports the methods of . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the type to test for - - if is null - - - if it is not possible to invoke methods of - type on - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - If the supplied is . - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is . - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - An arbitrary message that will be passed to any thrown . - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is , contains no elements or only null elements. - - The array or collection to check. - The argument name. - - If the supplied is , - contains no elements or only null elements. - - - - - Checks whether the specified can be cast - into the . - - - The argument to check. - - - The name of the argument to check. - - - The required type for the argument. - - - An arbitrary message that will be passed to any thrown - . - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - The exception message to use if the assertion fails. - - if expression is false - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - - if expression is false - - - - - Assert a bool expression, throwing InvalidOperationException - if the expression is false. - - a boolean expression. - The exception message to use if the assertion fails - if expression is false - - - - Creates a new instance of the class. - - -

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

-
-
- - - General utility methods for working with annotations - - - - - Find a single Attribute of the type 'attributeType' from the supplied class, - traversing it interfaces and super classes if no attribute can be found on the - class iteslf. - - - This method explicitly handles class-level attributes which are not declared as - inherited as well as attributes on interfaces. - - The class to look for attributes on . - Type of the attribibute to look for. - the attribute of the given type found, or null - - - - Miscellaneous collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Adds the specified to the specified . - - The collection to add the element to. - The object to add to the collection. - - - - Adds the specified to the specified . - - The enumerable to add the element to. - The object to add to the collection. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Converts an instance to an instance. - - The instance to be converted. - An instance in which its elements are the elements of the instance. - if the is null. - - - - Copies the elements of the to a - new array of the specified element type. - - The instance to be converted. - The element of the destination array to create and copy elements to - An array of the specified element type containing copies of the elements of the . - - - - Returns the first element contained in both, and . - - The implementation assumes that <<< - the source enumerable. may be null - the list of candidates to match against elements. may be null - the first element found in both enumerables or null - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a value of the given type found, or null if none. - If more than one value of the given type is found - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a collection of matching values of the given type found, empty if none found, or null if the input collection was null. - - - - Find a value of one of the given types in the given Collection, - searching the Collection for a value of the first type, then - searching for a value of the second type, etc. - - The collection to search. - The types to look for, in prioritized order. - a value of the given types found, or null if none - If more than one value of the given type is found - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified dictionary is null empty. - - The dictionary to check. - - true if the specified dictionary is empty or null; otherwise, false. - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A callback method used for comparing to items. - - - - the first object to compare - the second object to compare - Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. - - - - - - Utility class containing helper methods for object comparison. - - Aleksandar Seovic - - - Compares two objects. - First object. - Second object. - - 0, if objects are equal; - less than zero, if the first object is smaller than the second one; - greater than zero, if the first object is greater than the second one. - - - - Utility class for .NET configuration files management. - - Aleksandar Seovic - - - - Avoid BeforeFieldInit pitfall - - - - - Parses the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. - Object created by a corresponding . -
- - - Refresh the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. -
- - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Configuration exception. - - - - Creates the configuration exception. - - Configuration exception. - - - - Determines whether the specified exception is configuration exception. - - The exception to check. - - true if the specified exception is configuration exception; otherwise, false. - - - - - Returns the line number of the specified node. - - Node to get the line number for. - The line number of the specified node. - - - - Returns the name of the file specified node is defined in. - - Node to get the file name for. - The name of the file specified node is defined in. - - - - Sets the current to be used by . - - - íf implements , this method invokes - on the new configSystem to chain them.
- Note, that this method requires reflection on internals of -
- the configuration system to set - bypasses the check if the current system has already been initialized - the previous config system, if any -
- - - Resets the global configuration system instance. Use for unit testing only! - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Gets a string specifying the file/resource name related to the configuration details. - - - - - Gets an integer specifying the line number related to the configuration details. - - - - - Gets an integer specifying the line position related to the configuration details. - - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - An implementation, who's elements retain information - about their location in the original XML text document the were read from. - - - When loading a document, the used must implement . - Typical XmlReader implementations like support this interface. - - Erich Eichinger - - - - Overridden to create a retaining the current - text position information. - - - - - Overridden to create a retaining the current - text position information. - - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store null as their property. - - The XML source - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store as their property. - - - The new XmlNode or null if no more nodes exist. - - the name of the resource - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store null as their property. - - - The new XmlNode or null if no more nodes exist. - - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Get info about the current text position during loading a document. - Outside loading a document, the properties of - will always be null. - - - - - Holds the current text position during loading a document - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - Collects information on the constructor to use to create the instance and the argument instances to pass into the - constructor. - - - - - Initializes a new instance of the class. - - The constructor info. - The arg instances. - - - - Gets the constructor info. - - The constructor info. - - - - Gets the arg instances. - - The arg instances. - - - - Discovers the attributes of a - and provides access to the - s metadata. - - Rick Evans - - - - The method name associated with a delegate invocation. - - - - - Creates a new instance of the - class. - - - The event used to extract the delegate - from. - - - if the supplied is - . - - - - - Creates a new instance of the - class. - - - The delegate . - - - If the supplied is not a subclass of the - class, or is . - - - - - Checks to see if the method encapsulated by the supplied method - metadata is compatible with the method signature associated with - this delegate type. - - The method to be checked. - - if the method signature is compatible with - the signature of this delegate; if not, or - if the supplied parameter is - . - - - - - Gets the s of the parameters of the - method signature associated with this delegate type. - - -

- This method will never return ; the returned - array may be empty, but it most certainly - will not be . -

-
- - A array of the parameter - s; or the - array if the method signature has no parameters. - -
- - - Gets the return of the - method signature associated with this delegate type. - - The return . - - - - Gets the metadata about the method signature associated - with this delegate type. - - - The metadata about the method signature associated - with this delegate type. - - - - - Determines whether the supplied - is a type. - - - The to be checked. - - - if the supplied - is a ; - if not or the supplied - is . - - - - - Checks if the signature of the supplied - is compatible with the signature expected by the supplied - . - - The event to be checked against. - - The method signature to check for compatibility. - - - if the signature of the supplied - is compatible with the signature - expected by the supplied ; - if not or either of the supplied - parameters is . - - - - - - The of the delegate. - - - - - Use this class for obtaining instances for dynamic code generation. - - -

- The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. -

- - Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. - -
- -

The following excerpt from demonstrates usage:

- - public class DynamicProxyManager - { - public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; - - public static TypeBuilder CreateTypeBuilder(string name, Type baseType) - { - // Generates type name - string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); - ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); - return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); - } - } - -
- Erich Eichinger - - - -
- - - prevent instantiation - - - - - Returns the for the dynamic module within the specified assembly. - - - If the assembly does not exist yet, it will be created.
- This factory caches any dynamic assembly it creates - calling GetModule() twice with - the same name will *not* create 2 distinct modules! -
- The assembly-name of the module to be returned - the that can be used to define new types within the specified assembly -
- - - Persists the specified dynamic assembly to the file-system - - the name of the dynamic assembly to persist - - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Removes all registered s. - - - - - A utility class for raising events in a generic and consistent fashion. - - Rick Evans - - - - Create a new EventRaiser instance - - - - - Raises the event encapsulated by the supplied - , passing the supplied - to the event. - - The event to be raised. - The arguments to the event. - a map of sink/exception entries that occurred during event raising - - - - Invokes the supplied , passing the supplied - to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Raises events defensively. - - -

- Raising events defensively means that as the raised event is passed to each handler, - any thrown by a handler will be caught and silently - ignored. -

-
- Rick Evans -
- - - Defensively invokes the supplied , passing the - supplied to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Implement this interface to create your own, delegating - and set them using - - - - - - - - - - - A strategy for handling errors. This is especially useful for handling - errors that occur during asynchronous execution as in such cases it may not be - possible to throw the error to the original caller. - - Mark Fisher - Mark Pollack (.NET) - - - - Handles the error. - - The exception. - - - - Utility methods for IO handling - - - - - Copies one stream into another. - (Don't forget to call on the destination stream!) - - - Does not close the input stream! - - - - - Reads a stream into a byte array. - - - Does not close the input stream! - - - - - Various utility methods relating to numbers. - - -

- Mainly for internal use within the framework. -

-
- Aleksandar Seovic -
- - - Determines whether the supplied is an integer. - - The object to check. - - if the supplied is an integer. - - - - - Determines whether the supplied is a decimal number. - - The object to check. - - if the supplied is a decimal number. - - - - - Determines whether the supplied is of numeric type. - - The object to check. - - true if the specified object is of numeric type; otherwise, false. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to a number. - - The object to check. - - true if the specified object is decimal number; otherwise, false. - - - - - Is the supplied equal to zero (0)? - - The number to check. - - id the supplied is equal to zero (0). - - - - - Negates the supplied . - - The number to negate. - The supplied negated. - - If the supplied is not a supported numeric type. - - - - - Returns the bitwise not (~) of the supplied . - - The number. - The value of ~. - - If the supplied is not a supported numeric type. - - - - - Bitwise ANDs (&) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise ORs (|) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise XORs (^) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Adds the specified numbers. - - The first number. - The second number. - - - - Subtracts the specified numbers. - - The first number. - The second number. - - - - Multiplies the specified numbers. - - The first number. - The second number. - - - - Divides the specified numbers. - - The first number. - The second number. - - - - Calculates remainder for the specified numbers. - - The first number (dividend). - The second number (divisor). - - - - Raises first number to the power of the second one. - - The first number. - The second number. - - - - Coerces the types so they can be compared. - - The right. - The left. - - - - Creates a new instance of the class. - - -

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

-
-
- - - Helper methods with regard to objects, types, properties, etc. - - -

- Not intended to be used directly by applications. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The instance for this class. - - - - - An empty object array. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Instantiates the type using the assembly specified to load the type. - - This is a convenience in the case of needing to instantiate a type but not - wanting to specify in the string the version, culture and public key token. - The assembly. - Name of the type. - - - If the or is - - - If cannot load the type from the assembly or the call to InstantiateType(Type) fails. - - - - - Convenience method to instantiate a using - its no-arg constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The to instantiate* - - A new instance of the . - - If the is - - - If the is an abstract class, an interface, - an open generic type or does not have a public no-argument constructor. - -
- - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. - - - - - Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains - open generic type parameters. - - The type. - - - - Convenience method to instantiate a using - the given constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The constructor to use for the instantiation. - - - The arguments to be passed to the constructor. - - A new instance. - - If the is - - - If the 's declaring type is an abstract class, - an interface, an open generic type or does not have a public no-argument constructor. - -
- - - Checks whether the supplied is not a transparent proxy and is - assignable to the supplied . - - -

- Neccessary when dealing with server-activated remote objects, because the - object is of the type TransparentProxy and regular is testing for assignable - types does not work. -

-

- Transparent proxy instances always return when tested - with the 'is' operator (C#). This method only checks if the object - is assignable to the type if it is not a transparent proxy. -

-
- The target to be checked. - The value that should be assigned to the type. - - if the supplied is not a - transparent proxy and is assignable to the supplied . - -
- - - Determine if the given is assignable from the - given value, assuming setting by reflection and taking care of transparent proxies. - - -

- Considers primitive wrapper classes as assignable to the - corresponding primitive types. -

-

- For example used in an object factory's constructor resolution. -

-
- The target . - The value that should be assigned to the type. - True if the type is assignable from the value. -
- - - Check if the given represents a - "simple" property, - i.e. a primitive, a , a - , or a corresponding array. - - -

- Used to determine properties to check for a "simple" dependency-check. -

-
- - The to check. - -
- - - Check if the given class represents a primitive array, - i.e. boolean, byte, char, short, int, long, float, or double. - - - - - Determines whether the specified array is null or empty. - - The array to check. - - true if the specified array is null empty; otherwise, false. - - - - - Determine if the given objects are equal, returning - if both are respectively - if only one is . - - The first object to compare. - The second object to compare. - - if the given objects are equal. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - If the supplied is . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - If the supplied is . - - - - - Gets the qualified name of the given method, consisting of - fully qualified interface/class name + "." method name. - - The method. - qualified name of the method. - - - - Return a String representation of an object's overall identity. - - The object (may be null). - The object's identity as String representation, - or an empty String if the object was null - - - - - Gets a hex String form of an object's identity hash code. - - The obj. - The object's identity code in hex notation - - - - Support matching of file system paths in a manner similar to that of the - NAnt FileSet. - - -

- Any (back)slashes are converted to forward slashes. -

-
- - - // true - PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); - PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); - PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); - // false - PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); - - - Federico Spinazzi -
- - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - should the match consider the case - - if the path is matched by the pattern; - otherwise . - - - - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - - if the path is matched by the pattern; - otherwise . - - - - - Replaces back(slashes) with forward slashes. - - - The path or the pattern to modify. - - A forward-slashed string. - - - - Helper method to convert a NAnt-like pattern into the - appropriate pattern for a regular expression. - - The NAnt-like pattern. - A regex-compatible pattern. - - - - Creates a new instance of the class. - - -

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

-
-
- - Utility methods for simple pattern matching, in particular for - Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. - - Juergen Hoeller - Mark Pollack - - - Match a String against the given pattern, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the pattern to match against - - the String to match - - whether the String matches the given pattern - - - - Match a String against the given patterns, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the patterns to match against - - the String to match - - whether the String matches any of the given patterns - - - - - An implementation of the Java Properties class. - - - For the complete syntax see java.util.Properties JavaDoc. - This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. - - - key1 = value - key2: - key3 - - will result in the name/value pairs: - - key1:="value" - key2:=string.Empty - key3:=<null> - - note, that to specify a null value, the key must not be followed by any character except newline. - - - Simon White - - - - Creates an empty property list with no default values. - - - - - Creates a property list with the specified initial properties. - - The initial properties. - - - - Reads a property list (key and element pairs) from the input stream. - - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - The text reader to load from. - - - - Reads a property list (key and element pairs) from the input stream. - - the dictionary to put it in - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - the dictionary to put it in - The text reader to load from. - - - - Strips whitespace from the front of the specified string. - - The string. - The string with all leading whitespace removed. - - - - Splits the specified string into a key / value pair. - - The line to split. - An array containing the key / value pair. - - - - Searches for the property with the specified key in this property list. - - The key. - The property, or null if the key was not found. - - - - Searches for the property with the specified key in this property list. - - The key. - - The default value to be returned if the key is not found. - - The property, or the default value. - - - - Writes this property list out to the specified stream. - - The stream to write to. - - - - Sets the specified property key / value pair. - - The key. - The value. - - - - Writes the properties in this instance out to the supplied stream. - - The stream to write to. - Arbitrary header information. - - - - Removes the key / value pair identified by the supplied key. - - - The key identifying the key / value pair to be removed. - - - - - Adds the specified key / object pair to this collection. - - The key. - The value. - - - - Adds the specified key / object pair to this collection. - - - - - Various reflection related methods that are missing from the standard library. - - Rod Johnson - Juergen Hoeller - Aleksandar Seovic (.NET) - Stan Dvoychenko (.NET) - Bruno Baia (.NET) - - - - Convenience value that will - match all private and public, static and instance members on a class - in a case inSenSItivE fashion. - - - - - Avoid BeforeFieldInit problem - - - - - Checks, if the specified type is a nullable - - - - - Returns signature for the specified , method name and argument - s. - - The the method is in. - The method name. - - The argument s. - - The method signature. - - - - Returns method for the specified , method - name and argument - s. - - - Searches with BindingFlags - When dealing with interface methods, you probable want to 'normalize' method references by calling - . - - - - The target to find the method on. - - The method to find. - - The argument s. May be - if the method has no arguments. - - The target method. - - - - - Resolves a given to the representing the actual implementation. - - - see article How To Get an Explicit Interface Implementation Method. - - a - the type to lookup - the representing the actual implementation method of the specified - - - - Returns an array of parameter s for the specified method - or constructor. - - The method (or constructor). - An array containing the parameter s. - - If is . - - - - - Returns an array of parameter s for the - specified parameter info array. - - The parameter info array. - An array containing parameter s. - - If is or any of the - elements is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The method. - An array containing the parameter names. - - If is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The parameter info array. - An array containing parameter names. - - If is or any of the - elements is . - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the type of method (used for exception reporting only) - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of constructors, selects the constructor having an exact match on the given ' types. - - the list of constructors to choose from - the arguments to the method - the constructor matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - Packages arguments into argument list containing parameter array as a last argument. - - Argument vaklues to package. - Total number of oarameters. - Type of the param array element. - Packaged arguments. - - - - Convenience method to convert an interface - to a array that contains - all the interfaces inherited and the specified interface. - - The interface to convert. - An array of interface s. - - If the specified is not an interface. - - - If is . - - - - - Is the supplied the default indexer for the - supplied ? - - - The name of the property on the supplied to be checked. - - - The to be checked. - - - if the supplied is the - default indexer for the supplied . - - - If the supplied is . - - - - - Is the supplied declared on one of these interfaces? - - The method to check. - The array of interfaces we want to check. - - if the method is declared on one of these interfaces. - - - If any of the s specified is not an interface. - - - If or any of the specified interfaces is - . - - - - - Returns the default value for the specified - - -

- Follows the standard .NET conventions for default values where - relevant; for example, all numeric types default to the value - 0. -

-
- - The to return default value for. - - - The default value for the specified . - - - If the supplied is an enumerated type that - has no values. - -
- - - Returns an array consisting of the default values for the supplied - . - - - The array of s to return default values for. - - - An array consisting of the default values for the supplied - . - - - If any of the elements in the supplied - array is an enumerated type that has no values. - - - - - - Checks that the parameter s of the - supplied match the parameter - s of the supplied - . - - The method to be checked. - - The array of parameter s to check against. - - - if the parameter s - match. - - - - - Returns an array containing the s of the - objects in the supplied array. - - - The objects array for which the corresponding s - are needed. - - - An array containing the s of the objects - in the supplied array; this array will be empty (but not - if the supplied - is null or has no elements. - - -

- [C#]
- Given an array containing the following objects, - [83, "Foo", new object ()], the - array returned from this method call would consist of the following - elements... - [Int32, String, Object]. -

-
-
- - - Given the return its representation as - it would appear in the source code files. - - - Largely intended to handle generic types where .ToString() will typically return: - "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" - and this method will instead return: - "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" - - The type. - Friendly string representing the Type - - - - Does the given and/or it's superclasses - have at least one or more methods with the given name (with any - argument types)? - - -

- Includes non-public methods in the methods searched. -

-
- - The to be checked. - - - The name of the method to be searched for. Case inSenSItivE. - - - if the given or / and it's - superclasses have at least one or more methods (with any argument types); - if not, or either of the parameters is . - -
- - - Within , counts the number of overloads for the method with the given (case-insensitive!) - - The type to be searched - the name of the method for which overloads shall be counted - The number of overloads for method within type - - - - Creates a . - - -

- Note that if a non- - is supplied, any read write properties exposed by the - will be used to overwrite values that may have been passed in via the - . That is, the will be used - to initialize the custom attribute, and then any read-write properties on the - will be plugged in. -

-
- - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - If the parameter is . - - - If the parameter is not a - that derives from the class. - - -
- - - Creates a . - - - The desired . - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - - - Creates a . - - - The source attribute to copy properties from. - - A custom attribute builder. - - If the supplied is - . - - - - - Creates a . - - - The desired . - - A custom attribute builder. - - - - Creates a . - - - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - A custom attribute builder. - - - - Creates a . - - - The to create - the custom attribute builder from. - - A custom attribute builder. - - - - Calculates and returns the list of attributes that apply to the - specified type or method. - - The type or method to find attributes for. - - A list of custom attributes (CustomAttributeData or Attribute instances) - that should be applied to type or method. - - - - - Tries to find matching methods in the specified - for each method in the supplied list. - - - The to look for matching methods in. - - The methods to match. - - A flag that specifies whether to throw an exception if a matching - method is not found. - - A list of the matched methods. - - If either of the or - parameters are . - - - - - Returns the of the supplied - . - - -

- If the is a - instance, the return value of this method call with be the - parameter cast to a - . If the is - anything other than a , the return value - will be the result of invoking the 's - method. -

-
- - A or instance. - - - The argument if it is a - or the result of invoking - on the argument if it - is an . - - - If the is . - -
- - - Unwraps the supplied - and returns the inner exception preserving the stack trace. - - - The to unwrap. - - The unwrapped exception. - - - - Is the supplied can be accessed outside the assembly ? - - The type to check. - - if the type can be accessed outside the assembly; - Otherwise . - - - - - Determines whether the specified type is nullable. - - The type. - - true if the specified type is ullable]; otherwise, false. - - - - - Is the supplied can be accessed - from the supplied friendly assembly ? - - The type to check. - The friendly assembly name. - - if the type can be accessed - from the supplied friendly assembly; Otherwise . - - - - - Gets all of the interfaces implemented by - the specified . - - - The object to get the interfaces of. - - - All of the interfaces implemented by the - . - - - - - Returns the explicit that is the root cause of an exception. - - - If the InnerException property of the current exception is a null reference - or a , returns the current exception. - - The last exception thrown. - - The first explicit exception thrown in a chain of exceptions. - - - - - Copies all fields from one object to another. - - - The types of both objects must be related. This means, that either of the following is true: - - fromObject.GetType() == toObject.GetType() - fromObject.GetType() is derived from toObject.GetType() - toObject.GetType() is derived from fromObject.GetType() - - - The source object - The object, who's fields will be populated with values from the source object - If the object's types are not related - - - - Convenience method that uses reflection to return the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to retrieve the field value. - Name of the field on the object from which to retrieve the value. - - - - - Convenience method that uses reflection to set the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to set the field value. - Name of the field on the object to which to set the value. - The field value to set. - - - - Creates a . - - Bruno Baia - - - - Creates a new instance of the - class. - - The custom attribute type. - - - - Creates a new instance of the - class. - - The custom attribute type. - The custom attribute constructor arguments. - - - - Adds the specified values to the constructor argument list - used to create the custom attribute. - - An array of argument values. - - - - Adds a property value to the custom attribute. - - The property name. - The property value. - - - - Creates the . - - The created . - - - - Utility class to be used from within this assembly for executing security critical code - NEVER EVER MAKE THIS PUBLIC! - - Erich Eichinger - - - - Miscellaneous utility methods. - - -

- Mainly for internal use within the framework. -

-
- Rod Johnson - Juergen Hoeller - Keith Donald - Aleksandar Seovic (.NET) - Mark Pollack (.NET) - Rick Evans (.NET) - Erich Eichinger (.NET) -
- - - The string that signals the start of an Ant-style expression. - - - - - The string that signals the end of an Ant-style expression. - - - - - An empty array of instances. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - An array of the tokens. -
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - - - Pairs of quote characters. within a pair of quotes are ignored - - An array of the tokens. -
- - - Convert a CSV list into an array of s. - - - Values may also be quoted using doublequotes. - - A CSV list. - - An array of s, or the empty array - if is . - - - - - Take a which is a delimited list - and convert it to a array. - - -

- If the supplied is a - or zero-length string, then a single element - array composed of the supplied - will be - eturned. If the supplied - is , then an empty, - zero-length array will be returned. -

-
- - The to be parsed. - - - The delimeter (this will not be returned). Note that only the first - character of the supplied is used. - - - An array of the tokens in the list. - -
- - - Convenience method to return an - as a delimited - (e.g. CSV) . - - - The to parse. - - - The delimiter to use (probably a ','). - - The delimited string representation. - - - - Convenience method to return an - as a CSV - . - - - The to display. - - The delimited string representation. - - - - Convenience method to return an array as a CSV - . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - - - Convenience method to return a - array as a delimited (e.g. CSV) . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - The delimiter to use (probably a ','). - - - - Checks if a string has length. - - The string to check, may be . - - - if the string has length and is not - . - - - - StringUtils.HasLength(null) = false - StringUtils.HasLength("") = false - StringUtils.HasLength(" ") = true - StringUtils.HasLength("Hello") = true - - - - - - Checks if a has text. - - -

- More specifically, returns if the string is - not , it's is > - zero (0), and it has at least one non-whitespace character. -

-
- - The string to check, may be . - - - if the is not - , - > zero (0), and does not consist - solely of whitespace. - - - - StringUtils.HasText(null) = false - StringUtils.HasText("") = false - StringUtils.HasText(" ") = false - StringUtils.HasText("12345") = true - StringUtils.HasText(" 12345 ") = true - - -
- - - Checks if a is - or an empty string. - - -

- More specifically, returns if the string is - , it's is equal - to zero (0), or it is composed entirely of whitespace - characters. -

-
- - The string to check, may (obviously) be . - - - if the is - , has a length equal to zero (0), or - is composed entirely of whitespace characters. - - - - StringUtils.IsNullOrEmpty(null) = true - StringUtils.IsNullOrEmpty("") = true - StringUtils.IsNullOrEmpty(" ") = true - StringUtils.IsNullOrEmpty("12345") = false - StringUtils.IsNullOrEmpty(" 12345 ") = false - - -
- - - Returns , if it contains non-whitespaces. null otherwise. - - - - - Strips first and last character off the string. - - The string to strip. - The stripped string. - - - - Returns a list of Ant-style expressions from the specified text. - - The text to inspect. - - A list of expressions that exist in the specified text. - - - If any of the expressions in the supplied - is empty (${}). - - - - - Replaces Ant-style expression placeholder with expression value. - - -

- -

-
- The string to set the value in. - The name of the expression to set. - The expression value. - - A new string with the expression value set; the - value if the supplied - is , has a length - equal to zero (0), or is composed entirely of whitespace - characters. - -
- - - Surrounds (prepends and appends) the string value of the supplied - to the supplied . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The prefix and suffix that respectively will be prepended and - appended to the target . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - The surrounded string. -
- - - Surrounds (prepends and appends) the string values of the supplied - and to the supplied - . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The value that will be prepended to the . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - - The value that will be appended to the . If this value - is not a value, it's attendant - value will be used. - - The surrounded string. -
- - - Converts escaped characters (for example "\t") within a string - to their real character. - - The string to convert. - The converted string. - - - - Utility class containing miscellaneous system-level functionality. - - Aleksandar Seovic - - - - Registers assembly resolver that iterates over the - assemblies loaded into the current - in order to find an assembly that cannot be resolved. - - - This method has to be called if you need to serialize dynamically - generated types in transient assemblies, such as Spring AOP proxies, - because standard .NET serialization engine always tries to load - assembly from the disk. - - - - - Returns true if running on Mono - - Tests for the presence of the type Mono.Runtime - - - - Returns true if running on CLR 4.0 under InProc SxS mode - - - - - Gets the thread id for the current thread. Use thread name is available, - otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and - CurrentThread.ManagedThreadId otherwise. - - The thread id. - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Creates a new TextPositionInfo instance. - - - - - Creates a new TextPositionInfo instance, copying values from another instance. - - - - - The filename related to this text position - - - - - The line number related to this text position - - - - - The line position related to this text position - - - - - UniqueKey allows for generating keys unique to a type or particular instance and a partial name, - that can e.g. be used as keys in . - - - // shows usage type-scoped keys - UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); - UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); - - HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; - Assert.AreEqual( "some value unique for class A having key 'myKey'", value); - - HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; - Assert.AreEqual( "some value unique for class B having key 'myKey'", value); - - - - - Initialize a new instance of from its string representation. - See and See for details. - - The string representation of the new instance. - - - - Compares this instance to another. - - - - - Compares this instance to another. - - - - - Returns the hash code for this key. - - - - - - Returns a string representation of this key. - - - - - Creates a new key instance unique to the given instance. - - The instance the key shall be unique to - The partial key to be made unique - - - If is of type - - - - Creates a new key instance unique to the given type. - - The type the key shall be unique to - The partial key to be made unique - - - - Returns a key unique for the given instance. - - The instance the key shall be unique to - The partial key to be made unique - A key formatted as typename[instance-id].partialkey - - - - Returns a key unique for the given type. - - The type the key shall be unique to - The partial key to be made unique - A key formatted as typename.partialkey - - - - XML utility methods. - - Aleksandar Seovic - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - to be used for resolving external references - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - - A non-validating implementation. - - - - - Implementation of that adds error message - to the validation errors container. - - Aleksandar Seovic - - - - Abstract base class that should be extended by all - validation actions. - - -

- This class implements template Execute method - and defines OnValid and OnInvalid methods that - can be overriden - by specific validation actions. -

-
- Aleksandar Seovic -
- - - An action that should be executed after validator is evaluated. - - -

- This interface allows us to define the actions that should be executed - after validation in a generic fashion. -

-

- For example, addition of error messages to validation errors collection - is performed by one specific implementation of this interface, . -

-
- Aleksandar Seovic -
- - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Initializes a new instance of the class. - - - - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is not valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Evaluates 'when' expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - Error message resource identifier. - Names of the error providers this message should be added to. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Resolves the error message. - - Validation context to resolve message parameters against. - Additional context parameters. - Resolved error message - - - - Resolves the message parameters. - - List of parameters to resolve. - Validation context to resolve parameters against. - Additional context parameters. - Resolved message parameters. - - - - Sets the expressions that should be resolved to error message parameters. - - The expressions that should be resolved to error message parameters. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression that defines the exception to throw when the validator is not valid. - - - - Initializes a new instance of the class with an expression - that defines the exception to throw. - - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the exception to throw - - The throws. - - - - Implementation of that allows you - to define Spring.NET expressions that should be evaluated after - validation. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression to execute when validator is valid. - - The expression to execute when validator is valid. - - - - Gets or sets the expression to execute when validator is not valid. - - The expression to execute when validator is not valid. - - - - Implementation of the custom configuration parser for validator definitions. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parses the validator definition. - - Validator's identifier. - The element to parse. - The parser helper. - Validator object definition. - - - - Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with - the parsed value. - - - - - Parses and potentially registers a validator. - - - Only validators that have id attribute specified are registered - as separate object definitions within application context. - - Validator XML element. - The parser helper. - Validator object definition. - - - - Gets the name of the object type for the specified element. - - The element. - The name of the object type. - - - - Creates an error message action based on the specified message element. - - The message element. - The parser helper. - The error message action definition. - - - - Creates a generic action based on the specified element. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Creates object definition for the validator reference. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Evaluates validator test using condition evaluator. - - Aleksandar Seovic - - - - Base class that defines common properties for all single validators. - - -

- Custom single validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class that defines common properties for all validators. - - -

- Custom validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - An object that can validate application-specific objects. - - -

- The primary motivation for this interface is to enable validation to be - decoupled from the (user) interface and placed in business objects. -

-

- Application developers writing their own custom - implementations will - typically not implement this interface directly. In most cases, custom - validators woud be better served deriving from the - class, with the - custom validation ligic being implemented in an override of the - - - template method. -

-
- Aleksandar Seovic - -
- - - Validates the specified object. - - The object to validate. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Evaluates when expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Processes the error messages. - - Whether validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Gets or sets the validation actions. - - The actions that should be executed after validation. - - - - Creates a new instance of the validator without any - and criteria - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates test object. - - Object to validate. - True if specified object is valid, False otherwise. - - - - Evaluates test expression. - - Root context to use for expression evaluation. - Additional context parameters. - Result of the test expression evaluation, or validation context if test is null. - - - - Gets or sets the test expression. - - The test expression. - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Evaluates the test using condition evaluator. - - -

- Test can be any logical expression that is supported by the Spring.NET logical - expression evaluation engine, and can use any variables that can be resolved - by the variable resolver used by the validation engine. -

-
- The object to validate. - - if the supplied is valid. - -
- - - Perform credit card validations. - - - By default, all supported card types are allowed. You can specify - which credit card type validator should be used by setting - the value of property to a concrete - instance. - - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid credit card number. - - The object to validate. - - if the supplied is valid - credit card number. - - - - - Checks if the is a valid credit card number. - - - The card number to validate. - - - true if the card number is valid. - - - - - Validates card number with the specified validator. - - - Credit card number to validate. - - - true if credit card number is a valid number of credit card type specified. - - - - - Checks for a valid credit card number. - - - Credit Card Number. - - - true if the card number passes the LuhnCheck. - - - - - Credit card type validator to use. - - - Can be concrete implementations of - interface. The following are available implementations: - , , , - . - - - - - CreditCardType interface defines how validation is performed - for one type/brand of credit card. - - - - - Returns true if the card number matches this type of - credit card. - - - The card number, never null. - - - true if the number matches. - - - - - Visa credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a visa number. - - - - - American Express credit card type validation support. - - - - - Indicates, wheter the given credit card number matches an amex number. - - - - - Discover credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a discover number. - - - - - Mastercard credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a mastercard number. - - - - - Perform email validations. - - -

- This implementation is not guaranteed to catch all possible errors in an - email address. For example, an address like nobody@noplace.nowhere will - pass validator, even though there is no TLD "nowhere". - - Goran Milosavljevic - - -

- Creates a new instance of the EmailValidator class. - -
- - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid e-mail address. - - The object to validate. - - if the supplied is valid - e-mail address. - - - - - Regular expression used for validation of object passed to this . - - - - - Validates that the object is valid ISBN-10 or ISBN-13 value. - - Goran Milosavljevic - - - - Creates a new instance of the ISBNValidator class. - - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the ISBN-10 or - ISBN-13 validation rules. - - The object to validate. - - if the supplied is valid ISBN. - - - - - Validates against ISBN-10 or ISBN-13 validation - rules. - - - ISBN string to validate. - - - true if is a valid ISBN-10 or ISBN-13 code. - - - - - ISBN-10 consists of 4 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 1-5 characters, second 1-7, third 1-6, - and fourth is 1 digit or an X. - - - - - ISBN-13 consists of 5 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 978 or 979, the second group is - 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. - - - - - Validates that object matches specified regular expression. - - -

- The test expression must evaluate to a ; - otherwise, an exception is thrown. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Validates an object. - - Object to validate. - - if the supplied - object is valid. - - - If the supplied is not a - - - - - - The regular expression text to match against. - - The regular expression text. - - - - Gets or sets a value indicating whether to do a partial match instead of a full match. - Default is false. - - - - - The for the regular expression evaluation. - - The regular expression evaluation options. - - - - - Validates that required value is not empty. - - -

- This validator uses following rules to determine if target value is valid: - - - - - - - - - - - - - - - - - - - - - - - - - -
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
-

-

- You cannot use this validator to validate any value types other than the ones - specified in the table above. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a variable expression that will be evaluated and the object - obtained as a result of this evaluation will be tested using the rules described - in the class overview of the - class. - - The object to validate. - - if the supplied is valid. - - - - - Validates that the value is valid URL. - - Goran Milosavljevic - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the URL validation rules. - - The object to validate. - - if the supplied is valid. - - - - - Regular expression used for validation of object passed to this . - - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one or more of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

Note, that defaults to true for this validator type!

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class for composite validators - - - - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the child validators. - - The validators. - - - - When set true, shortcircuits evaluation. - - - Setting this property true causes the evaluation process to prematurely abort - if the end result is known. Any remaining child validators will not be considered then. - Setting this value false causes implementations to evaluate all child validators, regardless - of the potentially already known result. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - implementation that supports validating collections. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid for all of the objects in the specified collection. -

-

- You can specify if you want to validate all of the collection elements regardless of the errors by - setting the property to false. -

-

Note, that defaults to true for this validator type!

-

- If you set the IncludeElementErrors property to true, - ValidationErrors collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. -

-
- Damjan Tomic - Aleksandar Seovic -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The bool that determines if all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Validates the specified collection of objects. - If the IncludeElementErrors property was set to true, - collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. - - The collection to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the value that indicates whether to validate all elements of the collection - regardless of the errors. - - This is just an alias for property - - - - Gets or sets the value that indicates whether to capture all the errors of the specific - elements of the collection - - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one and only one of the validators in the Validators collection are valid -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

- By default, this validator group uses == true semantics. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - An interface that validation errors containers have to implement. - - Aleksandar Seovic - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied error . - - -

- If there are no errors for the supplied , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all error providers. - - - - - Allows developers to specify which validator should be used - to validate method argument. - - Damjan Tomic - Aleksandar Seovic - - - - Creates an attribute instance. - - - The name of the validator to use (must be defined within - Spring application context). - - - - - Gets the name of the validator to use. - - The name of the validator to use. - - - - A container for validation errors. - - -

- This class groups validation errors by validator names and allows - access to both the complete errors collection and to the errors for a - certain validator. -

-
- Aleksandar Seovic - Goran Milosavljevic -
- - - Default constructor. - - - - - This property is reserved, apply the - - to the class instead. - - - An that describes the - XML representation of the object that is produced by - the - method and consumed by the - - method. - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all providers. - - - - - Thrown by the validation advice if the method parameters validation fails. - - Aleksandar Seovic - - - - Creates a new instance of the ValidationException class. - - - - - Creates a new instance of the ValidationException class with - specified validation errors. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the ValidationException class with the - specified message and validation errors. - - - A message about the exception. - - - Validation errors. - - - - - Creates a new instance of the ValidationException 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 ValidationException class with the - specified message, root cause and validation errors. - - - A message about the exception. - - - The root exception that is being wrapped. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Implements object serialization. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Gets validation errors. - - Validation errors. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Represents a reference to an externally defined validator object - - -

- This class allows validation groups to reference validators that - are defined outside of the group itself. -

-

- It also allows users to narrow the context for the referenced validator - by specifying value for the Context property. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the name of the referenced validator. - - The name of the referenced validator. - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - 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. - -
- - + + + + Spring.Core + + + + + An abstract implementation that can + be used as base class for concrete implementations. + + Aleksandar Seovic + Erich Eichinger + + + + Defines a contract that all cache implementations have to fulfill. + + Aleksandar Seovic + Erich Eichinger + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method have no expiration time + and default cache priority. + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method use the default + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + If equals , + or is true, this cache + instance's value will be applied. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Actually does the cache implementation specific insert operation into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Gets/Set the Default time-to-live (TTL) for items inserted into this cache. + Used by + + + + + Gets/Sets a value, whether the this cache instance's + shall be applied to all items, regardless of their individual TTL + when is called. + + + + + Gets the number of items in the cache. + + + May be overridden by subclasses for cache-specific efficient implementation. + + + + + Gets a collection of all cache item keys. + + + + + Abstract base class containing shared properties for all cache attributes. + + Aleksandar Seovic + + + + The instance used to parse values. + + + + + + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + The cache key cannot evaluate be null or an empty string. + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the cache key for the item. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + Gets an expression instance that should be evaluated in order + to determine the cache key for the item. + + + An expression instance that should be evaluated in order to determine + the cache key for the item. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether the item should be cached. + + + An expression string that should be evaluated in order to determine + whether the item should be cached. + + + + + Gets an expression instance that should be evaluated in order + to determine whether the item should be cached. + + + An expression instance that should be evaluated in order to determine + whether the item should be cached. + + + + + The amount of time an object should remain in the cache. + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache + formatted to be recognizable by . + + + + + The amount of time an object should remain in the cache (in seconds). + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache (in seconds). + + + + + This attribute should be used to mark methods whose argument(s) + need to be cached. + + +

+ This attribute allows application developers to specify that an argument + of the method should be cached, but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheParameterAdvice to + all of the members that have this attribute defined. +

+

+ You can specify this attribute multiple times on the same method in order to + cache several method parameters. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark methods whose result + needs to be cached. + + +

+ This attribute allows application developers to mark that a result + of the method invocation should be cached, but it will not do any + caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used with methods that return an + in order to cache each item separately. + + +

+ This attribute allows application developers to specify that each item + from the collection returned by the method should be cached, + but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark method that should + invalidate one or more cache items when invoked. + + +

+ This attribute allows application developers to specify that some + cache items should be evicted from cache when the method is invoked, + but it will not do any eviction by itself. +

+

+ In order to actually evict cache items, an application developer + must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression string that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether items should be evicted. + + + An expression string that should be evaluated in order to determine + whether items should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine whether items should be evicted. + + + An expression instance that should be evaluated in order to determine + whether items should be evicted. + + + + + A simple implementation backed by a dictionary that + never expires cache items. + + Aleksandar Seovic + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL) in milliseconds. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + +

DictionarySet is an abstract class that supports the creation of new Set + types where the underlying data store is an IDictionary instance.

+ +

You can use any object that implements the IDictionary interface to hold set data. + You can define your own, or you can use one of the objects provided in the Framework. + The type of IDictionary you choose will affect both the performance and the behavior + of the Set using it.

+ +

To make a Set typed based on your own IDictionary, simply derive a + new class with a constructor that takes no parameters. Some Set implmentations + cannot be defined with a default constructor. If this is the case for your class, + you will need to override Clone() as well.

+ +

It is also standard practice that at least one of your constructors takes an ICollection or + an ISet as an argument.

+
+
+ +

A collection that contains no duplicate elements. This class models the mathematical + Set abstraction, and is the base class for all other Set implementations. + The order of elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + Operator + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + | + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + & + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + ^ + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + - + + +
+
+ + +

A collection that contains no duplicate elements. This interface models the mathematical + Set abstraction. + The order of elements in a set is dependent on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guaranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns if this set contains no elements. + + + + + A collection that contains no duplicate elements. + + +

+ This interface models the mathematical + abstraction. The order of + elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various + methods, and thus is not + guaranteed. +

+

+ overrides the + method to test for "equivalency": + whether the two sets contain the same elements. The "==" and "!=" + operators are not overridden by design, since it is often desirable to + compare object references for equality. +

+

+ Also, the method is not + implemented on any of the set implementations, since none of them are + truly immutable. This is by design, and it is the way almost all + collections in the .NET framework function. So as a general rule, don't + store collection objects inside + instances. You would typically want to use a keyed + instead. +

+

+ None of the implementations in + this library are guaranteed to be thread-safe in any way unless wrapped + in a . +

+

+ The following table summarizes the binary operators that are supported + by the class. +

+ + + Operation + Description + Method + + + Union (OR) + + Element included in result if it exists in either A OR + B. + + Union() + + + Intersection (AND) + + Element included in result if it exists in both A AND + B. + + InterSect() + + + Exclusive Or (XOR) + + Element included in result if it exists in one, but not both, + of A and B. + + ExclusiveOr() + + + Minus (n/a) + + Take all the elements in A. Now, if any of them exist in + B, remove them. Note that unlike the other operators, + A - B is not the same as B - A. + + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + +

+ That is, the element is included if it is in either + or this set. Neither this set nor the input + set are modified during the operation. The return value is a + clone of this set with the extra elements added in. +

+
+ A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included if it exists in both sets. The + Intersect() operation does not modify the input sets. It + returns a clone of this set with the appropriate elements + removed. +

+
+ A set of elements. + + The intersection of this set with . + +
+ + + Performs a "minus" of this set from the + set. + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + this set. The original sets are not modified during this operation. + The result set is a clone of this + containing the elements from + the operation. +

+
+ A set of elements. + + A set containing the elements from this set with the elements in + removed. + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of this set containing the elements + from the exclusive-or operation. +

+
+ A set of elements. + + A set containing the result of + ^ this. + +
+ + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains no elements. + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns a clone of the Set instance. This will work for derived Set + classes if the derived class implements a constructor that takes no arguments. + + A clone of this object. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the Set is synchronized across threads. Note that + enumeration is inherently not thread-safe. Use the SyncRoot to lock the + object during enumeration. + + + + + An object that can be used to synchronize this collection to make it thread-safe. + When implementing this, if your object uses a base object, like an IDictionary, + or anything that has a SyncRoot, return that object instead of "this". + + + + + Indicates whether the given instance is read-only or not + + + if the ISet is read-only; otherwise, . + In the default implementation of Set, this property always returns false. + + + + + Provides the storage for elements in the Set, stored as the key-set + of the IDictionary object. Set this object in the constructor + if you create your own Set class. + + + + + Adds the specified element to this set if it is not already present. + + The to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. Needed for + non-generic ISet methods implementation + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + The placeholder object used as the value for the IDictionary instance. + + + There is a single instance of this object globally, used for all Sets. + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + None of the objects based on DictionarySet are synchronized. Use the + SyncRoot property instead. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates wether the Set is read-only or not + + + + + Implements a Set based on a Dictionary (which is equivalent of + non-genric HashTable) This will give the best lookup, add, and remove + performance for very large data-sets, but iteration will occur in no particular order. + + + + + Creates a new set instance based on a Dictinary. + + + + + Creates a new set instance based on a Dictinary and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + +

Implements an immutable (read-only) Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + basisSet can still change the data-set. So GetHashCode() is not implemented + for this Set, as is the case for all Set implementations in this library. + This design decision was based on the efficiency of not having to Clone() the + basisSet every time you wrap a mutable Set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + nothing + is always thrown + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + nothing + is always thrown + + + + Removes all objects from the set. + + is always thrown + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + nothing + is always thrown + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + nothing + is always thrown + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + nothing + is always thrown + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns an object that can be used to synchronize use of the Set across threads. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates that the given instance is read-only + + + + + Implements an ordered Set based on a dictionary. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + A collection of elements that defines the initial set contents. + + + + Represents a read only wrapper around a generic IDictionary. The design pattern + mirrors ReadOnlyCollection, and follows the apparent pattern that write operations + do not throw an exception, but simply make no change to the underlying collection. + + Originally put into the public domain. + http://www.simple-talk.com/community/forums/thread/2263.aspx + + + + Original from Public Domain + Mark Pollack (.NET) + + + + Inner storage for ReadOnlyDictionary + + + + + Easy access to non-generic dictionary API + + + + + Initializes a new instance of the class. + + The dictionary to wrap. + + + + Add does not change a read only Dictionary + + The object to use as the key of the element to add. + The object to use as the value of the element to add. + The is read-only. + + + + Determines whether the contains an element with the specified key. + + The key to locate in the . + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Remove does not change a read only Dictionary, will throw an exception. + + The is read-only. + + + + Tries the get value. + + The key. + The value. + + + + + Add does not change a read only Dictionary + + The object to add to the . + The is read-only. + + + + Clear does not change a read only Dictionary. + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if item is found in the ; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + arrayIndex is less than 0. + array is null. + array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. + + + + Remove does not change a read only Dictionary. Throws an exception + + The object to remove from the . + + true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . + + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Add does not change a read only Dictionary. Throws an exception. + + The to use as the key of the element to add. + The to use as the value of the element to add. + The is read-only.-or- The has a fixed size. + + + + Determines whether the object contains an element with the specified key. + + The key to locate in the object. + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Returns an object for the object. + + + An object for the object. + + + + + Remove does not change a read only Dictionary. Throws an exception. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. + + + + Runs when the entire object graph has been deserialized. + + The object that initiated the callback. The functionality for this parameter is not currently implemented. + + + + Populates a with the data needed to serialize the target object. + + The to populate with data. + The destination (see ) for this serialization. + The caller does not have the required permission. + + + + Gets a read only containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the value with the specified key. + Set will throw an exception + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + Gets an containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the with the specified key. Set throws an exception. + + + The is read-only. + if try to set value + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + Implements a Set based on a sorted tree. This gives good performance for operations on very + large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration + occurs in order. Elements that you put into this type of collection must implement IComparable, + and they must actually be comparable. You can't mix string and int values, for example. + + + + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree. + + The to use for sorting. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + The to use for sorting. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe Set wrapper. + + The Set object that this object will wrap. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot + to synchronize the entire enumeration process. + + + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns , indicating that this object is thread-safe. The exception to this + is enumeration, which is inherently not thread-safe. Use the SyncRoot object to + lock this object for the entire duration of the enumeration. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates whether given instace is read-only or not + + + + + This class provides skeletal implementations of some + operations. + + +

+ The implementations in this class are appropriate when the base + implementation does not allow elements. The methods + , + , and + are based on + the , + , and + methods + respectively but throw exceptions instead of indicating failure via + or returns. +

+ An implementation that extends this class must + minimally define a method + which does + not permit the insertion of elements, along with methods + , and + . Typically, + additional methods will be overridden as well. If these requirements + cannot be met, consider instead subclassing + }. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + A collection designed for holding elements prior to processing. + + +

+ Besides basic operations, + queues provide additional insertion, extraction, and inspection + operations. +

+

+ Each of these methods exists in two forms: one throws + an exception if the operation fails, the other returns a special + value (either or , depending on the + operation). The latter form of the insert operation is designed + specifically for use with capacity-restricted + implementations; in most implementations, insert operations cannot + fail. +

+

+ Queues typically, but do not necessarily, order elements in a + FIFO (first-in-first-out) manner. Among the exceptions are + priority queues, which order elements according to a supplied + comparator, or the elements' natural ordering, and LIFO queues (or + stacks) which order the elements LIFO (last-in-first-out). + Whatever the ordering used, the head of the queue is that + element which would be removed by a call to + or + . In a FIFO queue, all new + elements are inserted at the tail of the queue. Other kinds of queues may + use different placement rules. Every implementation + must specify its ordering properties. +

+

+ The method inserts an + element if possible, otherwise returning . This differs from the + method, which can fail to + add an element only by throwing an exception. The + method is designed for + use when failure is a normal, rather than exceptional occurrence, for example, + in fixed-capacity (or "bounded" queues. +

+

+ The + methods remove and + return the head of the queue. Exactly which element is removed from the + queue is a function of the queue's ordering policy, which differs from + implementation to implementation. The + and + methods differ only in their + behavior when the queue is empty: the + method throws an exception, + while the method returns + . +

+

+ The and + methods return, but do + not remove, the head of the queue. +

+

+ The interface does not define the blocking queue + methods, which are common in concurrent programming. +

+

+ implementations generally do not allow insertion + of elements, although some implementations, such as + a linked list, do not prohibit the insertion of . + Even in the implementations that permit it, should + not be inserted into a , as is also + used as a special return value by the + method to + indicate that the queue contains no elements. +

+

+ implementations generally do not define + element-based versions of methods + and , but instead inherit the + identity based versions from the class object, because element-based equality + is not always well-defined for queues with the same elements but different + ordering properties. +

+

+ Based on the back port of JCP JSR-166. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the class of the supplied prevents it + from being added to this queue. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue + + if this queue is empty +
+ + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue. + + If this queue is empty. +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Returns if there are no elements in the , otherwise. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Inserts the specified element into this queue if it is possible + to do so immediately without violating capacity restrictions. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that + it throws an exception if this queue is empty. +

+
+ + The head of this queue + + + If this queue is empty. + +
+ + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+

+ ALso note that this implementation returns the result of + unless the queue + is empty. +

+
+ The head of this queue. + + If this queue is empty. + +
+ + + Removes all of the elements from this queue. + + +

+ The queue will be empty after this call returns. +

+

+ This implementation repeatedly invokes + until it + returns . +

+
+
+ + + Adds all of the elements in the supplied + to this queue. + + +

+ Attempts to + + of a queue to itself result in . + Further, the behavior of this operation is undefined if the specified + collection is modified while the operation is in progress. +

+

+ This implementation iterates over the specified collection, + and adds each element returned by the iterator to this queue, in turn. + An exception encountered while trying to add an element (including, + in particular, a element) may result in only some + of the elements having been successfully added when the associated + exception is thrown. +

+
+ + The collection containing the elements to be added to this queue. + + + if this queue changed as a result of the call. + + + If the supplied or any one of its elements are . + + + If the collection is the current or + the collection size is greater than the queue capacity. + +
+ + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Returns if there are no elements in the , otherwise. + + + + + Returns the current capacity of this queue. + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. + + Erich Eichinger + + + + Creates a case-insensitive hashtable using . + + + + + Creates a case-insensitive hashtable using the given . + + the to calculate the hashcode + + + + Creates a case-insensitive hashtable using the given , initially + populated with entries from another dictionary. + + the dictionary to copy entries from + the to calculate the hashcode + + + + Initializes a new, empty instance of the class that is serializable using the specified and objects. + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the object. + info is null. + + + + Implements the interface and returns the data needed to serialize the . + + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the . + info is null. + + + + Calculate the hashcode of the given string key, using the configured culture. + + + + + + + Compares two keys + + + + + Creates a shallow copy of the current instance. + + + + + is an + class that supports the creation of new + types where the underlying data + store is an instance. + + +

+ You can use any object that implements the + interface to hold set + data. You can define your own, or you can use one of the objects + provided in the framework. The type of + you + choose will affect both the performance and the behavior of the + using it. +

+

+ This object overrides the method, + but not the method, because + the class is mutable. + Therefore, it is not safe to use as a key value in a dictionary. +

+

+ To make a typed based on your + own , simply derive a new + class with a constructor that takes no parameters. Some + implmentations cannot be defined + with a default constructor. If this is the case for your class, you + will need to override clone as well. +

+

+ It is also standard practice that at least one of your constructors + takes an or an + as an argument. +

+
+ +
+ + + A collection that contains no duplicate elements. + + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs a "union" of two sets, where all the elements in both are + present. + + +

+ That is, the element is included if it is in either + or . The return + value is a clone of one of the sets ( + if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. +

+
+ A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + +
+ + + Performs a "union" of two sets, where all the elements in both are + present. + + A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included only if it exists in both + and . Neither input + object is modified by the operation. The result object is a + clone of one of the input objects ( + if it is not ) containing the elements from + the intersect operation. +

+
+ A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs a "minus" of set from set + . + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + set . The original sets are not modified + during this operation. The result set is a clone of set + containing the elements from the operation. +

+
+ A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + +
+ + + Performs a "minus" of set from set + . + + A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of one of the sets ( + if it is not ) + containing the elements from the exclusive-or operation. +

+
+ A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Returns a clone of the + instance. + + +

+ This will work for derived + classes if the derived class implements a constructor that takes no + arguments. +

+
+ A clone of this object. +
+ + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + This method will test the + against another for + "equality". + + +

+ In this case, "equality" means that the two sets contain the same + elements. The "==" and "!=" operators are not overridden by design. + If you wish to check for "equivalent" + instances, use + Equals(). If you wish to check to see if two references are + actually the same object, use "==" and "!=". +

+
+ + A object to compare to. + + + if the two sets contain the same elements. + +
+ + + Gets the hashcode for the object. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + +

+ When implementing this, if your object uses a base object, like an + , or anything that has + a SyncRoot, return that object instead of "this". +

+
+ + An object that can be used to synchronize this collection to make + it thread-safe. + +
+ + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Provides the storage for elements in the + , stored as the key-set + of the object. + + +

+ Set this object in the constructor if you create your own + class. +

+
+
+ + + The placeholder object used as the value for the + instance. + + + There is a single instance of this object globally, used for all + s. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Implements an based on a + hash table. + + +

+ This will give the best lookup, add, and remove performance for very + large data-sets, but iteration will occur in no particular order. +

+
+ +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class, and + initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an that automatically + changes from a list based implementation to a hashtable based + implementation when the size reaches a certain threshold. + + +

+ This is good if you are unsure about whether you data-set will be tiny + or huge. +

+ + Because this uses a dual implementation, iteration order is not + guaranteed! + +
+ +
+ + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size, and initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an immutable (read-only) + wrapper. + + +

+ Although this class is advertised as immutable, it really isn't. + Anyone with access to the wrapped + can still change the data. So + is not implemented for this , as + is the case for all + implementations in this library. This design decision was based on the + efficiency of not having to clone the wrapped + every time you wrap a mutable + . +

+
+
+ + + Constructs an immutable (read-only) + wrapper. + + + The that is to be wrapped. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + + Removes all objects from this set. + + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the + instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + Simple linked list implementation. + + Simon White + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class that contains all + elements of the specified list. + + + A list of elements that defines the initial contents. + + + + + Removes the object at the specified index. + + The lookup index. + + If the specified is greater than the + number of objects within the list. + + + + + Inserts an object at the specified index. + + The lookup index. + The object to be inserted. + + If the specified is greater than the + number of objects within the list. + + + + + Removes the first instance of the specified object found. + + The object to remove + + + + Returns if this list contains the specified + element. + + The element to look for. + + if this list contains the specified element. + + + + + Removes all objects from the list. + + + + + Returns the index of the first instance of the specified + found. + + The object to search for + + The index of the first instance found, or -1 if the element was not + found. + + + + + Adds the specified object to the end of the list. + + The object to add + The index that the object was added at. + + + + Adds all of the elements of the supplied + list to the end of this list. + + The list of objects to add. + + + + Checks whether the list can be modified. + + + If the list cannot be modified. + + + + + Validates the specified index. + + The lookup index. + + If the index is invalid. + + + + + Returns the node at the specified index. + + The lookup index. + The node at the specified index. + + If the specified is greater than the + number of objects within the list. + + + + + Returns the node (and index) of the first node that contains + the specified value. + + The value to search for. + + The node, or if not found. + + + + + Removes the specified node. + + The node to be removed. + + + + Copies the elements in this list to an array. + + +

+ The type of array needs to be compatible with the objects in this + list, obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + + + If the supplied is . + + + If the supplied is less than zero + or is greater than the length of . + + + If the supplied is of insufficient size. + +
+ + + Gets an enumerator for the elements in the + . + + +

+ Enumerators are fail fast. +

+
+ + An over the elements + in the . + +
+ + + Is list read only? + + + if the list is read only. + + + + + Returns the node at the specified index. + + +

+ This is the indexer for the + class. +

+
+ +
+ + + Is the list a fixed size? + + + if the list is a fixed size list. + + + + + Returns if the list is synchronized across + threads. + + + + This implementation always returns . + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + The number of objects within the list. + + + + + An object that can be used to synchronize this + to make it thread-safe. + + + An object that can be used to synchronize this + to make it thread-safe. + + + + + Implements a based on a list. + + +

+ Performance is much better for very small lists than either + or . + However, performance degrades rapidly as the data-set gets bigger. Use a + instead if you are not sure your data-set + will always remain very small. Iteration produces elements in the order they were added. + However, element order is not guaranteed to be maintained by the various + mathematical operators. +

+
+
+ + + Creates a new set instance based on a list. + + + + + Creates a new set instance based on a list and initializes it based on a + collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Thrown when an element is requested from an empty . + + Griffin Caprio + + + + Creates a new instance of the + class. + + + + + 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. + + + + + 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. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + An unbounded priority based on a priority + heap. This queue orders elements according to an order specified + at construction time, which is specified either according to their + natural order (see , or according to a + , depending on which constructor is + used. A priority queue does not permit elements. + A priority queue relying on natural ordering also does not + permit insertion of non-comparable objects (doing so will result + . + +

+ The head of this queue is the lowest element + with respect to the specified ordering. If multiple elements are + tied for lowest value, the head is one of those elements -- ties are + broken arbitrarily. + +

+ A priority queue is unbounded, but has an internal + capacity governing the size of an array used to store the + elements on the queue. It is always at least as large as the queue + size. As elements are added to a priority queue, its capacity + grows automatically. The details of the growth policy are not + specified. + +

+ This class and its enumerator implement all of the + optional methods of the and + interfaces. + The enumerator provided in method + is not guaranteed to traverse the elements of the PriorityQueue in any + particular order. + +

+ Note that this implementation is NOT synchronized. + Multiple threads should not access a + instance concurrently if any of the threads modifies the list + structurally. Instead, use the thread-safe PriorityBlockingQueue. +

+ Josh Bloch + Griffin Caprio (.NET) +
+ + + Priority queue represented as a balanced binary heap: the two children + of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is + ordered by comparator, or by the elements' natural ordering, if + comparator is null: For each node n in the heap and each descendant d + of n, n <= d. + + The element with the lowest value is in queue[1], assuming the queue is + nonempty. (A one-based array is used in preference to the traditional + zero-based array to simplify parent and child calculations.) + + queue.length must be >= 2, even if size == 0. + + + + The number of elements in the priority queue. + + + + The comparator, or null if priority queue uses elements' + natural ordering. + + + + + The number of times this priority queue has been + structurally modified. + + + + + Creates a with the default initial capacity + (11) that orders its elements according to their natural + ordering (using ). + + + + + Creates a with the specified initial capacity + that orders its elements according to their natural ordering + (using ). + + the initial capacity for this priority queue. + + if is less than 1. + + + + Creates a with the specified initial capacity + that orders its elements according to the specified comparator. + + the initial capacity for this priority queue. + the comparator used to order this priority queue. + If then the order depends on the elements' natural ordering. + + if is less than 1. + + + + Creates a containing the elements in the + specified collection. The priority queue has an initial + capacity of 110% of the size of the specified collection or 1 + if the collection is empty. If the specified collection is an + instance of a , the priority queue will be sorted + according to the same comparator, or according to its elements' + natural order if the collection is sorted according to its + elements' natural order. Otherwise, the priority queue is + ordered according to its elements' natural order. + + the collection whose elements are to be placed into this priority queue. + if elements of cannot be + compared to one another according to the priority queue's ordering + if or any element with it is + + + + + + Common code to initialize underlying queue array across + constructors below. + + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Amount of bits to shift + The resulting number from the shift operation + + + + Establishes the heap invariant assuming the heap + satisfies the invariant except possibly for the leaf-node indexed by k + (which may have a nextExecutionTime less than its parent's). + + + This method functions by "promoting" queue[k] up the hierarchy + (by swapping it with its parent) repeatedly until queue[k] + is greater than or equal to its parent. + + + + + Establishes the heap invariant (described above) in the subtree + rooted at k, which is assumed to satisfy the heap invariant except + possibly for node k itself (which may be greater than its children). + + + This method functions by "demoting" queue[k] down the hierarchy + (by swapping it with its smaller child) repeatedly until queue[k] + is less than or equal to its children. + + + + + Establishes the heap invariant in the entire tree, + assuming nothing about the order of the elements prior to the call. + + + + + Returns the of or - 1, + whichever is smaller. + + base size + percentage to return + of + + + + Initially fill elements of the queue array under the + knowledge that it is sorted or is another , in which + case we can just place the elements in the order presented. + + + + + Initially fill elements of the queue array that is not to our knowledge + sorted, so we must rearrange the elements to guarantee the heap + invariant. + + + + + Removes and returns element located at from queue. (Recall that the queue + is one-based, so 1 <= i <= size.) + + + Normally this method leaves the elements at positions from 1 up to i-1, + inclusive, untouched. Under these circumstances, it returns . + Occasionally, in order to maintain the heap invariant, it must move + the last element of the list to some index in the range [2, i-1], + and move the element previously at position (i/2) to position i. + Under these circumstances, this method returns the element that was + previously at the end of the list and is now at some position between + 2 and i-1 inclusive. + + + + Resize array, if necessary, to be able to hold given index + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + and this queue does not permit + elements. + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + + + Removes a single instance of the specified element from this + queue, if it is present. + + + + + Returns an over the elements in this queue. + The enumerator does not return the elements in any particular order. + + an enumerator over the elements in this queue. + + + + Removes all elements from the priority queue. + The queue will be empty after this call returns. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Queries the queue to see if it contains the specified + + element to look for. + if the queue contains the , + otherwise. + + + Returns the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering + (using ). + + + the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering. + + + + + Save the state of the instance to a stream (that + is, serialize it). + + The length of the array backing the instance is + emitted (int), followed by all of its elements (each an + ) in the proper order. + + the stream + the context + + + + Reconstitute the instance from a stream (that is, + deserialize it). + + the stream + the context + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Copies the elements of the to an , starting at index 0. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Gets the Capacity of this queue. Will equal + + + + + Returns the queue count. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Returns if there are no elements in the , otherwise. + + + + + Index (into queue array) of element to be returned by subsequent call to next. + + + + + Implements an based on a sorted + tree. + + +

+ This gives good performance for operations on very large data-sets, + though not as good - asymptotically - as a + . However, iteration occurs + in order. +

+

+ Elements that you put into this type of collection must implement + , and they must actually be comparable. + You can't mix and + values, for example. +

+

+ This implementation does + not support elements that are . +

+
+ +
+ + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree using for ordering. + + + + + Creates a new set instance based on a sorted tree and initializes + it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Synchronized that should be returned by synchronized + dictionary implementations in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that should be returned by synchronized + collections in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that, unlike hashtable created + using method, synchronizes + reads from the underlying hashtable in addition to writes. + + +

+ In addition to synchronizing reads, this implementation also fixes + IEnumerator/ICollection issue described at + http://msdn.microsoft.com/en-us/netframework/aa570326.aspx + (search for SynchronizedHashtable for issue description), by implementing + interface explicitly, and returns thread safe enumerator + implementations as well. +

+

+ This class should be used whenever a truly synchronized + is needed. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of + + + + + Initializes a new instance of + + + + + Initializes a new instance of , copying initial entries from + handling keys depending on . + + + + + Creates a instance that + synchronizes access to the underlying . + + the hashtable to be synchronized + + + + Creates a wrapper that synchronizes + access to the passed . + + the hashtable to be synchronized + + + + Adds an element with the provided key and value to the object. + + The to use as the value of the element to add. + The to use as the key of the element to add. + An element with the same key already exists in the object. + key is null. + The is read-only.-or- The has a fixed size. 2 + + + + Removes all elements from the object. + + The object is read-only. 2 + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + + Determines whether the object contains an element with the specified key. + + + true if the contains an element with the key; otherwise, false. + + The key to locate in the object. + key is null. 2 + + + + Returns, whether this contains an entry with the specified . + + The key to look for + , if this contains an entry with this + + + + Returns, whether this contains an entry with the specified . + + The value to look for + , if this contains an entry with this + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + The type of the source cannot be cast automatically to the type of the destination array. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 + + + + Returns an object for the object. + + + An object for the object. + + + + + Removes the element with the specified key from the object. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + key is null. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Gets a value indicating whether the object is read-only. + + + true if the object is read-only; otherwise, false. + + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Gets an object containing the keys of the object. + + + An object containing the keys of the object. + + + + + Gets an object containing the values in the object. + + + An object containing the values in the object. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets or sets the element with the specified key. + + + The element with the specified key. + + The key of the element to get or set. + The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. + key is null. 2 + + + + Implements a thread-safe wrapper. + + +

+ The implementation is extremely conservative, serializing critical + sections to prevent possible deadlocks, and locking on everything. The + one exception is for enumeration, which is inherently not thread-safe. + For this, you have to lock the SyncRoot object for the + duration of the enumeration. +

+
+ +
+ + + Constructs a thread-safe + wrapper. + + + The object that this object + will wrap. + + + If the supplied ecposes a + SyncRoot value. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the instance. + + A clone of this object. + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Abstract Type Filter that provides methods to load a required type from assembly. + + + + + Represents the base interface for all component-scan type filters + + + + + Determine a match based on the given type object. + + + true if there is a match; false is there is no match + + + + Required Type to compare against provided Type + + + + + Determine a match based on the given type object. + + + true if there is a match; false is there is no match + + + + Is loading a Type from a string passed to method in the form [Type.FullName], [Assembly.Name] + + + + + A simple filter which matches classes that are assignable to a given type. + + + + + Create a Type Filter with required type + + type name including assembly name + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + A simple filter which matches classes with a given attribute, + checking inherited annotations as well. + + + + + Creates a Type Filter with required type attribute + + + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + Creates a new instance of a given type string + + + + + Creates a new instance of given type filter type string + + Custom type filter to create + An instance of ITypeFilter or NULL if no instance can be created + + + + Creates a new instance of given name generator type string + + Custom type name generator string to create + An instance of IObjectNameGenerator or NULL if no instance can be created + + + + A simple filter for matching a fully-qualified class name with a regex + + + + + Creates a type filter with provided pattern + + Regex pattern + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + AssemblyTypeScanner that only accepts types that also meet the requirements of being ObjectDefintions. + + + + + AssemblyTypeScanner that provides for applying a final hard-coded Required Constraint to all types found in the the scanned assemblies + in addition to respecting the constraints passed to it during its configuration. + + + + + Scans Assebmlies for Types that satisfy a given set of constraints. + + + + + Scanner that can filter types from assemblies based on constraints. + + + + + Add the Assembly containing the specified . + + + + + + + Adds the predicate to the assembly filter constraints. + + The assembly predicate. + + + + + Adds the predicte to the include filter for . + + The predicate. + + + + + Adds the predicte to the exclude filter for . + + The predicate. + + + + + Includes the specific types. + + The types. + + + + + Includes the type. + + The to include. + + + + + Excludes the type. + + The to exclude. + + + + + Perform the Scan, applying all provided + + + + + + Logger Instance. + + + + + Names of Assemblies to exclude from being loaded for scanning. + + + + + Names of Assemblies to include for scanning. + + + + + Assembly Inclusion Predicates. + + + + + Type Exclusion Predicates. + + + + + Type Exclusion Predicates. + + + + + Type Inclusion Predicates. + + + + + Type Inclusion TypeFilters. + + + + + Assemblies to scan. + + + + + Stores the object default definitons defined in the XML configuration documnet + + + + + Assemblies the type of the having. + + + + + + + Excludes the type. + + + + + + + Includes the type. + + + + + + + Includes the types. + + The type source. + + + + + Performs the Scan, respecting all filter settings. + + + + + + Adds the assembly filter. + + The assembly predicate. + + + + + Adds the exclude filter. + + The predicate. + + + + + Adds the exclude filter. + + The type filter. + + + + + Adds the include filter. + + The predicate. + + + + + Adds the include filter. + + The filter type. + + + + + Applies the assembly filters to the assembly candidates. + + The assembly candidates. + + + + + Determines whether the compound predicate is satisfied by the specified type. + + The type. + + true if the compound predicate is satisfied by the specified type; otherwise, false. + + + + + Determines whether [is excluded type] [the specified type]. + + The type. + + true if [is excluded type] [the specified type]; otherwise, false. + + + + + Determines whether [is included assembly] [the specified assembly]. + + The assembly. + + true if [is included assembly] [the specified assembly]; otherwise, false. + + + + + Determines whether [is included type] [the specified type]. + + The type. + + true if [is included type] [the specified type]; otherwise, false. + + + + + Sets the default filters. + + + + + Loads the assemblies found. + + The folder path. + The extension. + + + + Stores the object default definitons defined in the XML configuration documnet + + + + + Determines whether the compound predicate is satisfied by the specified type. + + The type. + + true if the compound predicate is satisfied by the specified type; otherwise, false. + + + + + Determines whether the required constraint is satisfied by the specified type. + + The type. + + true if the required constraint is satisfied by the specified type; otherwise, false. + + + + + Registers the defintions for types. + + The registry. + The types to register. + + + + Applies the assembly filters to the assembly candidates. + + The assembly candidates. + + + + + Determines whether the specified candidate is and excluded assembly. + + The candidate. + + true if the specified candidate is an excluded assembly ; otherwise, false. + + + + + Determines whether the required constraint is satisfied by the specified type. + + The type. + + true if the required constraint is satisfied by the specified type; otherwise, false. + + + + + Sets the default filters. + + + + + Scans the and register types. + + The registry within which to register the types. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The assemblies to include predicates. + + + + Initializes a new instance of the class. + + The names of assemblies to include. + + + + Provides the name generator for all scanned objects. + Default is + + + + + Represents a collection of Types. + + + + + Logger Instance. + + + + + Initializes a new instance of the class. + + The assembly. + + + + Gets the enumerator. + + + + + + Utility class that allows for convenient registration of common + and definitions for attribute based configuration + + + + + Mark Pollack (.NET) + Mark Fisher + Juergen Hoeller + Chris Beams + + + + The object name of the internally managed Configuration attribute processor. + + + + + The object name of the internally managed Autowire attribute processor + + + + + The object name of the internally managed Required attribute processor. + + + + + The object name of the internally managed InitDestroy attribute processor. + + + + + Registers the attribute config processors. + + The registry. + + + + Default Name Generator for attribute driven component scan. + + First choice is the provided name of the Component attribute. + Fallback is the short type name. + + + + + Strategy interface for generating object names for object definitions + + Juergen Hoeller + Mark Pollack (.NET) + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + + the generated object name + + + + + Indicates that a class declares one or more methods and may be processed + by the Spring container to generate object definitions and service requests for those objects + at runtime. + + Configuration is meta-annotated as a , therefore Configuration + classes are candidates for component-scanning. + + May be used in conjunction with the attribute to indicate that all object + methods declared within this class are by default lazily initialized. + +

Constraints

+
    +
  • Configuration classes must be non-sealed
  • +
  • Configuration classes must have a default/no-arg constructor
  • +
+
+
+ + + Indicates that an annotated class is a "component". + Such classes are considered as candidates for future features such + as auto-detection when using attribute-based configuration and assembly scanning. + + Other class-level annotations may be considered as identifying + a component as well, typically a special kind of component: + e.g. the Repository attribute. + + Mark Fisher + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the component. + + + + Gets or sets the name of the component + + The name of the component. + + + + Initializes a new instance of the ConfigurationAttribute class. + + + + + Initializes a new instance of the Configuration class. + + + + + + Represents an instance of the metadata that has been parsed from a class with the applied to it. + + + + + Initializes a new instance of the ConfigurationClass class. + + + + + + + Adds the imported resource. + + The imported resource. + The reader class capable of interpreting the imported resource. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Validates the specified and reports all discovered violations to the provided problem reporter for appropriate action. + + The problem reporter. + + + + Gets the type of the configuration class. + + The type of the configuration class. + + + + Gets the imported resources. + + The imported resources. + + + + Gets the methods. + + The methods. + + + + Gets or sets the name of the object. + + The name of the object. + + + + Gets the resource. + + The resource. + + + + Gets the SimpleName of the object. + + The simple name. + + + + Initializes a new instance of the class. + + The message. + The location. + + + + Initializes a new instance of the Problem class. + + + + + + + + Implementation of the IResource that represents an assembly containing one or more resources. + + + + + The central abstraction for Spring.NET's access to resources such as + s. + + +

+ This interface encapsulates a resource descriptor that abstracts away + from the underlying type of resource; possible resource types include + files, memory streams, and databases (this list is not exhaustive). +

+

+ A can definitely be opened and accessed + for every such resource; if the resource exists in a physical form (for + example, the resource is not an in-memory stream or one that has been + extracted from an assembly or ZIP file), a or + can also be accessed. The actual + behavior is implementation-specific. +

+

+ This interface, when used in tandem with the + interface, forms the backbone of + Spring.NET's resource handling. Third party extensions or libraries + that want to integrate external resources with Spring.NET's IoC + container are encouraged expose such resources via this abstraction. +

+

+ Interfaces cannot obviously mandate implementation, but derived classes + are strongly encouraged to expose a constructor that takes a + single as it's sole argument (see example). + Exposing such a constructor will make your custom + implementation integrate nicely + with the class. +

+
+ Juergen Hoeller + Rick Evans (.NET) + + +
+ + + Simple interface for objects that are sources for + s. + + +

+ This is the base interface for the abstraction encapsulated by + Spring.NET's interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Return an for this resource. + + + + Clients of this interface must be aware that every access of this + property will create a fresh ; + it is the responsibility of the calling code to close any such + . + + + + An . + + + If the stream could not be opened. + + + + + Creates a resource relative to this resource. + + + The path (always resolved as relative to this resource). + + + The relative resource. + + + If the relative resource could not be created from the supplied + path. + + + If the resource does not support the notion of a relative path. + + + + + Does this resource represent a handle with an open stream? + + +

+ If , the + cannot be read multiple times, and must be read and then closed to + avoid resource leaks. +

+

+ Will be for all usual resource descriptors. +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + +
+ + + Returns a handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available on a filesystem, or cannot be + exposed as a handle. + + + +
+ + + Returns a description for this resource. + + +

+ The description is typically used for diagnostics and other such + logging when working with the resource. +

+

+ Implementations are also encouraged to return this value from their + method. +

+
+ + A description for this resource. + +
+ + + Does this resource actually exist in physical form? + + +

+ An example of a resource that physically exists would be a + file on a local filesystem. An example of a resource that does not + physically exist would be an in-memory stream. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + Initializes a new instance of the class. + + The type. + + + + Creates a resource relative to this resource. + + The path (always resolved as relative to this resource). + The relative resource. + + If the relative resource could not be created from the supplied + path. + + + If the resource does not support the notion of a relative path. + + + + + Does this resource represent a handle with an open stream? + + + if this resource represents a handle with an + open stream. + + +

+ If , the + cannot be read multiple times, and must be read and then closed to + avoid resource leaks. +

+

+ Will be for all usual resource descriptors. +

+
+ +
+ + + Returns the handle for this resource. + + The handle for this resource. + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + If the resource is not available or cannot be exposed as a + . + + + +
+ + + Returns a handle for this resource. + + + The handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + If the resource is not available on a filesystem, or cannot be + exposed as a handle. + + + +
+ + + Returns a description for this resource. + + A description for this resource. + +

+ The description is typically used for diagnostics and other such + logging when working with the resource. +

+

+ Implementations are also encouraged to return this value from their + method. +

+
+
+ + + Does this resource actually exist in physical form? + + + if this resource actually exists in physical + form (for example on a filesystem). + + +

+ An example of a resource that physically exists would be a + file on a local filesystem. An example of a resource that does not + physically exist would be an in-memory stream. +

+
+ + +
+ + + Return an for this resource. + + An . + + + Clients of this interface must be aware that every access of this + property will create a fresh + ; + it is the responsibility of the calling code to close any such + . + + + + If the stream could not be opened. + + + + + Enhances Configuration classes by generating a dynamic proxy capable of + interacting with the Spring container to respect object semantics. + + Chris Beams + Juergen Hoeller + Bruno Baia (.NET) + + + + + Creates a new instance of the class. + + + The supplied ObjectFactory to check for the existence of object definitions. + + + + + Generates a dynamic subclass of the specified Configuration class with a + container-aware interceptor capable of respecting scoping and other bean semantics. + + The Configuration class. + The enhanced subclass. + + + + Intercepts the invocation of any -decorated methods in order + to ensure proper handling of object semantics such as scoping and AOP proxying. + + + + + Process the -decorated method to check + for the existence of this object. + + The method providing the object definition. + When this method returns true, contains the object definition. + true if the object exists; otherwise, false. + + + + Builds a proxy type using inheritance. + + + + In order for this builder to work, target methods have to be either + , or belong to an interface. + + + Aleksandar Seovic + Bruno Baia + + + + Base class for proxy builders that can be used + to create a proxy for any class. + + +

+ This class provides a set of template + methods that derived classes can override to provide custom behaviour + appropriate to the type of proxy that is being generated (one of + inheritance or composition-based proxying). +

+
+ Aleksandar Seovic + Bruno Baia +
+ + + Describes the operations for a generic proxy type builder that can be + used to create a proxy type for any class. + + Aleksandar Seovic + + + + Creates the proxy type. + + The generated proxy class. + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + + + + Gets or sets the list of interfaces proxy should implement. + + + + + Should we proxy target attributes? + + + by default. + Target type attributes, method attributes, method's return type attributes + and method's parameter attributes are copied to the proxy. + + + + + The list of custom s that the proxy + class must be decorated with. + + +

+ Note that the list is composed of instances of the actual + s that are to be applied, not the + s of the s. +

+
+ +

+ The following code snippets show examples of how to decorate the + the proxied class with one or more s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary typeAtts = new Hashtable(); + builder.TypeAttributes = typeAtts; + + // applies a single Attribute to the proxied class... + typeAtts = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to the proxied class... + typeAtts = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + The custom s that the proxy + members must be decorated with. + + +

+ This dictionary must use simple s for keys + (denoting the member names that the attributes are to be applied to), + with the corresponding values being + s. +

+

+ The key may be wildcarded using the '*' character... if so, + then those proxy members that match against the key will be + decorated with the attendant list of + s. This naturally implies that using + the '*' character as a key will result in the attendant list + of s being applied to every member of + the proxied class. +

+
+ +

+ The following code snippets show examples of how to decorate the + members of a proxied class with one or more + s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary memAtts = new Hashtable(); + builder.MemberAttributes = memAtts; + + // applies a single Attribute to all members of the proxied class... + memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to all members of the proxied class... + memAtts ["*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + + // applies a single Attribute to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + Describes the operations that generates IL instructions + used to build the proxy type. + + Bruno Baia + + + + Generates the IL instructions that pushes + the proxy 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. + + + + The shared instance for this class (and derived classes). + + + + + Creates the proxy type. + + The generated proxy class. + + + + Generates the IL instructions that pushes + the proxy 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. + + + + Creates an appropriate type builder. + + The name to use for the proxy type name. + The type to extends if provided. + The type builder to use. + + + + Applies attributes to the proxy class. + + The type builder to use. + The proxied class. + + + + + + Applies attributes to the proxied method. + + The method builder to use. + The proxied method. + + + + + + Applies attributes to the proxied method's return type. + + The method builder to use. + The proxied method. + + + + + Applies attributes to proxied method's parameters. + + The method builder to use. + The proxied method. + + + + + Calculates and returns the list of attributes that apply to the + specified type. + + The type to find attributes for. + + A list of custom attributes that should be applied to type. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method. + + The method to find attributes for. + + A list of custom attributes that should be applied to method. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method's return type. + + The method to find attributes for. + + A list of custom attributes that should be applied to method's return type. + + + + + + Calculates and returns the list of attributes that apply to the + specified method's parameters. + + The method to find attributes for. + The method's parameter to find attributes for. + + A list of custom attributes that should be applied to the specified method's parameter. + + + + + + Check that the specified object is matching the passed attribute type. + + +

+ The specified object can be of different type : +

+ + + + + + System.Reflection.CustomAttributeData (Only with .NET 2.0) + + + + + +
+ The object instance to check. + The attribute type to test against. + + if the object instance matches the attribute type; + otherwise . + +
+ + + Defines the types of the parameters for the specified constructor. + + The constructor to use. + The types for constructor's parameters. + + + + Implements constructors for the proxy class. + + + The builder to use. + + + + + Generates the proxy constructor. + + The constructor builder to use. + The IL generator to use. + The constructor to use. + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + if target virtual methods should not be proxied; + otherwise . + + + + + Gets the mapping of the interface to proxy + into the actual methods on the target type + that does not need to implement that interface. + + +

+ If the target type does not implement the interface, + we return the interfaces methods as the target methods for many reasons : +

    +
  • + The target object can change for an object that implements the interface. + (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' + implementation in the Spring AOP framework for an example) +
  • +
  • + Allow Transparent proxies to be proxied. + (See Spring Remoting framework for an example) +
  • +
  • + Allow null target to be proxied. + (See Spring AOP framework which avoid calls to the target object + by intercepting all methods. Think "dynamic mock") + (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) +
  • +
+

+
+ + The of the target object. + + The interface to implement. + + An interface mapping for the interface to proxy. + +
+ + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + if only members declared at the level + of the supplied 's hierarchy should be proxied; + otherwise . + + + + + Implements the specified . + + The type builder to use. + The type the property is defined on. + The property to proxy. + The implemented methods map. + + + + Implements the specified event. + + The type builder to use. + The type the event is defined on. + The event to proxy. + The implemented methods map. + + + + Returns an array of s that represent + the proxiable interfaces. + + + An interface is proxiable if it's not marked with the + . + + + The array of interfaces from which + we want to get the proxiable interfaces. + + + An array containing the interface s. + + + + + Checks if specified interface is of a special type + that should never be proxied (i.e. ISerializable). + + Interface type to check. + + true if it is, false otherwise. + + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + +

+ The default value of this property is the + . +

+
+
+ + + Gets or sets the list of interfaces proxy should implement. + + + The default value of this property is all the interfaces + implemented or inherited by the target type. + + + + + Should we proxy target attributes? + + + + + + The list of custom s that the proxy + class must be decorated with. + + + + + + The custom s that the proxy + members must be decorated with. + + + + + + Creates a new instance of the + class. + + + + + Creates a proxy that inherits the proxied object's class. + + +

+ Only (non-final) methods can be proxied, + unless they are members of one of the interfaces that target class + implements. In that case, methods will be proxied using explicit + interface implementation, which means that client code will have + to cast the proxy to a specific interface in order to invoke the + methods. +

+
+ 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 proxy constructor. + + +

+ This implementation delegates the call to a base class constructor. +

+
+ The constructor builder to use. + The IL generator to use. + + The base class constructor to delegate the call to. + +
+ + + Gets or sets a value indicating whether inherited members should be proxied. + + + if they should be; otherwise, . + + + + + Base class for method builders that contains common functionalities. + + Bruno Baia + + + + Defines interface that proxy method builders have to implement. + + Aleksandar Seovic + Bruno Baia + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + The type builder to use. + + + + + The implementation to use. + + + + + Indicates whether interfaces should be implemented explicitly. + + + + + 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 . + + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + Generates the IL instructions that pushes + the proxy 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. + + + + Defines proxy method for the target object. + + The method to proxy. + + The interface definition of the method, if applicable. + + + if the supplied is to be + implemented explicitly; otherwise . + + + The for the proxy method. + + + + + Defines generic method parameters based on proxied method metadata. + + + The to use. + + The method to proxy. + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Calls target method directly. + + The IL generator to use. + The method to invoke. + + + + Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. + + The IL generator to use. + The method to test for + the name of the target to be used in error messages + + + + Calls base method directly. + + The IL generator to use. + The method to proxy. + + + + Replaces a raw reference with a reference to a proxy. + + +

+ If the target object returns reference to itself -- 'this' -- + we need to treat it as a special case and return a reference + to a proxy object instead. +

+
+ The IL generator to use. + The location of the return value. +
+ + + Generates code that throws . + + IL generator to use. + the type of the exception to throw + Error message to use. + + + + Represents a class method marked with the . + + + + + Initializes a new instance of the ConfigurationClassMethod class. + + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Validates the specified problem reporter. + + The problem reporter. + + + + Gets the configuration class. + + The configuration class. + + + + Gets the method metadata. + + The method metadata. + + + + Gets the resource location. + + The resource location. + + + + Reads the class with the applied and converts it into an instance. + + + + + Initializes a new instance of the ConfigurationClassObjectDefinitionReader class. + + + + + + + Loads the object definitions. + + The configuration model. + + + + Checks the class to see if it is a candidate to be a source. + + The object definition. + + + + + A plain-vanilla object definition. + + +

+ This is the most common type of object definition; + instances + do not derive from a parent + , and usually + (but not always - see below) have an + + and (optionally) some + and + . +

+

+ Note that + instances do not have to specify an + : + This can be useful for deriving + instances + from such definitions, each with it's own + , + inheriting common property values and other settings from the parent. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Common base class for object definitions, factoring out common + functionality from + and + . + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Extension of , + holding attributes as objects in order + to keep track of the definition source. + + + + + Support class for , providing + a base implementation of all methods. To be extended by subclasses. + + + + + Interface defining a generic contract for attaching and accessing metadata + to/from arbitrary objects. + + + + + Set the attribute defined by name to the supplied value. + In general, users should take care to prevent overlaps with other + metadata attributes by using fully-qualified names, perhaps using + class or package names as prefix. + + the unique attribute key + the attribute value to be attached + + + + Get the value of the attribute identified by name. + Return null if the attribute doesn't exist. + + the unique attribute key + the current value of the attribute, if any + + + + Remove the attribute identified by name and return its value. + Return null if no attribute under name is found. + + the unique attribute key + The last value of the attribute, if any + + + + Checks weather a specific attributes exists + + The unique attribute key + + true if the attribute identified by name exists. + Otherwise return false + + + + + Return the names of all attributes. + + + + Map with String keys and Object values + + + Copy the attributes from the supplied AttributeAccessor to this accessor. + @param source the AttributeAccessor to copy from + + + + Interface to be implemented by bean metadata elements + that carry a configuration source object. + + + + + Return the configuration source Object for this metadata element + (may be null). + + + + + Add the given BeanMetadataAttribute to this accessor's set of attributes. + + The BeanMetadataAttribute object to register + + + + Look up the given BeanMetadataAttribute in this accessor's set of attributes. + + the name of the attribute + the corresponding BeanMetadataAttribute object, + or null if no such attribute defined + + + + + Set the configuration source object for this metadata element. +

The exact type of the object will depend on the configuration mechanism used.

+
+
+ + + Describes a configurable object instance, which has property values, + constructor argument values, and further information supplied by concrete + implementations. + + Rick Evans + + + + Describes an object instance, which has property values, constructor + argument values, and further information supplied by concrete implementations. + + +

+ This is just a minimal interface: the main intention is to allow + + (like PropertyPlaceholderConfigurer) to access and modify property values. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + Return the event handlers for any events exposed by this object. + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The name of the parent definition of this object definition, if any. + + + + + The target scope for this object. + + + + + Get the role hint for this object definition + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition. + + Note that this does not have to be the actual type name used at runtime, + in case of a child definition overrding/inheriting the the type name from its + parent. It can be modifed during object factory post-processing, typically + replacing the original class name with a parsed variant of it. + Hence, do not consider this to be the definitive bean type at runtime + but rather only use it for parsing purposes at the individual object + definition level. + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Return whether this bean is a primary autowire candidate. + If this value is true for exactly one bean among multiple + matching candidates, it will serve as a tie-breaker. + + + + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + The method overrides (if any) for this object. + + + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + + + + + Return the event handlers for any events exposed by this object. + + + + + Get or set the role hint for this object definition + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition (if any). + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The dependency check code. + + + + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + + The object definition used to initialise the member fields of this + instance. + + +

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

+
+
+ + + Register a qualifier to be used for autowire candidate resolution, + keyed by the qualifier's type name. + + + + + + Return whether this bean has the specified qualifier. + + + + + Return the qualifier mapped to the provided type name. + + + + + Return all registered qualifiers. + + the Set of objects. + + + + Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition. + + the AbstractBeanDefinition to copy from + + + + Resolves the type of the object, resolving it from a specified + object type name if necessary. + + + A resolved instance. + + + If the type cannot be resolved. + + + + + Validate this object definition. + + + In the case of a validation failure. + + + + + Validates all + + + + + Validate the supplied . + + + The + to be validated. + + + + + Override settings in this object definition from the supplied + object definition. + + + The object definition used to override the member fields of this instance. + + + + + Returns a that represents the current + . + + + A that represents the current + . + + + + + The name of the parent definition of this object definition, if any. + + + + + The property values that are to be applied to the object + upon creation. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The property values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + Does this definition have any + ? + + + if this definition has at least one + . + + + + + The constructor argument values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The constructor argument values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The event handler values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The event handler values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The method overrides (if any) for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The name of the target scope for the object. + Defaults to "singleton", ootb alternative is "prototype". Extended object factories + might support further scopes. + + + + + Get or set the role hint for this object definition + + + + + Is this definition a singleton, with + a single, shared instance returned on all calls to an enclosing + container (typically an + or + ). + + +

+ If , an object factory will apply the + prototype design pattern, with each caller requesting an + instance getting an independent instance. How this is defined + will depend on the object factory implementation. singletons + are the commoner type. +

+
+ +
+ + + Gets a value indicating whether this instance is prototype, with an independent instance + returned for each call. + + + true if this instance is prototype; otherwise, false. + + + + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup + by object factories that perform eager initialization of + singletons. +

+
+
+ + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be + instantiated itself but rather just serving as a parent for concrete + child object definitions. + + + if this object definition is "abstract". + + + + + The of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + + Is the of the object definition a resolved + ? + + + + + Returns the of the + of the object definition (if any). + + + + + A description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. The default is + , + which means that no autowiring will be performed. +

+
+
+ + + Gets the resolved autowire mode. + + +

+ This resolves + + to one of + + or + . +

+
+
+ + + The dependency checking mode. + + +

+ The default is + . +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before this object definition. +

+ + Dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Set whether this bean is a primary autowire candidate. + If this value is true for exactly one bean among multiple + matching candidates, it will serve as a tie-breaker. + + + + + The name of the initializer method. + + +

+ The default value is the constant, + in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default value is the constant, + in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The + method will be invoked on the specified + . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Does this object definition have any constructor argument values? + + + if his object definition has at least one + element in it's + + property. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + + The of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + Whether to perform a dependency check for objects (not + applicable to autowiring a constructor, thus ignored there) + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + +

+ Takes an object class name to avoid eager loading of the object class. +

+
+ + The assembly qualified of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + The + to be applied to a new instance of the object. + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. +

+
+ + The definition that is to be copied. + +
+ + + Validate this object definition. + + + In the case of a validation failure. + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Is always null for a . + + + It is safe to request this property's value. Setting any other value than null will + raise an . + + Raised on any attempt to set a non-null value on this property. + + + + Parses classes with the applied to them. + + + + + Initializes a new instance of the ConfigurationClassParser class. + + + + + + Parses the specified type. + + The type. + Name of the object. + + + + Validates this instance. + + + + + Processes the configuration class. + + The configuration class. + + + + Gets all methods with custom attribute for class. + + The class. + The custom attribute. + + + + + Gets the configuration classes. + + The configuration classes. + + + + Postprocesses the applied types registered with the . + + + + + Allows for custom modification of an application context's object + definitions, adapting the object property values of the context's + underlying object factory. + + +

+ Application contexts can auto-detect + IObjectFactoryPostProcessor objects in their object definitions and + apply them before any other objects get created. +

+

+ Useful for custom config files targeted at system administrators that + override object properties configured in the application context. +

+

+ See PropertyResourceConfigurer and its concrete implementations for + out-of-the-box solutions that address such configuration needs. +

+
+ Juergen Hoeller + Rick Evans (.Net) +
+ + + Modify the application context's internal object factory after its + standard initialization. + + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + The object factory used by the application context. + + + In case of errors. + +
+ + + Interface that can be implemented by objects that should be orderable, e.g. in an + . + + +

+ The actual order can be interpreted as prioritization, the first object (with the + lowest order value) having the highest priority. +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Postsprocesses the object definition registry. + + The registry. + + + + Postprocesses the object factory. + + The object factory. + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Sets the problem reporter. + + The problem reporter. + + + + objects on which the current object depends. Any objects specified are guaranteed to be + created by the container before this object. Used infrequently in cases where a object + does not explicitly depend on another through properties or constructor arguments, + but rather depends on the side effects of another object's initialization. + Note: This attribute will not be inherited by child object definitions, + hence it needs to be specified per concrete object definition. + + Using at the class level has no effect unless component-scanning + is being used. If a -attributed class is declared via XML, + attribute metadata is ignored, and + <object depends-on="..."/> is respected instead. + + + + + + Initializes a new instance of the DependsOn class. + + + + + Initializes a new instance of the DependsOn class. + + + + + Gets or sets the name. + + The name. + + + + Indicates one or more classes to import. + + Provides functionality equivalent to the <import/> element in Spring XML. + Only supported for actual -attributed classes. + + + If XML or other non- object definition resources need to be + imported, use + + + + + + Initializes a new instance of the Import class. + + + + + Initializes a new instance of the Import class. + + + + + + The class or classes to import. + + The type. + + + + Supports providing one or more implementations to import when creating s. + + + + + Initializes a new instance of the ImportResourceAttribute class. + + + + + + Initializes a new instance of the ImportResourceAttribute class. + + + + + + implementation to use when processing resources specified + by the attribute. + + The . + + + + Resource paths to import. Resource-loading prefixes such as assembly:// and + file://, etc may be used. + + The resources. + + + + Indicates whether a object is to be lazily initialized. + + If this attribute is not present on a Component or object definition, eager + initialization will occur. If present and set to true, the + object/Component will not be initialized until referenced by another object or + explicitly retrieved from the enclosing . + If present and set to false, the object will be instantiated on startup by object factories + that perform eager initialization of singletons. + + + If Lazy is present on a class, this indicates that all + methods within that should be lazily + initialized. If Lazy is present and false on a object method within a + Lazy-annotated Configuration class, this indicates overriding the 'default + lazy' behavior and that the object should be eagerly initialized. + + + + + + Initializes a new instance of the LazyAttribute class. + + + + + + Initializes a new instance of the LazyAttribute class. + + + + + Whether lazy initialization should occur. + + true if [lazy initialize]; otherwise, false. + + + + Identifies the Method as providing and Object Definition. + + + + + The optional name of a method to call on the Object instance upon closing the + application context, for example a Close() method on a DataSource. + The method must have no arguments but may throw any exception. + + Note: Only invoked on objects whose lifecycle is under the full control of the + factory, which is always the case for singletons but not guaranteed + for any other scope. + + + + The destroy method. + + + + The optional name of a method to call on the object instance during initialization. + Not commonly used, given that the method may be called programmatically directly + within the body of a Object-annotated method. + + The init method. + + + + The name of this object, or if multiple, aliases for this object. If left unspecified + the name of the object is the name of the attributed method. If specified, the method + name is ignored. + + The name. + + + + Gets the comma-delimited list of names/aliases as an array. + + The array of names. + + + + Utilities to provide support for manipulating ReflectionOnly types in the . + + + + + Load the into the ReflectionsOnly context based on its partial name. + + The partial name. + The matching + + + + A GenericObjectDefinition that provides attribute driven propulation + of properties like LazyInit, Scope or Qualifier + + + + + GenericObjectDefinition is a one-stop shop for standard object definition purposes. + Like any object definition, it allows for specifying a class plus optionally + constructor argument values and property values. Additionally, deriving from a + parent bean definition can be flexibly configured through the "parentName" property. + + In general, use this class for the purpose of + registering user-visible object definitions (which a post-processor might operate on, + potentially even reconfiguring the parent name). + Use / + where parent/child relationships happen to be pre-determined. + + + + Juergen Hoeller + Erich Eichinger + + + + Creates a new to be configured through its + object properties and configuration methods. + + + + + Creates a new as deep copy of the given + object definition. + + the original object definition to copy from + + + + Returns a representation of this + for debugging purposes. + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Name provided by the Component Attribute + + + + + Creates a GenericObjectDefinition that applies the default values provided + in the XML Spring config document. Additionally parses the specific class + attributesthat allows the definition of LazyInit, Scope or Qualifier + + Type of scanned component + Defualts provided in Spring Config document + + + + Provides the name of the object scanned + + return the provided attribute name of the full object type name + + + + When used as a type-level attribute, indicates the name of a scope to use + for instances of the attributed type. + + When used as a method-level attribute in conjunction with the + attribute, indicates the name of a scope to use for + the instance returned from the method. + + In this context, scope means the lifecycle of an instance, such as + singleton, prototype, and so forth. + + + + + + Initializes a new instance of the Scope class. + + + + + + Specifies the scope to use for the annotated object. + + The scope. + + + + Object Defintion Parser for interpreting classes when primary configuration is peformed via XML. + + + + + Interface used to handle custom, top-level tags. + + Implementations are free to turn the metadata in the custom tag into as + many as required. + + Rob Harrop + Mark Pollack (.NET) + + + + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the IObjectDefinitionRegistry + embedded in the supplied + + +

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

+
+ + The element to be parsed. + + + The object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry + + + The primary object definition. + +
+ + + 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 ObjectDefinitions from classes identified by an . + + + + + 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. +

+
+
+ + + Configures the scanner. + + The parser context. + The element. + + + + + NamespaceParser allowing for the configuration of + declarative transaction management using either XML or using attributes. + This namespace handler is the central piece of functionality in the + Spring transaction management facilities and offers two appraoches + to declaratively manage transactions. + One approach uses transaction semantics defined in XML using the + <tx:advice> elements, the other uses attributes + in combination with the <tx:annotation-driven> element. + Both approached are detailed in the Spring reference manual. + + + + + Support class for implementing custom namespace parsers. + + Parsing of individual elements is done via a ObjectDefintionParser. + Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser + to handle a specific element. + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. + + +

+ Used by + for actually parsing a DOM document or + fragment. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Sandu Turcan (.NET) +
+ + + Invoked by after construction but before any + elements have been parsed. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Invoked by after construction but before any + elements have been parsed. + + + + + Parses an element under the root node, typically + an object definition or import statement. + + + The element to be parsed. + + + The parser context. + + + The number of object defintions created from this element. + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Register the specified for the given + + + + + Register the for the 'advice' and + 'attribute-driven' tags. + + + + + Simple listener that logs application events to the console. + + +

+ Intended for use during debugging only. +

+
+ Rod Johnson + Griffin Caprio (.NET) + +
+ + + A listener for application events. + + Rod Johnson + Griffin Caprio (.NET) + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Creates a new instance of the + class. + + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle events. + + Griffin Caprio (.NET) + + + + + + + Encapsulates the data associated with an event raised by an + . + + Rod Johnson + Mark Pollack (.NET) + Griffin Caprio (.NET) + + + + + Creates a new instance of the + class. + + + + + The date and time when the event occured. + + + The date and time when the event occured. + + + + + The system time in milliseconds when the event happened. + + + The system time in milliseconds when the event happened. + + + + + Creates a new instance of the ContextEventArgs class to represent the + supplied context event. + + The type of context event. + + + + Returns a string representation of this object. + + A string representation of this object. + + + + The event type. + + + + + The various context event types. + + + + + The event type when the context is refreshed or created. + + + + + The event type when the context is closed. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Extensions to enable scanning on any AbstractApplicationContext-derived type. + + + + + Scans for types using the provided scanner. + + The context. + The scanner. + + + + Scans for types that satisfy specified predicates located in the specified scan path. + + The context. + The assembly scan path. + The assembly predicate. + The type predicate. + + + + Scans the specified context. + + The context. + The assembly scan path. + The assembly predicate. + The type predicate. + The assemblies to scan. + + + + Scans for types that satisfy specified predicates. + + The context. + The assembly predicate. + The type predicate. + + + + Scans for types using the default scanner. + + The context. + + + + Scans the with assembly filter. + + The context. + The assembly predicate. + + + + Scans the with type filter. + + The context. + The type predicate. + + + + Partial implementation of the + interface. + + +

+ Does not mandate the type of storage used for configuration, but does + implement common functionality. Uses the Template Method design + pattern, requiring concrete subclasses to implement + methods. +

+

+ In contrast to a plain vanilla + , an + is supposed + to detect special objects defined in its object factory: therefore, + this class automatically registers + s, + s + and s that are + defined as objects in the context. +

+

+ An may be also supplied as + an object in the context, with the special, well-known-name of + "messageSource". Else, message resolution is delegated to the + parent context. +

+
+ Rod Johnson + Juergan Hoeller + Griffin Caprio (.NET) + + +
+ + + Configurable implementation of the + interface. + + +

+ This implementation + supports the configuration of resource access protocols and the + corresponding .NET types that know how to handle those protocols. +

+

+ Basic protocol-to-resource type mappings are also defined by this class, + while others can be added either internally, by application contexts + extending this class, or externally, by the end user configuring the + context. +

+

+ Only one resource type can be defined for each protocol, but multiple + protocols can map to the same resource type (for example, the + "http" and "ftp" protocols both map to the + type. The protocols that are + mapped by default can be found in the following list. +

+

+ + + assembly + + + config + + + file + + + http + + + https + + +

+
+ Aleksandar Seovic + + + +
+ + + Describes an object that can load + s. + + +

+ An implementation is + generally required to support the functionality described by this + interface. +

+

+ The class is a + standalone implementation that is usable outside an + ; the aforementioned + class is also used by the + class. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Return an handle for the + specified resource. + + +

+ The handle should always be a reusable resource descriptor; this + allows one to make repeated calls to the underlying + . +

+

+

    +
  • + Must support fully qualified URLs, e.g. "file:C:/test.dat". +
  • +
  • + Should support relative file paths, e.g. "test.dat" (this will be + implementation-specific, typically provided by an + implementation). +
  • +
+

+ + An handle does not imply an + existing resource; you need to check the value of an + 's + property to determine + conclusively whether or not the resource actually exists. + +
+ The resource location. + + An appropriate handle. + + + + +
+ + + The separator between the protocol name and the resource name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified default protocol for unqualified resources. + + + + + Returns a that has been + mapped to the protocol of the supplied . + + The name of the resource. + + A new instance for the + supplied . + + + If a + mapping does not exist for the supplied . + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + + Checks that the supplied starts + with one of the protocol names currently mapped by this + instance. + + The name of the resource. + + if the supplied + starts with one of the known + protocols; if not, or if the supplied + is itself . + + + + + Extracts the protocol name from the supplied + . + + The name of the resource. + + The extracted protocol name or if the + supplied is unqualified (or + is itself ). + + + + + The default protocol to use for unqualified resources. + + +

+ The initial value is "file". +

+
+
+ + + Provides the means to configure an application context in addition to + the methods exposed on the + interface. + + +

+ This interface is to be implemented by most (if not all) + implementations. +

+

+ Configuration and lifecycle methods are encapsulated here to avoid + making them obvious to + client code. +

+

+ Calling will close this + application context, releasing all resources and locks that the + implementation might hold. This includes disposing all cached + singleton objects. +

+ + does not invoke the + attendant on any parent + context. + +
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + The central interface to Spring.NET's IoC container. + + +

+ implementations + provide: + + + + Object factory functionality inherited from the + + and + interfaces. + + + + + The ability to resolve messages, supporting internationalization. + Inherited from the + interface. + + + + + The ability to load file resources in a generic fashion. + Inherited from the + interface. + + + + + Acts an an event registry for supporting loosely coupled eventing + between objecs. Inherited from the + interface. + + + + + The ability to raise events related to the context lifecycle. Inherited + from the + interface. + + + + + Inheritance from a parent context. Definitions in a descendant context + will always take priority. + + + +

+

+ In addition to standard object factory lifecycle capabilities, + implementations need + to detect + , + , and + objects and supply + their attendant dependencies accordingly. +

+

+ This interface is the central client interface in Spring.NET's IoC + container implementation. As such it does inherit a quite sizeable + number of interfaces; implementations are strongly encouraged to use + composition to satisfy each of the inherited interfaces (where + appropriate of course). +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + +
+ + + Extension of the interface + to be implemented by object factories that can enumerate all their object instances, + rather than attempting object lookup by name one by one as requested by clients. + + +

+ implementations that preload + all their objects (for example, DOM-based XML factories) may implement this + interface. This interface is discussed in + "Expert One-on-One J2EE Design and Development", by Rod Johnson. +

+

+ If this is an , + the return values will not take any + hierarchy into account, but + will relate only to the objects defined in the current factory. + Use the helper class to + get all objects. +

+

+ With the exception of + , + the methods and properties in this interface are not designed for frequent + invocation. Implementations may be slow. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + The root interface for accessing a Spring.NET IoC container. + + + + This is the basic client view of a Spring.NET IoC container; further interfaces + such as and + + are available for specific purposes such as enumeration and configuration. + + + This is the root interface to be implemented by objects that can hold a number + of object definitions, each uniquely identified by a + name. An independent instance of any of these objects can be obtained + (the Prototype design pattern), or a single shared instance can be obtained + (a superior alternative to the Singleton design pattern, in which the instance is a + singleton in the scope of the factory). Which type of instance + will be returned depends on the object factory configuration - the API is the same. + The Singleton approach is more useful and hence more common in practice. + + + The point of this approach is that the IObjectFactory is a central registry of + application components, and centralizes the configuring of application components + (no more do individual objects need to read properties files, for example). + See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a + discussion of the benefits of this approach. + + + Normally an IObjectFactory will load object definitions stored in a configuration + source (such as an XML document), and use the + namespace to configure the objects. However, an implementation could simply return + .NET objects it creates as necessary directly in .NET code. There are no + constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties + file etc. Implementations are encouraged to support references amongst objects, + to either Singletons or Prototypes. + + + In contrast to the methods in + , all of the methods + in this interface will also check parent factories if this is an + . If an object is + not found in this factory instance, the immediate parent is asked. Objects in + this factory instance are supposed to override objects of the same name in any + parent factory. + + + Object factories are supposed to support the standard object lifecycle interfaces + as far as possible. The maximum set of initialization methods and their standard + order is: + + + + + + 's + property. + + + + + 's + property. + + + + + + (only applicable if running within an ). + + + + + The + + method of + s. + + + + + 's + method. + + + + + A custom init-method definition. + + + + + The + + method of + s. + + + + +

+ + On shutdown of an object factory, the following lifecycle methods apply: + + + + + + 's + method. + + + + + A custom destroy-method definition. + + + + + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + +

+ Is this object a singleton? + + + + That is, will + always return the same object? + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Does this object factory contain an object with the given name? + + + + The concrete lookup strategy depends on the implementation. E.g. s + will also search their parent factory if a name isn't found . + + + The name of the object to query. + True if an object with the given name is defined. + + + + Return the aliases for the given object name, if defined. + + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + Provides a measure of type safety by throwing an exception if the object is + not of the required . + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + Determine the type of the object with the given name. + + + + More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. + + + The name of the object to query. + + The type of the object or if not determinable. + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + In addition to being generally useful, typically this method is used to provide + dependency injection functionality for objects that are instantiated outwith the + control of a developer. A case in point is the way that the current (1.1) + ASP.NET classes instantiate web controls... the instantiation takes place within + a private method of a compiled page, and thus cannot be hooked into the + typical Spring.NET IOC container lifecycle for dependency injection. + + + + The following code snippet assumes that the instantiated factory instance + has been configured with an object definition named + 'ExampleNamespace.BusinessObject' that has been configured to set the + Dao property of any ExampleNamespace.BusinessObject instance + to an instance of an appropriate implementation... + + namespace ExampleNamespace + { + public class BusinessObject + { + private IDao _dao; + + public BusinessObject() {} + + public IDao Dao + { + get { return _dao; } + set { _dao = value; } + } + } + } + + with the corresponding driver code looking like so... + + IObjectFactory factory = GetAnIObjectFactoryImplementation(); + BusinessObject instance = new BusinessObject(); + factory.ConfigureObject(instance, "object_definition_name"); + // at this point the dependencies for the 'instance' object will have been resolved... + + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + If there is no object definition for the supplied . + + + If any of the target object's dependencies could not be created. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + This is the indexer for the + interface. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Check if this object factory contains an object definition with the given name. + + +

+ Does not consider any hierarchy this factory may participate in. +

+ + Ignores any singleton objects that have been registered by other means + than object definitions. + +
+ The name of the object to look for. + + if this object factory contains an object + definition with the given name. + +
+ + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Sub-interface implemented by object factories that can be part + of a hierarchy. + + Rod Johnson + Rick Evans (.NET) + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts, also resolving a given alias if necessary. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Return the parent object factory, or + if this factory does not have a parent. + + + The parent object factory, or + if this factory does not have a parent. + + + + + Describes an object that can resolve messages. + + +

+ This enables the parameterization and internationalization of messages. +

+

+ Spring.NET provides one out-of-the-box implementation for production + use: +

    +
  • .
  • +
+

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + The default message if name is not found. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + +

+ This method must use the + + value to obtain a resource. +

+

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The resolved object, or if not found. + +
+ + + Gets a localized resource object identified by the supplied + . + + +

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + +
+ + + Applies resources to object properties. + + +

+ Resource key names are of the form objectName.propertyName. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + + Encapsulates event publication functionality. + + +

+ Serves as a super-interface for the + interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Publishes an application context event. + + + The source of the event. May be . + + + The event that is to be raised. + + + + + A registry that manages subscriptions to and the + publishing of events. + + Griffin Caprio + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + Subscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Raised in response to an application context event. + + + + + Returns the date and time this context was loaded. + + +

+ This is to be set immediately after an + has been + instantiated and its configuration has been loaded. Implementations + are permitted to update this value if the context is reset or + refreshed in some way. +

+
+ + The representing when this context + was loaded. + + +
+ + + Gets the parent context, or if there is no + parent context. + + +

+ If the parent context is , then this context + is the root of any context hierarchy. +

+
+ + The parent context, or if there is no + parent. + +
+ + + Gets and sets a name for this context. + + + A name for this context. + + + + + Interface defining methods for start/stop lifecycle control. + The typical use case for this is to control asynchronous processing. + + + + Can be implemented by both components (typically a Spring object defined in + a spring and containers + (typically a spring . Containers will + propagate start/stop signals to all components that apply. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Gets a value indicating whether this component is currently running. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + true if this component is running; otherwise, false. + + + + + Add an + + that will get applied to the internal object factory of this + application context on refresh, before any of the object + definitions are evaluated. + + +

+ To be invoked during context configuration. +

+
+ + The factory processor to register. + + +
+ + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Return the internal object factory of this application context. + + +

+ Can be used to access specific functionality of the factory. +

+ + This is just guaranteed to return an instance that is not + after the context has been refreshed + at least once. + + + Do not use this to post-process the object factory; singletons + will already have been instantiated. Use an + + to intercept the object factory setup process before objects even + get touched. + +
+ +
+ + + Sets the parent of this application context. + + + + The parent should not be changed: it should only be set + outside a constructor if it isn't available when an instance of + this class is created. + + + + The parent context. + + + + + Interface for registries that hold object definitions, i.e. + + and + + instances. + + +

+ Typically implemented by object factories that work with the + + hierarchy internally. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Determine whether the given object name is already in use within this registry, + i.e. whether there is a local object or alias registered under this name. + + + + + Return the names of all objects defined in this registry. + + + The names of all objects defined in this registry, or an empty array + if none defined + + + + + Return the names of all objects defined in this registry. + If includeAncestors is true it includes all objects in the defined parent factories. + + to include parent factories in result + + The names of all objects defined in this registry, if includeAncestors is true it includes + all objects in the defined parent factories, or an empty array if none defined + + + + + Check if this registry contains a object definition with the given name. + + + The name of the object to look for. + + + True if this object factory contains an object definition with the + given name. + + + + + Returns the + + for the given object name. + + + The name of the object to find a definition for. + + + The for + the given name (never null). + + + If the object definition cannot be resolved. + + + In case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Return the aliases for the given object name, if defined. + + the object name to check for aliases + + +

+ Will ask the parent factory if the object cannot be found in this + factory instance. +

+
+ + The aliases, or an empty array if none. + + + If there's no such object definition. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + + The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Return the number of objects defined in the registry. + + + The number of objects defined in the registry. + + + + + Name of the .Net config section that contains Spring.Net context definition. + + + + + Default name of the root context. + + + + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then message resolution + will be delegated to the parent context (if any). +

+
+
+ + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then a default + will be used. +

+
+
+ + + The instance for this class. + + + + + The instance we delegate + our implementation of said interface to. + + + + + The instance we + delegate our implementation of said interface to. + + + + + Protects access to the internal object factory used by the ApplicationContext if attempted to be accessed when in improper state. + + The internal ObjectFactory used by the ApplicationContext + Cannot Access ApplicationContext in this state! + + + + Creates a new instance of the + with no parent context. + + +

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

+
+
+ + + Creates a new instance of the + with no parent context. + + +

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

+
+ Flag specifying whether to make this context case sensitive or not. +
+ + + Creates a new instance of the + with the supplied parent context. + + +

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

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent application context. +
+ + + Adds the given to the list of standard + processors being added to the underlying + + + Each time is called on this context, the context ensures, that + all default s are registered with the underlying . + + The instance. + + + + Closes this context and disposes of any resources (such as + singleton objects in the wrapped + ). + + + + + Subclasses must implement this method to perform the actual + configuration loading. + + +

+ This method is invoked by + , + before any other initialization occurs. +

+
+ + In the case of errors encountered while refreshing the object factory. + +
+ + + Returns the internal object factory of the parent context if it implements + ; else, + returns the parent context itself. + + + The parent context's object factory, or the parent itself. + + + + + Raises an application context event. + + + Any arguments to the event. May be . + + + + + Raises an application context event. + + + The source of the event. + + + Any arguments to the event. May be . + + + + + Create the strategy to be used + + + + + Modify the application context's internal object factory after its standard + initialization. + + +

+ All object definitions will have been loaded, but no objects + will have been instantiated yet. This allows for the registration + of special + s + in certain + implementations. +

+
+ + The object factory used by the application context. + + + In the case of errors. + . +
+ + + Template method which can be overridden to add context-specific + work before the underlying object factory gets refreshed. + + + + + Template method which can be overridden to add context-specific + refresh work. + + +

+ Called on initialization of special objects, before instantiation + of singletons. +

+
+
+ + + Template method which can be overridden to add context-specific + work after the context was refreshed but before the + event gets raised. + + + + + Instantiate and invoke all registered + + objects, respecting any explicit ordering. + + + + Must be called before singleton instantiation. + + + In the case of errors. + + + + Resets the well-known ObjectPostProcessorChecker that logs an info + message when an object is created during IObjectPostProcessor + instantiation, i.e. when an object is not eligible for being + processed by all IObjectPostProcessors. + + + + + Initializes the default event registry for this context. + + + + + Returns the internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + The internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + + + Initializes the default message source for this context. + + +

+ Uses any parent context's message source if one is not available + in this context. +

+
+
+ + + Add a new + that will get applied to the internal object factory of this application context + on refresh, before any of the object definitions are evaluated. + + + The factory processor to register. + + + + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Registers well-known s and + preregisters well-known dependencies using + + the raw object factory as returned from + + + + Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory + + + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of all objects defined in this factory, if includeAncestorsis true + includes all parent factories. + + to include parent factories into result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Check if this object factory contains an object definition with the given name. + + The name of the object to look for. + + True if this object factory contains an object definition with the given name. + + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + + if an object with the given name is defined. + + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Is this object a singleton? + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determine the of the object with the + given name. + + The name of the object to query. + + The of the object, or + if not determinable. + + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + + + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Determine whether the given object name is already in use within this context, + i.e. whether there is a local object. May be override by subclasses, the default + implementation simply returns + + + + + Register a new object definition with this registry. + Must support + + and . + + The name of the object instance to register. + The definition of the object instance to register. + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + The name of the object. + The alias that will behave the same as the object name. + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + + Subscribes to published events of a all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Publishes an application context event. + + +

+ +

+
+ + The source of the event. May be . + + + The event that is to be raised. + + +
+ + + An object that can be used to synchronize access to the + + + + + Set the to be used by this context. + + + + + The timestamp when this context was first loaded. + + + The timestamp (milliseconds) when this context was first loaded. + + + + + Gets a flag indicating whether context should be case sensitive. + + true if object lookups are case sensitive; otherwise, false. + + + + The for this context. + + + If the context has not been initialized yet. + + + + + The for this context. + + + If the context has not been initialized yet. + + + + + Returns the list of the + s + that will be applied to the objects created with this factory. + + +

+ The elements of this list are instances of implementations of the + + interface. +

+
+ + The list of the + s + that will be applied to the objects created with this factory. + +
+ + + Return the internal object factory of this application context. + + + + + Gets the parent context, or if there is no + parent context. + + + The parent context, or if there is no + parent. + + + + + + Gets a value indicating whether this component is currently running. + + + true if this component is running; otherwise, false. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + + + Gets a dictionary of all singleton beans that implement the + ILifecycle interface in this context. + + A dictionary of ILifecycle objects with object name as key. + + + + Raised in response to an implementation-dependant application + context event. + + + + + The date and time this context was first loaded. + + + The representing when this context + was first loaded. + + + + + A name for this context. + + + A name for this context. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return the parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + + Allows for custom modification of new object instances, e.g. + checking for marker interfaces or wrapping them with proxies. + + +

+ Application contexts can auto-detect + + objects in their object definitions and apply them before any other + objects get created. Plain object factories allow for programmatic + registration of post-processors. +

+

+ Typically, post-processors that populate objects via marker interfaces + or the like will implement + , + and post-processors that wrap objects with proxies will normally implement + . +

+
+ Juergen Hoeller + Aleksandar Seovic (.NET) + +
+ + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + 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. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + 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. + +
+ + + Abstract implementation of the interface, + implementing common handling of message variants, making it easy + to implement a specific strategy for a concrete . + + +

Subclasses must implement the abstract ResolveObject + method.

+

Note: By default, message texts are only parsed through + String.Format if arguments have been passed in for the message. In case + of no arguments, message texts will be returned as-is. As a consequence, + you should only use String.Format escaping for messages with actual + arguments, and keep all other messages unescaped. +

+

Supports not only IMessageSourceResolvables as primary messages + but also resolution of message arguments that are in turn + IMessageSourceResolvables themselves. +

+

This class does not implement caching of messages per code, thus + subclasses can dynamically change messages over time. Subclasses are + encouraged to cache their messages in a modification-aware fashion, + allowing for hot deployment of updated messages. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + Harald Radi (.NET) + + + +
+ + + Sub-interface of to be + implemented by objects that can resolve messages hierarchically. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + holds the logger instance shared with subclasses. + + + + + Initializes this instance. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ If the lookup is not successful throw NoSuchMessageException +
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException. +

+
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message if name is not found. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException +

+
+
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + The value object storing those attributes that are required to + properly resolve a message. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful. + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. If + the resource name resolves to null, then in .NET 1.1 the return + value will be String.Empty whereas in .NET 2.0 it will return + null. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Resolve the given code and arguments as message in the given culture, + returning null if not found. Does not fall back to the code + as default message. Invoked by GetMessage methods. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Try to retrieve the given message from the parent MessageSource, if any. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Return a fallback default message for the given code, if any. + + + Default is to return the code itself if "UseCodeAsDefaultMessage" + is activated, or return no fallback else. In case of no fallback, + the caller will usually receive a NoSuchMessageException from GetMessage + + The code to lookup up, such as 'calculator.noRateSet'. + The default message to use, or null if none. + + + + Renders the default message string. The default message is passed in as specified by the + caller and can be rendered into a fully formatted default message shown to the user. + + Default implementation passed he String for String.Format resolving any + argument placeholders found in them. Subclasses may override this method to plug + in custom processing of default messages. + + The default message. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The rendered default message (with resolved arguments) + + + + Format the given default message String resolving any + agrument placeholders found in them. + + The message to format. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The formatted message (with resolved arguments) + + + + Search through the given array of objects, find any + MessageSourceResolvable objects and resolve them. + + + Allows for messages to have MessageSourceResolvables as arguments. + + + The array of arguments for a message. + The with which the + resource is associated. + An array of arguments with any IMessageSourceResolvables resolved + + + + Gets the specified resource (e.g. Icon or Bitmap). + + The name of the resource to resolve. + + The to resolve the + code for. + + The resource if found. otherwise. + + + + Applies resources from the given name on the specified object. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Subclasses must implement this method to resolve a message. + + The code to lookup up, such as 'calculator.noRateSet'. + The with which the + resource is associated. + The resolved message from the backing store of message data. + + + + Resolves an object (typically an icon or bitmap). + + +

+ Subclasses must implement this method to resolve an object. +

+
+ The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + +
+ + + Applies resources to object properties. + + +

+ Subclasses must implement this method to apply resources + to an arbitrary object. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + Gets or Sets a value indicating whether to use the message code as + default message instead of throwing a NoSuchMessageException. + Useful for development and debugging. Default is "false". + + +

Note: In case of a IMessageSourceResolvable with multiple codes + (like a FieldError) and a MessageSource that has a parent MessageSource, + do not activate "UseCodeAsDefaultMessage" in the parent: + Else, you'll get the first code returned as message by the parent, + without attempts to check further codes.

+

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, + AbstractMessageSource contains special checks + to delegate to the internal GetMessageInternal method if available. + In general, it is recommended to just use "UseCodeAsDefaultMessage" during + development and not rely on it in production in the first place, though.

+

Alternatively, consider overriding the GetDefaultMessage + method to return a custom fallback message for an unresolvable code.

+
+ + true if use the message code as default message instead of + throwing a NoSuchMessageException; otherwise, false. + +
+ + + The parent message source used to try and resolve messages that + this object can't resolve. + + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + Convenient abstract superclass for + implementations that + draw their configuration from XML documents containing object + definitions as understood by an + . + + Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + class + with the given parent context. + + +

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

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent context. +
+ + + Instantiates and populates the underlying + with the object + definitions yielded up by the + method. + + + In the case of errors encountered while refreshing the object factory. + + + In the case of errors encountered reading any of the resources + yielded by the method. + + + + + + Initialize the object definition reader used for loading the object + definitions of this context. + + +

+ The default implementation of this method is a no-op; i.e. it does + nothing. Can be overridden in subclasses to provide custom + initialization of the supplied + ; for example, a derived + class may want to turn off XML validation. +

+
+ + The object definition reader used by this context. + +
+ + + Load the object definitions with the given + . + + +

+ The lifecycle of the object factory is handled by + ; + therefore this method is just supposed to load and / or register + object definitions. +

+
+ + The reader containing object definitions. + + In case of object registration errors. + + + In the case of errors encountered reading any of the resources + yielded by either the or + the methods. + +
+ + + Loads the object definitions into the given object factory, typically through + delegating to one or more object definition readers. + + The object factory to lead object definitions into + + + + + + Create a new reader instance for importing object definitions into the specified . + + the to be associated with the reader + a new instance. + + + + Customizes the internal object factory used by this context. + + Called for each attempt. +

+ The default implementation is empty. Can be overriden in subclassses to customize + DefaultListableBeanFatory's standard settings. +

+ The newly created object factory for this context +
+ + + Create an internal object factory for this context. + + +

+ Called for each attempt. + This default implementation creates a + + with the internal object factory of this context's parent serving + as the parent object factory. Can be overridden in subclasse,s + for example to customize DefaultListableBeanFactory's settings. +

+
+ The object factory for this context. +
+ + + Determine whether the given object name is already in use within this context's object factory, + i.e. whether there is a local object or alias registered under this name. + + + + + An array of resource locations, referring to the XML object + definition files that this context is to be built with. + + +

+ Examples of the format of the various strings that would be + returned by accessing this property can be found in the overview + documentation of with the + class. +

+
+ + An array of resource locations, or if none. + +
+ + + An array of resources that this context is to be built with. + + +

+ Examples of the format of the various strings that would be + returned by accessing this property can be found in the overview + documentation of with the + class. +

+
+ + An array of s, or if none. + +
+ + + Subclasses must return their internal object factory here. + + + The internal object factory for the application context. + + + + + + + implementation that passes the application context to object that + implement the + , + , and + interfaces. + + +

+ If an object's class implements more than one of the + , + , and + interfaces, then the + order in which the interfaces are satisfied is as follows... + + + + + + + + + + + +

+

+ Application contexts will automatically register this with their + underlying object factory. Applications should thus never need to use + this class directly. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + The that this + instance will work with. + + + + + Apply this + to the given new object instance before any object + initialization callbacks. + + + The new object instance. + + + The name of the object. + + + The 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. + + + 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. + + + + + + Convenient superclass for application objects that want to be aware of + the application context, e.g. for custom lookup of collaborating object + or for context-specific resource access. + + +

+ It saves the application context reference and provides an + initialization callback method. Furthermore, it offers numerous + convenience methods for message lookup. +

+

+ There is no requirement to subclass this class: it just makes things + a little easier if you need access to the context, e.g. for access to + file resources or to the message source. Note that many application + objects do not need to be aware of the application context at all, + as they can receive collaborating objects via object references. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) +
+ + + To be implemented by any object that wishes to be notified + of the that it runs in. + + +

+ Implementing this interface makes sense when an object requires access + to a set of collaborating objects. Note that configuration via object + references is preferable to implementing this interface just for object + lookup purposes. +

+

+ This interface can also be implemented if an object needs access to + file resources, i.e. wants to call + , or access to + the . However, it is + preferable to implement the more specific + + interface to receive a reference to the + object in that scenario. +

+

+ Note that dependencies can also + be exposed as object properties of the + type, populated via strings with + automatic type conversion performed by an object factory. This obviates + the need for implementing any callback interface just for the purpose + of accessing a specific file resource. +

+

+ + is a convenience implementation of this interface for your + application objects. +

+

+ For a list of all object lifecycle methods, see the overview for the + interface. +

+
+ Rod Johnson + Mark Pollack (.NET) + + + +
+ + + 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. + + +
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + The that this + object runs in. + +
+ + + Intializes the wrapped + . + + +

+ This is a template method that subclasses can override for custom + initialization behavior. +

+

+ Gets called by the + + instance directly after setting the context instance. +

+ + Does not get called on reinitialization of the context. + +
+ + In the case of any initialization errors. + + + If thrown by application context methods. + +
+ + + The context class that any context passed to the + + must be an instance of. + + + The + . + + + + + Return a for the + application context used by this object, for easy message access. + + + + + Gets or sets the that this + object runs in. + + + When passed an unexpected + implementation + instance that is not compatible with the + defined by the value of the + . + property. Also, thrown when trying to re-initialize with a + different than was + originally used. + + + If thrown by any application context methods. + + + + + + + ApplicationContext that can scan to identify object definitions + + + + + Generic ApplicationContext implementation that holds a single internal + instance and does not + assume a specific object definition format. + + + Implements the interface in order + to allow for aplying any object definition readers to it. + Typical usage is to register a variety of object definitions via the + interface and then call + to initialize those + objects with application context semantics (handling + , auto-detecting + ObjectFactoryPostProcessors, etc). + + In contrast to other IApplicationContext implementations that create a new internal + IObjectFactory instance for each refresh, the internal IObjectFactory of this context + is available right from the start, to be able to register object definitions on it. + may only be called once + Usage examples + + GenericApplicationContext ctx = new GenericApplicationContext(); + // register your objects and object definitions + ctx.RegisterObjectDefinition(...) + ctx.Refresh(); + + + Mark Pollack + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true names in the context are case sensitive. + + + + Initializes a new instance of the class. + + The object factory instance to use for this context. + + + + Initializes a new instance of the class. + + The parent application context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + + + + Initializes a new instance of the class. + + The object factory to use for this context + The parent applicaiton context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + The object factory to use for this context + + + + Do nothing operation. We hold a single internal ObjectFactory and rely on callers + to register objects throug our public methods (or the ObjectFactory's). + + + In the case of errors encountered while refreshing the object factory. + + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + + + + Return the internal object factory of this application context. + + + + + + Gets the underlying object factory of this context, available for + registering object definitions. + + You need to call Refresh to initialize the + objects factory and its contained objects with application context + semantics (autodecting IObjectFactoryPostProcessors, etc). + The internal object factory (as DefaultListableObjectFactory). + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true names in the context are case sensitive. + + + + Initializes a new instance of the class. + + The object factory instance to use for this context. + + + + Initializes a new instance of the class. + + The parent application context. + + + + Initializes a new instance of the class. + + The name of the application context.if set to true names in the context are case sensitive.The parent application context. + + + + Initializes a new instance of the class. + + The object factory to use for this contextThe parent applicaiton context. + + + + Initializes a new instance of the class. + + The name of the application context.if set to true names in the context are case sensitive.The parent application context.The object factory to use for this context + + + + Creates an instance + using context definitions supplied in a custom configuration and + configures the with that instance. + + + Implementations of the + interface must provide the following two constructors: + + + + A constructor that takes a string array of resource locations. + + + + + A constructor that takes a reference to a parent application context + and a string array of resource locations (and in that order). + + + +

+ Note that if the type attribute is not present in the declaration + of a particular context, then a default + + is assumed. This default + + is currently the + ; please note the exact + of this default is an + implementation detail, that, while unlikely, may do so in the future. + to +

+
+ +

+ This is an example of specifying a context that reads its resources from + an embedded Spring.NET XML object configuration file... +

+ + + + +
+ + + + + + + + + +

+ This is an example of specifying a context that reads its resources from + a custom configuration section within the same application / web + configuration file and uses case insensitive object lookups. +

+

+ Please note that you must adhere to the naming + of the various sections (i.e. '<sectionGroup name="spring">' and + '<section name="context">'. +

+ + + + +
+
+ + + + + + + + + + + + +

+ And this is an example of specifying a hierarchy of contexts. The + hierarchy in this case is only a simple parent->child hierarchy, but + hopefully it illustrates the nesting of context configurations. This + nesting of contexts can be arbitrarily deep, and is one way... child + contexts know about their parent contexts, but parent contexts do not + know how many child contexts they have (if any), or have references + to any such child contexts. +

+ + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mark Pollack + Aleksandar Seovic + Rick Evans + + + + + Creates an instance + using the context definitions supplied in a custom + configuration section. + + +

+ This instance is + also used to configure the . +

+
+ + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + An instance + populated with the object definitions supplied in the configuration + section. + +
+ + + Create all child-contexts in the given for the given context. + + The parent context to use + The current configContext + The list of child context elements + + + + Instantiates a new context. + + + + + Gets the context's name specified in the name attribute of the context element. + + The current configContext + The context element + + + + Extracts the context-type from the context element. + If none is specified, returns the parent's type. + + + + + Extracts the case-sensitivity attribute from the context element + + + + + Gets the context specified in the type + attribute of the context element. + + +

+ If this attribute is not defined it defaults to the + type. +

+
+ + If the context type does not implement the + interface. + +
+ + + Returns the array of resources containing object definitions for + this context. + + + + + Returns the array of child contexts for this context. + + + + + The of + created if no type attribute is specified on a context element. + + + + + + Get the context's case-sensitivity to use if none is specified + + +

+ Derived handlers may override this property to change their default case-sensitivity. +

+

+ Defaults to 'true'. +

+
+
+ + + Specifies, whether the instantiated context will be automatically registered in the + global . + + + + + Returns if the context should be lazily + initialized. + + + + + Constants defining the structure and values associated with the + schema for laying out Spring.NET contexts in XML. + + + + + Defines a single + . + + + + + Specifies a context name. + + + + + Specifies if context should be case sensitive or not. Default is true. + + + + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but its generally regarded + as better form if the names of one's objects + are specified explicitly. +

+
+
+ + + Specifies whether context should be lazy initialized. + + + + + Defines an + + + + + Specifies the URI for an + . + + + + + Provides access to a central registry of + s. + + +

+ A singleton implementation to access one or more application contexts. Application + context instances are cached. +

+

Note that the use of this class or similar is unnecessary except (sometimes) for + a small amount of glue code. Excessive usage will lead to code that is more tightly + coupled, and harder to modify or test. Consider refactoring your code to use standard + Dependency Injection techniques or implement the interface IApplicationContextAware to + obtain a reference to an application context.

+
+ Mark Pollack + Aleksandar Seovic + +
+ + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the ContextRegistry class. + + +

+ Explicit static constructor to tell C# compiler + not to mark type as beforefieldinit. +

+
+
+ + + Registers an instance of an + . + + +

+ This is usually called via a + inside a .NET + application configuration file. +

+
+ The application context to be registered. + + If a context has previously been registered using the same name + +
+ + + Handles events raised by an application context. + + + + + + + Removes the context from the registry + + + Has no effect if the context wasn't registered + + ´the context to remove from the registry + + + + Returns the root application context. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The root application context. +
+ + + Returns context based on specified name. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The context name. + The specified context, or null, if context with that name doesn't exists. + + If the context name is null or empty + +
+ + + Removes all registered + s from this + registry. + + + Raises the event while still holding a lock on + + + + + Allows to check, if a context is already registered + + The context name. + true, if the context is already registered. false otherwise + + + + This event is fired, if ContextRegistry.Clear() is called.
+ Clients may register to get informed +
+ + This event is fired while still holding a lock on the Registry.
+ 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used +
+
+ + + Gets an object that should be used to synchronize access to ContextRegistry + from the calling code. + + + + + Default implementation of the + interface. + + +

+ Provides easy ways to store all the necessary values needed to resolve + messages from an . +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Describes objects that are suitable for message resolution in a + . + + +

+ Spring.NET's own validation error classes implement this interface. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + +

+ The last code will therefore be the default one. +

+
+ + A array of codes which are associated + with this message. + +
+ + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + Creates a new instance of the + class + using a single code. + + The message code to be resolved. + + + + Initializes a new instance of the class. + + The codes to be used to resolve this message + + + + Creates a new instance of the + class + using multiple codes. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + + + Creates a new instance of the + class + using multiple codes and a default message. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + The default message used if no code could be resolved. + + + + + Creates a new instance of the + class + from another resolvable. + + +

+ This is the copy constructor for the + class. +

+
+ + The to be copied. + + + If the supplied is . + +
+ + + Returns a representation of this + . + + + A representation of this + . + + + + + Calls the visit method on the supplied + to output a version of this class. + + The visitor to use. + + A representation of this + . + + + + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + + A array of codes which are associated + with this message. + + + + + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + + Return the default code for this resolvable. + + + The default code of this resolvable; this will be the last code in + the codes array, or if this instance has no + codes. + + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + + Default section handler that can handle any configuration section. + + +

+ Simply returns the configuration section as an . +

+
+ Aleksandar Seovic +
+ + + Returns the configuration section as an + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is a null reference. + + + The for the section. + + Config section as XmlElement. + + + + Empty implementation that + simply delegates all method calls to it's parent + . + + +

+ If no parent is available, + no messages will be resolved (and a + will be thrown). +

+

+ Used as placeholder by the + class, + if the context definition doesn't define its own + . Not intended for direct use + in applications. +

+
+ Juergan Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + + Helper class for easy access to messages from an + , providing various + overloaded GetMessage methods. + + +

+ Available from + , but also + reusable as a standalone helper to delegate to in application objects. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + + +
+ + + Creates a new instance of the + class + that uses the current + for all locale specific lookups. + + + The to use to locate messages. + + + + + Creates a new instance of the + class + + + The to use to locate + messages. + + + The to use for + locale specific messages. + + + + + Retrieve the message for the given code and the default + . + + The code of the message. + The message. + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + The message. + + + + Retrieve the message for the given code and the default + . + + The code of the message. + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + . + + + The . + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + in the given + . + + + The . + + + The to use for + lookups. + + The message + + If the message could not be found. + + + + + Visitor class to represent + instances. + + +

+ Used in the first instance to supply stringified versions of + instances. +

+

+ Other methods can be added here to return different representations, + including XML, CSV, etc.. +

+
+ Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + + + Outputs the supplied + as a nicely formatted . + + + The to output. + + + + + Configuration section handler for the (recommended, Spring.NET standard) parsers + config section. + + +

+ Spring.NET allows the registration of custom configuration parsers that + can be used to create simplified configuration schemas that better + describe object definitions. +

+

+ For example, Spring.NET uses this facility internally in order to + define simplified schemas for various AOP, Data and Services definitions. +

+
+ +

+ The following example shows how to configure both this section handler + and how to define custom configuration parsers within a Spring.NET + config section. +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Registers parsers specified in the (recommended, Spring.NET standard) + parsers config section with the . + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because parsers + are registered as a side-effect of this object's execution and there + is thus no need to return anything. + + + + + An that doesn't do a whole lot. + + +

+ is an implementation of + the NullObject pattern. It should be used in those situations where a + needs to be passed (say to a + method) but where the resolution of messages is not required. +

+

+ There should not (typically) be a need to instantiate instances of this class; + does not maintan any state + and the instance is + thus safe to pass around. +

+
+ Aleksandar Seovic +
+ + + The canonical instance of the + class. + + + + + Creates a new instance of the class. + + +

+ Consider using + instead. +

+
+
+ + + Simply returns the supplied message as-is. + + The code of the message to resolve. + + The to resolve the + code for. + + + The supplied message as-is. + + + + + Always returns . + + The code of the object to resolve. + + The to resolve the + code for. + + + (always). + + + + + Does nothing. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Handler for Spring.NET resourceHandlers config section. + + +

+ Spring allows registration of custom resource handlers that can be used to load + object definitions from. +

+

+ For example, if you wanted to store your object definitions in a database instead + of in the config file, you could write a custom implementation + and register it with Spring using 'db' as a protocol name. +

+

+ Afterwards, you would simply specify resource URI within the context config element + using your custom resource handler. +

+
+ +

+ The following example shows how to configure both this section handler, + how to define custom resource within Spring config section, and how to load + object definitions using custom resource handler: +

+ + + + +
+ + + + + + + + + + + + + + Aleksandar Seovic + + + + + Registers resource handlers that are specified in + the resources config section with the . + + + The configuration settings in a corresponding parent + configuration section. Ignored. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns null, because resource handlers are registered + as a sideffect of its execution and there is no need to return anything. + + + + + An implementation that + accesses resources from .resx / .resource files. + + Note that for the method + GetResourceObject if the resource name resolves to null, then in + .NET 1.1 the return value will be String.Empty whereas + in .NET 2.0 it will return null. + Griffin Caprio (.NET) + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + + + + Defines a simple initialization callback for objects that need to to some + post-initialization logic after all of their dependencies have been injected. + + +

+ An implementation of the + + method might perform some additional custom initialization (over and above that + performed by the constructor), or merely check that all mandatory properties + have been set (this last example is a very typical use case of this interface). +

+ + The use of the + interface + by non-Spring.NET framework code can be avoided (and is generally + discouraged). The Spring.NET container provides support for a generic + initialization method given to the object definition in the object + configuration store (be it XML, or a database, etc). This requires + slightly more configuration (one attribute-value pair in the case of + XML configuration), but removes any dependency on Spring.NET from the + class definition. + +
+ Rod Johnson + Rick Evans (.NET) + +
+ + + 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. + +
+ + + Creates a new instance of the + class. + + + + + Resolves a given code by searching through each assembly name in + the base names array. + + The code to resolve. + + The to use for lookups. + + The message from the resource set. + + + + Resolves a given code by searching through each assembly name in the array. + + The code to resolve. + + The to use for lookups. + + The object from the resource set. + + + + Uses a System.ComponentModel.ComponentResourceManager + to apply resources to object properties. + Resource key names are of the form objectName.propertyName + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + An object that contains the property values to be applied. + + + The base name of the object to use for the key lookup. + + + The to use for lookups. + If , uses the + value. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + + + Resolves a code into an object given a base name. + + The to search. + The code to resolve. + + The to use for lookups. + + The object from the resource file. + + + + Returns a representation of the + . + + A representation of the + . + + + + Invoked by an + after it has set all object properties supplied. + + +

+ The list may contain objects of type or + . types + are converted to instances using the notation + resourcename, assembly partial name. +

+
+ + If the conversion from a to a + can't be performed. + +
+ + + The collection of s + in this . + + + + + that allows concrete registration of + objects and messages in code, rather than from external configuration sources. + + +

+ Mainly useful for testing. +

+
+ Rod Johnson + Griffin Caprio (.NET) +
+ + + Creates a new instance of the StaticApplicationContext class. + + + + + Creates a new instance of the StaticApplicationContext class. + + The parent application context. + + + + Creates a new, named instance of the StaticApplicationContext class. + + the context name + The parent application context. + + + + Do nothing: we rely on callers to update our public methods. + + + + + Register a singleton object with the default object factory. + + The name of the object. + The of the object. + The property values for the singleton instance. + + + + Registers a prototype object with the default object factory. + + The name of the prototype object. + The of the prototype object. + The property values for the prototype instance. + + + + Associate the given message with the given code. + + The lookup code. + + The that the message should be found within. + + The message associated with the lookup code. + + + + Simple implementation of + that allows messages to be held in an object and added programmatically. + + +

+ Mainly useful for testing. +

+

+ This supports internationalization. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Returns a format string. + + The code of the message to resolve. + + The to resolve the + code for. + + + A format string or if not found. + + + + + + Resolves an object (typically an icon or bitmap). + + The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + + + + + + Applies resources to object properties. + + +

+ Uses a System.ComponentModel.ComponentResourceManager + internally to apply resources to object properties. Resource key + names are of the form objectName.propertyName. +

+

+ This feature is not currently supported on version 1.0 of the .NET platform. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + +
+ + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The message format associated with this lookup code. + + + + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The object associated with this lookup code. + + + + + Returns a representation of this + message source. + + + A containing all of this message + source's messages. + + + + + Configuration section handler for the Spring.NET typeAliases + config section. + + +

+ Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+

+ This includes type names specified within an object definition, as well + as values of the properties or constructor arguments that expect + instances. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type aliases within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeAliases config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of this + object's execution and thus there is no need to return anything. + + + + + Configuration section handler for the Spring.NET typeConverters + config section. + + +

+ Type converters are used to convert objects from one type into another + when injecting property values, evaluating expressions, performing data + binding, etc. +

+

+ They are a very powerful mechanism as they allow Spring.NET to automatically + convert string-based property values from the configuration file into the appropriate + type based on the target property's type or to convert string values submitted + via a web form into a type that is used by your data model when Spring.NET data + binding is used. Because they offer such tremendous help, you should always provide + a type converter implementation for your custom types that you want to be able to use + for injected properties or for data binding. +

+

+ The standard .NET mechanism for specifying type converter for a particular type is + to decorate the type with a , passing the type + of the -derived class as a parameter. +

+

+ This mechanism will still work and is a preferred way of defining type converters if + you control the source code for the type that you want to define a converter for. However, + this configuration section allows you to specify converters for the types that you don't + control and it also allows you to override some of the standard type converters, such as + the ones that are defined for some of the types in the .NET Base Class Library. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type converters within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeConverters config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of + its execution and thus there is no need to return anything. + + + + + An implementation that + reads context definitions from XML based resources. + + +

+ Currently, the resources that are supported are the file, + http, ftp, config and assembly resource + types. +

+

+ You can provide custom implementations of the + interface and and register them + with any that inherits + from the + + interface. +

+ + In case of multiple config locations, later object definitions will + override ones defined in previously loaded resources. This can be + leveraged to deliberately override certain object definitions via an + extra XML file. + +
+ +

+ Find below some examples of instantiating an + using a + variety of different XML resources. +

+ + // an XmlApplicationContext that reads its object definitions from an + // XML file that has been embedded in an assembly... + IApplicationContext context = new XmlApplicationContext + ( + "assembly://AssemblyName/NameSpace/ResourceName" + ); + + // an XmlApplicationContext that reads its object definitions from a + // number of disparate XML resources... + IApplicationContext context = new XmlApplicationContext + ( + // from an XML file that has been embedded in an assembly... + "assembly://AssemblyName/NameSpace/ResourceName", + // and from a (relative) filesystem-based resource... + "file://Objects/services.xml", + // and from an App.config / Web.config resource... + "config://spring/objects" + ); + +
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + +
+ + + Initializes a new instance of the XmlApplicationContext class. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The created context will be case sensitive. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + This constructor is meant to be used by derived classes. By passing =false, it is + the responsibility of the deriving class to call to initialize the context instance. + + if true, is called automatically. + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + An array of resource locations, referring to the XML object + definition files with which this context is to be built. + + + An array of resource locations, or if none. + + + + + + An array of resources instances with which this context is to be built. + + + An array of s, or if none. + + + + + + Encapsulates arguments to the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + + + + Initializes a new instance of the XmlApplicationContextArgs class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + if set to true [case sensitive]. + if set to true [refresh]. + + + Exception thrown during application context initialization. + Rod Johnson + Mark Pollack (.NET) + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException 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 ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the + class. + + + + + 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. + + + + + 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. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Marks an interface as being an application event listener. + + Griffin Caprio + + + + + Creates a new instance of the + class. + + + + + The callback for application events. + + + + + To be implemented by any object that wishes to be notified + of the associated with it. + + +

+ In the current implementation, the + will typically be the + associated that + spawned the implementing object. +

+

+ The can usually also be + passed on as an object reference to arbitrary object properties or + constructor arguments, because a + is typically defined as an + object with the well known name "messageSource" in the + associated application context. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Sets the associated + with this object. + + +

+ Invoked after population of normal object properties but + before an initializing callback such as the + + method of the + interface + or a custom init-method. +

+

+ It is also invoked before the + + property of any + + implementation. +

+
+ + The associated + with this object. + +
+ + + Interface to be implemented by any object that wishes to be notified + of the (typically the + ) that it runs in. + + +

+ Note that dependencies can also + be exposed as object properties of type + , populated via strings with + automatic type conversion by the object factory. This obviates the + need for implementing any callback interface just for the purpose of + accessing a specific resource. +

+

+ You typically need an + when your application object has to access a variety of file resources + whose names are calculated. A good strategy is to make the object use + a default resource loader but still implement the + interface to allow + for overriding when running in an + . +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Sets the + that this object runs in. + + +

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

+
+
+ + + Thrown when a message cannot be resolved. + + Rod Johnson + Mark Pollack (.NET) + + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class with the + specified message. + + + 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. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for given culture. + + + The that was used + to search for the code. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for the current UI culture. + + + + + Convenience base class for + implementations, pre-implementing typical behavior. + + +

+ The method will + check whether a or + can be opened; + will always return + ; + and + throw an exception; + and will + return the value of the + property. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Aleksandar Seovic (.NET) + +
+ + + The default special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + A string representation of the resource. + + + If the supplied is + or contains only whitespace character(s). + +
+ + + Strips any protocol name from the supplied + . + + +

+ If the supplied does not + have any protocol associated with it, then the supplied + will be returned as-is. +

+
+ + + GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); + // returns www.mycompany.com/resource.txt + + + + The name of the resource. + + + The name of the resource without the protocol name. + +
+ + + Resolves the supplied to its value + sans any leading protocol. + + + The name of the resource. + + + The name of the resource without the protocol name. + + + + + + Resolves the presence of the + value + in the supplied into a path. + + +

+ The default implementation simply returns the supplied + as is. +

+
+ + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + +
+ + + This implementation returns the + of this resource. + + + + + + Determines whether the specified is + equal to the current . + + +

+ This implementation compares values. +

+
+ +
+ + + Serves as a hash function for a particular type, suitable for use + in hashing algorithms and data structures like a hash table. + + +

+ This implementation returns the hashcode of the + property. +

+
+ +
+ + + Factory Method. Create a new instance of the current resource type using the given resourceName + + + + + The ResourceLoader to be used for resolving relative resources + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Creates a new resource that is relative to this resource based on the + supplied . + + +

+ This method can accept either a fully qualified resource name or a + relative resource name as it's parameter. +

+

+ A fully qualified resource is one that has a protocol prefix and + all elements of the resource name. All other resources are treated + as relative to this resource, and the following rules are used to + locate a relative resource: +

+ + + If the starts with '..', + the current resource path is navigated backwards before the + is concatenated to the current + of + this resource. + + + If the starts with '/', the + current resource path is ignored and a new resource name is + appended to the + of + this resource. + + + If the starts with '.' or a + letter, a new path is appended to the current + of + this resource. + + +
+ + The name of the resource to create. + + The relative resource. + + If the process of resolving the relative resource yielded an + invalid URI. + + + If this resource does not support the resolution of relative + resources (as determined by the value of the + + property). + + +
+ + + Calculates a new resource path based on the supplied + . + + + The relative path to evaluate. + + The newly calculated resource path. + + + + The special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+ +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the protocol associated with this resource (if any). + + +

+ The value of this property may be if no + protocol is associated with the resource type (for example if the + resource is a memory stream). +

+
+ + The protocol associated with this resource (if any). + +
+ + + Does this resource represent a handle with an open stream? + + +

+ This, the default implementation, always returns + . +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + + + + + Returns a handle for this resource. + + +

+ This, the default implementation, always throws a + , assuming that the + resource cannot be resolved to an absolute file path. +

+
+ + The handle for this resource. + + + This implementation always throws a + . + + + +
+ + + Does this resource actually exist in physical form? + + +

+ This implementation checks whether a + can be opened, falling back to whether a + can be opened. +

+

+ This will cover both directories and content resources. +

+

+ This implementation will also return if + permission to the (file's) path is denied. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + Does this support relative + resource retrieval? + + +

+ This property is generally to be consulted prior to attempting + to attempting to access a resource that is relative to this + resource (via a call to + ). +

+

+ This, the default implementation, always returns + . +

+
+ + if this + supports relative resource + retrieval. + +
+ + + Gets the root location of the resource. + + +

+ Where root resource can be taken to mean that part of the resource + descriptor that doesn't change when a relative resource is looked + up. Examples of such a root location would include a drive letter, + a web server name, an assembly name, etc. +

+
+ + The root location of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets the current path of the resource. + + +

+ An example value of this property would be the name of the + directory containing a filesystem based resource. +

+
+ + The current path of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets those characters that are valid path separators for the + resource type. + + +

+ An example value of this property would be the + and + values for a + filesystem based resource. +

+

+ Any derived classes that override this method are expected to + return a new array for each access of this property. +

+
+ + Those characters that are valid path separators for the resource + type. + + + This, the default implementation, always throws a + . + +
+ + + An implementation for + resources stored within assemblies. + + +

+ This implementation expects any resource name passed to the + constructor to adhere to the following format: +

+

+ assembly://assemblyName/namespace/resourceName +

+
+ Aleksandar Seovic (.NET) + Federico Spinazzi (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the assembly resource. + + + If the supplied did not conform + to the expected format. + + + If the assembly specified in the supplied + was loaded twice with two + different evidences. + + + If the assembly specified in the supplied + could not be found. + + + If the caller does not have the required permission to load + the assembly specified in the supplied + . + + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the caller does not have the required permission to load + the underlying assembly's manifest. + + + + + + + Does the embedded resource specified in the value passed to the + constructor exist? + + + if this resource actually exists in physical + form (for example on a filesystem). + + + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (the assembly name in this + case). + + + The root location of the resource. + + + + + + Gets the current path of the resource (the namespace in which the + target resource was embedded in this case). + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + + + + Used when retrieving information from the standard .NET configuration + files (App.config / Web.config). + + +

+ If created with the name of a configuration section, then all methods + aside from the description return , + , or throw an exception. If created with an + , then the + property + will return a corresponding to parse. +

+
+ Mark Pollack + Rick Evans +
+ + + Creates new instance of the + class. + + + The actual XML configuration section. + + + If the supplied is . + + + + + Creates new instance of the + class. + + + The name of the configuration section. + + + If the supplied is + or contains only whitespace character(s). + + + + + Returns the handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a description for this resource (the name of the + configuration section in this case). + + + A description for this resource. + + + + + + Does this resource actually exist in physical form? + + +

+ This implementation always returns . +

+
+ + + + + +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Exposes the actual for the + configuration section. + + +

+ Introduced to accomodate line info tracking during parsing. +

+
+
+ + + Holder that combines with a specific encoding to be used for reading + from the resource + + Juergen Hoeller + Erich Eichinger (.NET) + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + the resource to read from. Must not be null + whether to autoDetect encoding from byte-order marks () + + + + Create an encoded resource using the specified encoding. + + the resource to read from. Must not be null + the encoding to use. If null, encoding will be autodetected. + whether to autoDetect encoding from byte-order marks () + + + + + + + + + + Determine whether equals this instance. + + + true if obj is an and both + , and are equal. + + + + + Calculate the unique hash code for this instance. + + + + + + Get a textual description of the resource. + + + + + Get the underlying resource + + + + + Get the encoding to use for reading, if any. May be null + + + + + whether to autoDetect encoding from byte-order marks () + + + + + A backed resource. + + +

+ Supports resolution as both a and a + . +

+

+ Also supports the use of the ~ character. If the ~ character + is the first character in a resource path (sans protocol), the ~ + character will be replaced with the value of the + System.AppDomain.CurrentDomain.BaseDirectory property (an example of + this can be seen in the examples below). +

+
+ +

+ Consider the example of an application that is running (has been launched + from) the C:\App\ directory. The following resource paths will map + to the following resources on the filesystem... +

+ + strings.txt C:\App\strings.txt + ~/strings.txt C:\App\strings.txt + file://~/strings.txt C:\App\strings.txt + file://~/../strings.txt C:\strings.txt + ../strings.txt C:\strings.txt + ~/../strings.txt C:\strings.txt + + // note that only a leading ~ character is resolved to the executing directory... + stri~ngs.txt C:\App\stri~ngs.txt + +
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + If the supplied is + or contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + Supresses initialization of this instance. Used from derived classes. + + + If the supplied is + or contains only whitespace character(s). + + + + + Initializes this instance. + + + + + + Resolves the handle + for the supplied . + + + The name of the file system resource. + + + The handle for this resource. + + + + + Resolves the root location for the supplied . + + + The name of the file system resource. + + + The root location of the resource. + + + + + Resolves the path for the supplied . + + + The name of the file system resource. + + + The current path of the resource. + + + + + Resolves the presence of the + value + in the supplied into a path. + + + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the underlying handle for + this resource. + + + The handle for this resource. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (a drive or UNC file share + name in this case). + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the underlying file could not be found. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + adapter implementation for a + . + + +

+ Should only be used if no other + implementation is applicable. +

+

+ In contrast to other + implementations, this is an adapter for an already opened + resource - the + therefore always returns . Do not use this class + if you need to keep the resource descriptor somewhere, or if you need + to read a stream multiple times. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The input to use. + + + Where the input comes from. + + + If the supplied is + . + + + + + The input to use. + + + If the underlying has already + been read. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Custom type converter for instances. + + +

+ A resource path may contain placeholder variables of the form ${...} + that will be expended to environment variables. +

+

+ Currently only supports conversion from a + instance. +

+
+ +

+ On Win9x boxes, this resource path, ${userprofile}\objects.xml will + be expanded at runtime with the value of the 'userprofile' environment + variable substituted for the '${userprofile}' portion of the path. +

+ + // assuming a user called Rick, running on a plain vanilla Windows XP setup... + // this resource path... + + ${userprofile}\objects.xml + + // will become (after expansion)... + + C:\Documents and Settings\Rick\objects.xml + +
+ Mark Pollack + + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified resourceLoader. + + the underlying IResourceLoader to be used to resolve resources + + + + Returns whether this converter can convert an object of one + to a + + + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + + + + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An if successful. + + + If the resource name objectained form the supplied + is malformed. + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + Resolve the given path, replacing placeholder values with + corresponding property values if necessary. + + +

+ This implementation resolves environment variables only. +

+
+ The original resource path. + The resolved resource path. +
+ + + Return the used to + resolve the string. + + + The used to resolve + the string. + + + + + Registry class that allows users to register and retrieve protocol handlers. + + + + Resource handler is an implementation of interface + that should be used to process resources with the specified protocol. + + + They are used throughout the framework to access resources from various + sources. For example, application context loads object definitions from the resources + that are processed using one of the registered resource handlers. + + Following resource handlers are registered by default: + + + Protocol + Handler Type + Description + + + config + + Resolves the resources by loading specified configuration section from the standard .NET config file. + + + file + + Resolves filesystem resources. + + + http + + Resolves remote web resources. + + + https + + Resolves remote web resources via HTTPS. + + + ftp + + Resolves ftp resources. + + + assembly + + Resolves resources that are embedded into an assembly. + + + web + Spring.Core.IO.WebResource, Spring.Web* + Resolves resources relative to the web application's virtual directory. + + + * only available in web applications. + + Users can create and register their own protocol handlers by implementing interface + and mapping custom protocol name to that implementation. See for details + on how to register custom protocol handler. + + + Aleksandar Seovic + + + + Name of the .Net config section that contains definitions + for custom resource handlers. + + + + + Registers standard and user-configured resource handlers. + + + + + Returns resource handler for the specified protocol name. + + + + This method returns object that should be used + to create an instance of the -derived type by passing + resource location as a parameter. + + + Name of the protocol to get the handler for. + Resource handler constructor for the specified protocol name. + If is null. + + + + Returns true if a handler is registered for the specified protocol, + false otherwise. + + Name of the protocol. + + true if a handler is registered for the specified protocol, false otherwise. + + If is null. + + + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The type name of the concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Allows to create any arbitrary Url format + + + + + A adapter implementation encapsulating a simple string. + + Erich Eichinger + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Get the to + for accessing this resource. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Gets the encoding used to create a byte stream of the string. + + + + + Gets the content encapsulated by this . + + + + + A backed resource + on top of + + +

+ Obviously supports resolution as a , and also + as a in the case of the "file:" + protocol. +

+
+ +

+ Some examples of the strings that can be used to initialize a new + instance of the class + include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) + + + +
+ + + Creates a new instance of the + class. + + +

+ Some examples of the values that the + can typically be expected to hold include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ + A string representation of the resource. + +
+ + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the instance + used for the resource resolution. + + + A instance. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + Returns a handle for this resource. + + + The handle for this resource. + + + If the resource is not available on a filesystem. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource. + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Converts string representation of a credential for Web client authentication + into an instance of . + + +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. +

+ + + + + + +
+ Bruno Baia +
+ + + Can we convert from the sourcetype + to a instance ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A instance if successful. + + + + + A custom for any + primitive numeric type such as , + , , etc. + + +

+ Can use a given for + (locale-specific) parsing and rendering. +

+

+ This is not meant to be used as a system + but rather as a + locale-specific number converter within custom controller code, to + parse user-entered number strings into number properties of objects, + and render them in a UI form. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The primitive numeric to convert to. + + + The to use for + (locale-specific) parsing and rendering + + + Is an empty string allowed to be converted? If + , an empty string value will be converted to + numeric 0. + + Id the supplied is not a primitive + . + + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + +
+ + + Converts the specified object (a string) to the required primitive + type. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + A primitive representation of the string value. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Custom implementation for + objects. + + +

+ Handles conversion from an XML formatted string to a + object + (see below for an example of the expected XML format). +

+

+ This converter must be registered before it will be available. Standard + converters in this namespace are automatically registered by the + class. +

+
+ +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. Note that the name of the top level + (document) element is quite arbitrary... it is only the content that + matters (and which must be in the format + <add key="..." value="..."/>. For your continued sanity + though, you may wish to standardize on the top level name of + 'dictionary' (although you are of course free to not do so). +

+ + + + + + +

+ The following example uses a different top level (document) element + name, but is equivalent to the first example. +

+ + + + + + +
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from an + XML formatted instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + + + + Converts string representation of a regular expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts string representation of the registry key + into instance. + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Generates partial registry key name. + + + Key elements. + + + Index of the last element to use. + + + Friendly key name containing key element from + 0 to , inclusive. + + + + + Returns for the specified + root hive name. + + + Root hive name. + + + Registry key for the specified name. + + + + + Converts a two part string, (resource name, assembly name) + to a ResourceManager instance. + + + + + This constant represents the name of the folder/assembly containing global resources. + + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + If the specified does not denote a valid resource + + + + Converter for from a comma separated + list of RBG values. + + +

+ Please note that this class does not implement converting + to a comma separated list of RBG values from a + . +

+
+ Federico Spinazzi +
+ + + Returns whether this converter can convert an object of one + to a + . + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Converts the specified object (a string) a + instance. + + + A + that provides a format context. + + + The to use + as the current culture: currently ignored. + + + The value that is to be converted, in "R,G,B", "A,R,G,B", or + symbolic color name (). + + + A representation of the string value. + + + If the input string is not in a supported format, or is not one of the + predefined system colors (). + + + + + A custom for + runtime type references. + + +

+ Currently only supports conversion to and from a + . +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to the + of this converter. + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Returns whether this converter can convert the object to the specified + . + + + A + that provides a format context. + + + A that represents the + you want to convert to. + + True if the conversion is possible. + + + + Converts the given value to the type of this converter. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An that represents the converted value. + + + + + Converts the given value object to the specified type, + using the specified context and culture information. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + The to convert the + parameter to. + + + An that represents the converted value. + + + + + Converter for to directly set a + property. + + Jurgen Hoeller + Mark Pollack (.NET) + + + + Create a new StreamConverter using the default + . + + + + + Create a new StreamConverter using the given + . + + + The to use. + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts a separated to a + array. + + +

+ Defaults to using the , (comma) as the list separator. Note that the value + of the current is + not used. +

+

+ If you want to provide your own list separator, you can set the value of the + + property to the value that you want. Please note that this value will be used + for all future conversions in preference to the default list separator. +

+

+ Please note that the individual elements of a string will be passed + through as is (i.e. no conversion or trimming of surrounding + whitespace will be performed). +

+

+ This should be + automatically registered with any + implementations. +

+
+ + + public class StringArrayConverterExample + { + public static void Main() + { + StringArrayConverter converter = new StringArrayConverter(); + + string csvWords = "This,Is,It"; + string[] frankBoothWords = converter.ConvertFrom(csvWords); + + // the 'frankBoothWords' array will have 3 elements, namely + // "This", "Is", "It". + + // please note that extraneous whitespace is NOT trimmed off + // in the current implementation... + string csv = " Cogito ,ergo ,sum "; + string[] descartesWords = converter.ConvertFrom(csv); + + // the 'descartesWords' array will have 3 elements, namely + // " Cogito ", "ergo ", "sum ". + // notice how the whitespace has NOT been trimmed. + } + } + + + +
+ + + Can we convert from a the sourcetype to a array? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to a + array. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + The value that will be used as the list separator when performing + conversions. + + + A 'single' string character that will be used as the list separator + when performing conversions. + + + If the supplied value is not and is an empty + string, or has more than one character. + + + + + Base parser for custom specifiers. + + + + + Convert int value to a Timespan based on the specifier + + + + + + + Check if the string contains the specifier and + + + + + + + Specifier + + + + + Recognize 10d as ten days + + + + + Parse value as days + + Timespan in days + + + + + Day specifier: d + + + + + Recognize 10h as ten hours + + + + + Parse value as hours + + Timespan in hours + + + + + Hour specifier: h + + + + + Recognize 10m as ten minutes + + + + + Parse value as minutes + + Timespan in minutes + + + + + Minute specifier: m + + + + + Recognize 10s as ten seconds + + + + + Parse value as seconds + + Timespan in seconds + + + + + Second specifier: s + + + + + Recognize 10ms as ten milliseconds + + + + + Parse value as milliseconds + + Timespan in milliseconds + + + + + Millisecond specifier: ms + + + + + Converter for instances. + + Bruno Baia + Roberto Paterlini + + + + Creates a new instance of the + class. + + + + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Utility methods that are used to convert objects from one type into another. + + Aleksandar Seovic + + + + Convert the value to the required (if necessary from a string). + + The proposed change value. + + The we must convert to. + + Property name, used for error reporting purposes... + + If there is an internal error. + + The new value, possibly the result of type conversion. + + + + Utility method to create a property change event. + + + The full name of the property that has changed. + + The property old value + The property new value + + A new . + + + + + Determines if a Type implements a specific generic interface. + + Candidate to evaluate. + The to test for in the Candidate . + if a match, else + + + + Registry class that allows users to register and retrieve type converters. + + Aleksandar Seovic + + + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + Registers standard and configured type converters. + + + + + Returns for the specified type. + + Type to get the converter for. + a type converter for the specified type. + If is null. + + + + Registers for the specified type. + + Type to register the converter for. + Type converter to register. + If either of arguments is null. + + + + Registers for the specified type. + + + This is a convinience method that accepts the names of both + type to register converter for and the converter itself, + resolves them using , creates an + instance of type converter and calls overloaded + method. + + Type name of the type to register the converter for (can be a type alias). + Type name of the type converter to register (can be a type alias). + If either of arguments is null or empty string. + + If either of arguments fails to resolve to a valid . + + + If type converter does not derive from or if it cannot be instantiated. + + + + + Converts between instances of and their string representations. + + Erich Eichinger + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A that provides a format context. + + + A that represents the you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful, otherwise. + + The conversion cannot be performed. + + + + Returns whether this converter can convert the object to the specified type, using the specified context. + + An that provides a format context. + A that represents the type you want to convert to. + + true if this converter can perform the conversion; otherwise, false. + + + At the moment only conversion to string is supported. + + + + + Converts the given value object to the specified type, using the specified context and culture information. + + + + An that represents the converted value. + + + A . If null is passed, the current culture is assumed. + An that provides a format context. + The to convert the value parameter to. + The to convert. + The conversion cannot be performed. + The destinationType parameter is null. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Resolves (instantiates) a by it's (possibly + assembly qualified) name, and caches the + instance against the type name. + + Rick Evans + Bruno Baia + Erich Eichinger + + + + Resolves a by name. + + +

+ The rationale behind the creation of this interface is to centralise + the resolution of type names to instances + beyond that offered by the plain vanilla + method call. +

+
+ Rick Evans +
+ + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + The cache, mapping type names ( instances) against + instances. + + + + + Creates a new instance of the class. + + + The that this instance will delegate + actual resolution to if a + cannot be found in this instance's cache. + + + If the supplied is . + + + + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holder for the generic arguments when using type parameters. + + +

+ Type parameters can be applied to classes, interfaces, + structures, methods, delegates, etc... +

+
+
+ + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The character that separates a list of generic arguments. + + + + + Creates a new instance of the GenericArgumentsHolder class. + + + The string value to parse looking for a generic definition + and retrieving its generic arguments. + + + + + Returns the array declaration portion of the definition, e.g. "[,]" + + + + + + Returns an array of unresolved generic arguments types. + + +

+ A empty string represents a type parameter that + did not have been substituted by a specific type. +

+
+ + An array of strings that represents the unresolved generic + arguments types or an empty array if not generic. + +
+ + + The (unresolved) generic type name portion + of the original value when parsing a generic type. + + + + + The (unresolved) generic method name portion + of the original value when parsing a generic method. + + + + + Is the string value contains generic arguments ? + + +

+ A generic argument can be a type parameter or a type argument. +

+
+
+ + + Is generic arguments only contains type parameters ? + + + + + Is this an array type definition? + + + + + Resolves a generic by name. + + Bruno Baia + + + + Resolves a by name. + + Rick Evans + Aleksandar Seovic + Bruno Baia + + + + Resolves the supplied to a + instance. + + + The unresolved (possibly partially assembly qualified) name + of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Uses + to load an and then the attendant + referred to by the + parameter. + + +

+ is + deprecated in .NET 2.0, but is still used here (even when this class is + compiled for .NET 2.0); + will + still resolve (non-.NET Framework) local assemblies when given only the + display name of an assembly (the behaviour for .NET Framework assemblies + and strongly named assemblies is documented in the docs for the + method). +

+
+ + The assembly and type to be loaded. + + + A , or . + + + + +
+ + + Uses + to load the attendant referred to by + the parameter. + + + The type to be loaded. + + + A , or . + + + + + Creates a new instance + from the given + + + + + Creates a new instance + from the given with the given inner + + + + + Resolves the supplied generic to a + instance. + + + The unresolved (possibly generic) name of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holds data about a and it's + attendant . + + + + + The string that separates a name + from the name of it's attendant + in an assembly qualified type name. + + + + + Creates a new instance of the TypeAssemblyHolder class. + + + The unresolved name of a . + + + + + The (unresolved) type name portion of the original type name. + + + + + The (unresolved, possibly partial) name of the attandant assembly. + + + + + Is the type name being resolved assembly qualified? + + + + + Provides access to a central registry of aliased s. + + +

+ Simplifies configuration by allowing aliases to be used instead of + fully qualified type names. +

+

+ Comes 'pre-loaded' with a number of convenience alias' for the more + common types; an example would be the 'int' (or 'Integer' + for Visual Basic.NET developers) alias for the + type. +

+
+ Aleksandar Seovic + +
+ + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + The alias around the 'int' type. + + + + + The alias around the 'Integer' type (Visual Basic.NET style). + + + + + The alias around the 'int[]' array type. + + + + + The alias around the 'Integer()' array type (Visual Basic.NET style). + + + + + The alias around the 'decimal' type. + + + + + The alias around the 'Decimal' type (Visual Basic.NET style). + + + + + The alias around the 'decimal[]' array type. + + + + + The alias around the 'Decimal()' array type (Visual Basic.NET style). + + + + + The alias around the 'char' type. + + + + + The alias around the 'Char' type (Visual Basic.NET style). + + + + + The alias around the 'char[]' array type. + + + + + The alias around the 'Char()' array type (Visual Basic.NET style). + + + + + The alias around the 'long' type. + + + + + The alias around the 'Long' type (Visual Basic.NET style). + + + + + The alias around the 'long[]' array type. + + + + + The alias around the 'Long()' array type (Visual Basic.NET style). + + + + + The alias around the 'short' type. + + + + + The alias around the 'Short' type (Visual Basic.NET style). + + + + + The alias around the 'short[]' array type. + + + + + The alias around the 'Short()' array type (Visual Basic.NET style). + + + + + The alias around the 'unsigned int' type. + + + + + The alias around the 'unsigned long' type. + + + + + The alias around the 'ulong[]' array type. + + + + + The alias around the 'uint[]' array type. + + + + + The alias around the 'unsigned short' type. + + + + + The alias around the 'ushort[]' array type. + + + + + The alias around the 'double' type. + + + + + The alias around the 'Double' type (Visual Basic.NET style). + + + + + The alias around the 'double[]' array type. + + + + + The alias around the 'Double()' array type (Visual Basic.NET style). + + + + + The alias around the 'float' type. + + + + + The alias around the 'Single' type (Visual Basic.NET style). + + + + + The alias around the 'float[]' array type. + + + + + The alias around the 'Single()' array type (Visual Basic.NET style). + + + + + The alias around the 'DateTime' type. + + + + + The alias around the 'DateTime' type (C# style). + + + + + The alias around the 'DateTime' type (Visual Basic.NET style). + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime()' array type (Visual Basic.NET style). + + + + + The alias around the 'bool' type. + + + + + The alias around the 'Boolean' type (Visual Basic.NET style). + + + + + The alias around the 'bool[]' array type. + + + + + The alias around the 'Boolean()' array type (Visual Basic.NET style). + + + + + The alias around the 'string' type. + + + + + The alias around the 'string' type (Visual Basic.NET style). + + + + + The alias around the 'string[]' array type. + + + + + The alias around the 'string[]' array type (Visual Basic.NET style). + + + + + The alias around the 'object' type. + + + + + The alias around the 'object' type (Visual Basic.NET style). + + + + + The alias around the 'object[]' array type. + + + + + The alias around the 'object[]' array type (Visual Basic.NET style). + + + + + The alias around the 'int?' type. + + + + + The alias around the 'int?[]' array type. + + + + + The alias around the 'decimal?' type. + + + + + The alias around the 'decimal?[]' array type. + + + + + The alias around the 'char?' type. + + + + + The alias around the 'char?[]' array type. + + + + + The alias around the 'long?' type. + + + + + The alias around the 'long?[]' array type. + + + + + The alias around the 'short?' type. + + + + + The alias around the 'short?[]' array type. + + + + + The alias around the 'unsigned int?' type. + + + + + The alias around the 'unsigned long?' type. + + + + + The alias around the 'ulong?[]' array type. + + + + + The alias around the 'uint?[]' array type. + + + + + The alias around the 'unsigned short?' type. + + + + + The alias around the 'ushort?[]' array type. + + + + + The alias around the 'double?' type. + + + + + The alias around the 'double?[]' array type. + + + + + The alias around the 'float?' type. + + + + + The alias around the 'float?[]' array type. + + + + + The alias around the 'bool?' type. + + + + + The alias around the 'bool?[]' array type. + + + + + Registers standard and user-configured type aliases. + + + + + Registers an alias for the specified . + + +

+ This overload does eager resolution of the + referred to by the parameter. It will throw a + if the referred + to by the parameter cannot be resolved. +

+
+ + A string that will be used as an alias for the specified + . + + + The (possibly partially assembly qualified) name of the + to register the alias for. + + + If either of the supplied parameters is or + contains only whitespace character(s). + + + If the referred to by the supplied + cannot be loaded. + +
+ + + Registers short type name as an alias for + the supplied . + + + The to register. + + + If the supplied is . + + + + + Registers an alias for the supplied . + + + The alias for the supplied . + + + The to register the supplied under. + + + If the supplied is ; or if + the supplied is or + contains only whitespace character(s). + + + + + Resolves the supplied to a . + + + The alias to resolve. + + + The the supplied was + associated with, or if no + was previously registered for the supplied . + + + If the supplied is or + contains only whitespace character(s). + + + + + Returns a flag specifying whether TypeRegistry contains + specified alias or not. + + + Alias to check. + + + true if the specified type alias is registered, + false otherwise. + + + + + Helper methods with regard to type resolution. + + +

+ Not intended to be used directly by applications. +

+
+ Bruno Baia +
+ + + Creates a new instance of the class. + + +

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

+
+
+ + + Resolves the supplied type name into a + instance. + + +

+ If you require special resolution, do + not use this method, but rather instantiate + your own . +

+
+ + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the type cannot be resolved. + +
+ + + Resolves a string array of interface names to + a array. + + + An array of valid interface names. Each name must include the full + interface and assembly name. + + An array of interface s. + + If any of the interfaces can't be loaded. + + + If any of the s specified is not an interface. + + + If (or any of its elements ) is + . + + + + + Match a method against the given pattern. + + the pattern to match against. + the method to match. + + if the method matches the given pattern; otherwise . + + + If the supplied is invalid. + + + + + Exception thrown when the ObjectFactory cannot load the specified type of a given object. + + Mark Pollack + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException 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 ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Initializes 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. + + + + + Initializes a new instance of the class. + + The resource description that the object definition came from. + Name of the object requested + Name of the object type. + The root cause. + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Gets he name of the object we are trying to load. + + The name of the object. + + + + Gets the name of the object type we are trying to load. + + The name of the object type. + + + + Gets the resource description that the object definition came from + + The resource description. + + + + A implementation that represents + a composed collection of instances. + + + + + The criteria for an arbitrary filter. + + Rick Evans + + + + Does the supplied satisfy the criteria + encapsulated by this instance? + + + The datum to be checked by this criteria instance. + + + if the supplied + satisfies the criteria encapsulated by this instance; + if not, or the supplied + is . + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A user-defined (child) criteria that will be composed into this instance. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The data to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Adds the supplied into the criteria + composed within this instance. + + + The to be added. + + + + + The list of composing this + instance. + + + + + Factory class to conceal any default implementation. + + Rod Johnson + Simon White (.NET) + + + + Creates a new instance of the + implementation provided by this factory. + + + A new instance of the + implementation provided by this factory. + + + + + Interface to be implemented by objects that can return information about + the current call stack. + + +

+ Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + The to look for. + + + if the caller is under the supplied . + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + + The to look for. + + The name of the method to look for. + + if the caller is under the supplied + and . + + + + + Does the current stack trace contain the supplied ? + + The token to match against. + + if the current stack trace contains the supplied + . + + + + + Creates a new instance of the + class. + + + + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + +

+ Matches the whole method name. +

+
+ +
+ + + Does the current stack trace contain the supplied ? + + +

+ This leaves it up to the caller to decide what matches, but is obviously less of + an abstraction because the caller must know the exact format of the underlying + stack trace. +

+
+ +
+ + + Provides methods to support various naming and other conventions used throughout the framework. + Mainly for internal use within the framework. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + Convert Strings in attribute name format (lowercase, hyphens separating words) + into property name format (camel-cased). For example, transaction-manager is + converted into transactionManager. + + + + + Convenience class that exposes a signature that matches the + delegate. + + +

+ Useful when filtering members via the + mechanism. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + + + Returns true if the supplied instance + satisfies the supplied (which must be an + implementation). + + + The instance that will be checked to see if + it matches the supplied . + + + The criteria against which to filter the supplied + instance. + + + True if the supplied instance + satisfies the supplied (which must be an + implementation); false if not or the + supplied is not an + implementation or is null. + + + + + Interface that can be implemented by exceptions etc that are error coded. + + +

+ The error code is a , rather than a number, so it can + be given user-readable values, such as "object.failureDescription". +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Return the error code associated with this failure. + + +

+ The GUI can render this anyway it pleases, allowing for I18n etc. +

+
+ + The error code associated with this failure, + or the empty string instance if not error-coded. + +
+ + + Thrown in response to referring to an invalid property (most often via reflection). + + Rick Evans + + + + 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. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + Creates a new instance of the + class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + + + Creates a new instance of the InvalidPropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The that is (or rather was) the source of the + offending property. + + + + + The name of the offending property. + + + + + Extension of the interface, expressing a 'priority' + ordering: Order values expressed by IPriorityOrdered objects always + apply before order values of 'plain' Ordered values. + + + This is primarily a special-purpose interface, used for objects + where it is particularly important to determine 'prioritized' + objects first, without even obtaining the remaining objects. + A typical example: Prioritized post-processors in a Spring + + + IPriorityOrdered post-processor objects are initialized in + a special phase, ahead of other post-processor objects. + + Juergen Hoeller + Mark Pollack (.NET) + + + + + + + Criteria that is satisfied if the of each of the + arguments matches each of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + +

+ This implementation respects the inheritance chain of any parameter + s... i.e. methods that have a base type (or + interface) that is assignable to the in the + same corresponding index of the parameter types will satisfy this + criteria instance. +

+
+ The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + +
+ + + Criteria that is satisfied if the number of generic arguments to a given + matches an arbitrary number. + + +

+ This class supports checking the generic arguments count of both + generic methods and constructors. +

+
+ Bruno Baia +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Thrown when a method (typically a property getter or setter invoked via reflection) + throws an exception, analogous to a . + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for exceptions related to a property access, such as a + mismatch or a target invocation exception. + + Rod Johnson + Mark Pollack (.NET) + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessException class. + + + + + Creates a new instance of the PropertyAccessException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Returns the PropertyChangeEventArgs that resulted in the problem. + + + + + The string error code used to classify the error. + + + + + Creates a new instance of the MethodInvocationException class. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Constructor to use when an exception results from a + . + + + The raised by the invoked property. + + + The that + resulted in an exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The error code string for this exception. + + + + + Criteria that is satisfied if the method Name of an + instance matches a + supplied string pattern. + + + + Supports the following simple pattern styles: + "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + + Bruno Baia + + + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to * (any method name). +

+
+
+ + + Creates a new instance of the + class. + + The pattern that names + must match against in order to satisfy this criteria. + + If the supplied is null or resolve to an empty string. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is null or resolve to an empty string. + + + + + Helper class that encapsulates the specification of a method parameter, i.e. + a MethodInfo or ConstructorInfo plus a parameter index. + Useful as a specification object to pass along. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + Initializes a new instance of the class for the given + MethodInfo. + + The MethodInfo to specify a parameter for. + Index of the parameter. + + + + Initializes a new instance of the class. + + The ConstructorInfo to specify a parameter for. + Index of the parameter. + + + + Create a new MethodParameter for the given method or donstructor. + This is a convenience constructor for scenarios where a + Method or Constructor reference is treated in a generic fashion. + + The method or constructor to specify a parameter for. + Index of the parameter. + the corresponding MethodParameter instance + + + + Parameters the name of the method/constructor parameter. + + the parameter name. + + + + Gets the type of the method/constructor parameter. + + The type of the parameter. (never null) + + + + Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The MethodInfo, or null if none. + + + + Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The ConstructorInfo, or null if none + + + + Return the annotations associated with the specific method/constructor parameter. + + + + + Return the annotations associated with the target method/constructor itself. + + + + + Criteria that is satisfied if the number of parameters to a given + matches an arbitrary number. + + +

+ This class supports checking the parameter count of both methods and + constructors. +

+

+ Default parameters, etc need to taken into account. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Criteria that is satisfied if the of each of the + parameters of a given matches each + of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the return of a given + matches a given . + + Rick Evans + + + + The return to match against if no + is provided explictly. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Thrown in response to a failed attempt to read a property. + + +

+ Typically thrown when attempting to read the value of a write-only + property via reflection. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + 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. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + 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. + + + + + Thrown in response to a failed attempt to write a property. + + Mark Pollack (.NET) + + + + Creates a new instance of the NotWritablePropertyException class. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class + summarizing what property was not writable. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + + + Creates new NotWritablePropertyException with a root cause. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + The root cause indicating why the property was not writable. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to encountering a value + when traversing a nested path expression. + + + + + 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 of the object where the property was not found. + + The name of the property not found. + + + + Creates a new instance of the + class. + + + The of the object where the property was not found. + + The name of the property not found. + A message about the exception. + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the offending property. + + + + + The of the class where the property was last looked for. + + + + + Comparator implementation for objects, sorting by + order value ascending (resp. by priority descending). + + +

+ Non- objects are treated as greatest order values, + thus ending up at the end of a list, in arbitrary order (just like same order values of + objects). +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Comparator implementation for objects, sorting by + order value ascending (resp. by priority descending). + + +

+ Non- objects are treated as greatest order values, + thus ending up at the end of a list, in arbitrary order (just like same order values of + objects). +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Compares two objects and returns a value indicating whether one is less than, + equal to or greater than the other. + + +

+ Uses direct evaluation instead of + to avoid unnecessary boxing. +

+
+ The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + +
+ + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + Provides additional data for the PropertyChanged event. + + +

+ Provides some additional properties over and above the name of the + property that has changed (which is inherited from the + base class). + This allows calling code to determine whether or not a property has + actually changed (i.e. a PropertyChanged event may have been + raised, but the value itself may be equivalent). +

+
+ +
+ + + Create a new instance of the + class. + + + The name of the property that was changed. + The old value of the property. + the new value of the property. + + + + Get the old value for the property. + + + + + + Get the new value of the property. + + + + + + A base class for all + implementations that are regular expression based. + + Rick Evans + + + + The default pattern... matches absolutely anything. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The regular expression pattern to be applied. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Convenience method that calls the + + on the supplied . + + The input to match against. + True if the matches. + + + + The regular expression pattern to be applied. + + + + + The regular expression options to be applied. + + + + + The regular expression to be applied. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default event name pattern... matches pretty much any event name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default method name pattern... matches pretty much any method name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Exception thrown on a mismatch when trying to set a property + or resolve an argument to a method invocation. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the TypeMismatchException class. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the TypeMismatchException class describing the + property and required type that could not used to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + + + + Creates a new instance of the TypeMismatchException class describing the + property, required type, and underlying exception that could not be used + to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + The underlying exception. + + + + Creates a new instance of the TypeMismatchException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The string error code used to classify the exception. + + + + + Abstract base class for implementations. + + Aleksandar Seovic + + + + An interface that defines the methods that have to be implemented by all data bindings. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + The name of the always filled error provider + + + + + Gets or sets a flag specifying whether this binding is valid. + + + true if this binding evaluated without errors; + false otherwise. + + + + + Marks this binding's state as invalid for this validationErrors collection. + Returns false if is null. + + + false, if validationErrors is null + + + + Initializes a new instance of the class. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets the unique ID of this binding instance. + + + + + Gets or sets the . + + The binding direction. + + + + Gets the error message. + + The error message. + + + + Gets the error providers. + + + + + Abstract base class for simple, one-to-one implementations. + + Aleksandar Seovic + + + + Initialize a new instance of without any + + + + + Initialize a new instance of with the + specified . + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation if source to target binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation of target to source binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets or sets the to use. + + The formatter to use. + + + + Base implementation of the . + + Aleksandar Seovic + + + + An interface that has to be implemented by all data binding containers. + + Aleksandar Seovic + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Gets a value indicating whether this data binding container + has bindings. + + + true if this data binding container has bindings; + false otherwise. + + + + + Creates a new instance of . + + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Implemented as a NOOP for containers. + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Gets a list of bindings for this container. + + + A list of bindings for this container. + + + + + Gets a value indicating whether this instance has bindings. + + + true if this instance has bindings; otherwise, false. + + + + + BaseBindingManager keeps track of all registered bindings and + represents an entry point for the binding and unbinding process. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Enumeration that defines possible values for data binding direction. + + Aleksandar Seovic + + + + Specifies that value from the control property should be bound to a data model. + + + + + Specifies that value from the data model should be bound to control property. + + + + + Specifies that binding is bidirectional. + + + + + Represents an ErrorMessage specific to a binding instance. + + Erich Eichinger + + + + Represents a single validation error message. + + Aleksandar Seovic + Goran Milosavljevic + + + + Default constructor. + + + + + Initializes a new instance of the class. + + Error message resource identifier. + Parameters that should be used for message resolution. + + + + Initializes a new instance of the class copying values from another instance. + + Another Error message instance to copy values from. + + + + This property is reserved, apply the + + to the class instead. + + + An + that describes the XML representation of the object that + is produced by the + + method and consumed by the + + method. + + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Resolves the message against specified . + + Message source to resolve this error message against. + Resolved error message. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets or sets the resource identifier for this message. + + The resource identifier for this message. + + + + Gets or sets the message parameters. + + The message parameters. + + + + Initializes a new instance of the class. + + the id of the binding this error message is associated with + the message id + optional parameters to this message + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Get the ID of the binding this message instance relates to. + + + + + Interface that should be implemented by data bound objects, such as + web pages, user controls, windows forms, etc. + + Aleksandar Seovic + + + + Gets the binding manager. + + The binding manager. + + + + implementation that allows + data binding between collections that implement + interface. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Simple, expression-based implementation of that + binds source to target one-to-one. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + The formatter to use. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the source expression. + + The source expression. + + + + Gets the target expression. + + The target expression. + + + + Minimal AST node interface used by ANTLR AST generation and tree-walker. + + + + + Add a (rightmost) child to this node + + + + + + Get the first child of this node; null if no children + + + + + Get the next sibling in line after this one + + + + + Get the token text for this node + + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Set the first child of a node. + + + + + + Set the next sibling after this one. + + + + + + Set the token text for this node + + + + + + Set the token type for this node + + + + + + Get the token type for this node + + + + + Event type. + + + + Used for creating Token instances. + + + Used for caching lookahead characters. + + + + This method is executed by ANTLR internally when it detected an illegal + state that cannot be recovered from. + The previous implementation of this method called + and writes directly to , which is usually not + appropriate when a translator is embedded into a larger application. + + Error message. + + + + A creator of Token object instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of Token objects. + + + Since Lexers in ANTLR use a single Token type, each TokenCreator can + create one class of Token objects (that's why it's not called TokenFactory). + + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + The fully qualified name of the Token type to create. + + + + + Type object used as a template for creating tokens by reflection. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + This type was created in VisualAge. + + + + Report exception errors caught in nextToken() + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + + Represents a stream of characters fed to the lexer from that can be rewound + via mark()/rewind() methods. + + + + A dynamic array is used to buffer up all the input characters. Normally, + "k" characters are stored in the buffer. More characters may be stored + during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. + Consumption of characters is deferred. In other words, reading the next + character is not done by conume(), but deferred until needed by LA or LT. + + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "CharConsumed" event. + + Event source object + Event data object + + + + Handle the "CharLA" event. + + Event source object + Event data object + + + + Handle the "Mark" event. + + Event source object + Event data object + + + + Handle the "Rewind" event. + + Event source object + Event data object + + + charBufferConsume method comment. + + + + charBufferLA method comment. + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Specify an object with support code (shared by Parser and TreeParser. + Normally, the programmer does not play with this, using + instead. + + + + + + Specify the type of node to create during tree building. + + Fully qualified AST Node type name. + + + + Specify the type of node to create during tree building. + use now to be consistent with + Token Object Type accessor. + + Fully qualified AST Node type name. + + + + + + + + Get another token object from the token stream + + + + Return the token type of the ith token of lookahead where i=1 + is the current token being examined by the parser (i.e., it + has not been matched yet). + + + + Make sure current lookahead symbol matches token type t. + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Make sure current lookahead symbol matches the given set + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Parser error-reporting function can be overridden in subclass + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + User can override to do their own debugging + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Specifies the behaviour required (i.e. parser modifications) + specifically to support parse tree debugging and derivation. + + + + Override the standard matching and rule entry/exit routines + to build parse trees. This class is useful for 2.7.3 where + you can specify a superclass like + + + class TinyCParser extends Parser(ParseTreeDebugParser); + + + + + + Each new rule invocation must have it's own subtree. Tokens are + added to the current root so we must have a stack of subtree roots. + + + + + Track most recently created parse subtree so that when parsing + is finished, we can get to the root. + + + + + For every rule replacement with a production, we bump up count. + + + + + Adds LT(1) to the current parse subtree. + + + + Note that the match() routines add the node before checking for + correct match. This means that, upon mismatched token, there + will a token node in the tree corresponding to where that token + was expected. For no viable alternative errors, no node will + be in the tree as nothing was matched() (the lookahead failed + to predict an alternative). + + + + + + Create a rule node, add to current tree, and make it current root + + + + + + Pop current root; back to adding to old root + + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + AST Support code shared by TreeParser and Parser. + + + + We use delegation to share code (and have only one + bit of code to maintain) rather than subclassing + or superclassing (forces AST support code to be + loaded even when you don't want to do AST stuff). + + + Typically, is used to specify the + homogeneous type of node to create, but you can override + to make heterogeneous nodes etc... + + + + + + Constructs an ASTFactory with the default AST node type of + . + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + Name of default AST node type for this factory. + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + MetaType of default AST node type for this factory. + + + + + Stores the Type of the default AST node class to be used during tree construction. + + + + + Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass + and ASTNodeCreator. + + + + + Stores the mapping between AST node typenames and their token ID. + + + + + Specify an "override" for the type created for + the specified Token type. + + + This method is useful for situations that ANTLR cannot oridinarily deal + with (i.e., when you create a token based upon a nonliteral token symbol + like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token + type (and hence the AST) statically. + + Token type to override. + + Fully qualified AST typename (or null to specify + the factory's default AST type). + + + + + Register an AST Node Type for a given Token type ID. + + The Token type ID. + The AST Node Type to register. + + + + Register an ASTNodeCreator for a given Token type ID. + + The Token type ID. + The creater to register. + + + + Register an ASTNodeCreator to be used for creating node by default. + + The ASTNodeCreator. + + + + Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings + to the specified size. + This is primarily a convenience method that can be used to prevent + unnecessary and costly re-org of the mappings list. + + Maximum Token Type ID. + + + + Add a child to the current AST + + The AST to add a child to + The child AST to be added + + + + Creates a new uninitialized AST node. Since a specific AST Node Type + wasn't indicated, the new AST node is created using the current default + AST Node type - + + An uninitialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. Once created, + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + Fully qualified name of the Type to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. + + Token instance to be used to initialize the new AST Node. + + Fully qualified name of the Type to be used for creating the new AST Node. + + A newly created and initialized AST node object. + + Once created, the new AST node is initialized with the specified Token + instance. The used for creating this new AST + node is determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + + + + Creates and initializes a new AST node using the specified AST Node instance. + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by aNode. + The AST Node type must have a default/parameterless constructor. + + AST Node instance to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token instance. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token instance to be used to create new AST Node. + An initialized AST node object. + + + + Returns a copy of the specified AST Node instance. The copy is obtained by + using the method Clone(). + + AST Node to copy. + An AST Node (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node and all of it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Make a tree from a list of nodes. The first element in the + array is the root. If the root is null, then the tree is + a simple list not a tree. Handles null children nodes correctly. + For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) + yields tree (nil a b). + + List of Nodes. + AST Node tree. + + + + Make a tree from a list of nodes, where the nodes are contained + in an ASTArray object. + + List of Nodes. + AST Node tree. + + + + Make an AST the root of current AST. + + + + + + + Sets the global default AST Node Type for this ASTFactory instance. + This method also attempts to load the instance + for the specified typename. + + Fully qualified AST Node Type name. + + + + To change where error messages go, can subclass/override this method + and then setASTFactory in Parser and TreeParser. This method removes + a prior dependency on class antlr.Tool. + + + + + + A creator of AST node instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of AST node objects. + + + Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever + they need to create an AST node objeect. What this class does is to support + performant extensibility of the basic ASTFactory. The ASTFactory can now be + extnded as run-time to support more new AST node types without using needing + to use reflection. + + + + + + Constructs an instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Summary description for ASTVisitor. + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Small buffer used to avoid reading individual chars + + + + + Small buffer used to avoid reading individual chars + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + A token is minimally a token type. Subclasses can add the text matched + for the token and line info. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Summary description for DumpASTVisitor. + + Simple class to dump the contents of an AST to the output + + + + Append a char to the msg buffer. If special, then show escaped version + + Message buffer + Char to append + + + + Walk parse tree and return requested number of derivation steps. + If steps less-than 0, return node text. If steps equals 1, return derivation + string at step. + + derivation steps + + + + + Get derivation and return how many you did (less than requested for + subtree roots. + + string buffer + derivation steps + + + + + Do a step-first walk, building up a buffer of tokens until + you've reached a particular step and print out any rule subroots + insteads of descending. + + derivation buffer + derivation steps + + + + + This token stream tracks the *entire* token stream coming from + a lexer, but does not pass on the whitespace (or whatever else + you want to discard) to the parser. + + + + This class can then be asked for the ith token in the input stream. + Useful for dumping out the input stream exactly after doing some + augmentation or other manipulations. Tokens are index from 0..n-1 + + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + string. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal string + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + For example: + + TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); + JavaRecognizer parser = new JavaRecognizer(rewriteEngine); + ... + rewriteEngine.insertAfter("pass1", t, "foobar");} + rewriteEngine.insertAfter("pass2", u, "start");} + System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); + System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); + + + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer. + + + If you don't use named rewrite streams, a "default" stream is used. + + + Terence Parr, parrt@cs.usfca.edu + University of San Francisco + February 2004 + + + + + + Track the incoming list of tokens + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps string (name) -> rewrite (List) + + + + + Map string (program name) -> Integer index + + + + + track index of tokens + + + + + Who do we suck tokens from? + + + + + Which (whitespace) token(s) to throw out + + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. + + + UNTESTED! + + + + + + + Reset the program so that no instructions exist + + + + + + If op.index > lastRewriteTokenIndexes, just add to the end. + Otherwise, do linear + + + + + + Execute the rewrite operation by possibly adding to the buffer. + + rewrite buffer + The index of the next token to operate on. + + + + This token tracks it's own index 0..n-1 relative to the beginning + of the stream. It is designed to work with + in TokenStreamRewriteEngine.cs + + + + + Index into token array indicating position in input stream + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Implementation of the average aggregator. + + Aleksandar Seovic + + + + Defines an interface that should be implemented + by all collection processors and aggregators. + + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Returns the average of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The average of the numeric values in the source collection. + + + + + Converts all elements in the input list to a given target type. + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the count aggregator. + + Aleksandar Seovic + + + + Returns the number of items in the source collection. + + + The source collection to process. + + + Ignored. + + + The number of items in the source collection, + or zero if the collection is empty or null. + + + + + Converts a string literal to a instance. + + Erich Eichinger + + + + + Erich Eichinger + + + + Implementation of the distinct processor. + + Aleksandar Seovic + + + + Returns distinct items from the collection. + + + The source collection to process. + + + 0: boolean flag specifying whether to include null + in the results or not. Default is false, which means that + null values will not be included in the results. + + + A collection containing distinct source collection elements. + + + If there is more than one argument, or if the single optional argument + is not Boolean. + + + + + Implementation of the maximum aggregator. + + Aleksandar Seovic + + + + Returns the largest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The largest item in the source collection. + + + + + Implementation of the minimum aggregator. + + Aleksandar Seovic + + + + Returns the smallest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The smallest item in the source collection. + + + + + Implementation of the non-null processor. + + Aleksandar Seovic + + + + Returns non-null items from the collection. + + + The source collection to process. + + + Ignored. + + + A collection containing non-null source collection elements. + + + + + Implementation of the 'order by' processor. + + Aleksandar Seovic + Erich Eichinger + + + + Sorts the source collection using custom sort criteria. + + + Please note that your compare function needs to take care about + proper conversion of types to be comparable! + + + The source collection to sort. + + + Sort criteria to use. + + + A sorted array containing collection elements. + + + + + Reverts order of elements in the list + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the sort processor. + + Aleksandar Seovic + + + + Sorts the source collection. + + + Please not that this processor requires that collection elements + are of a uniform type and that they implement + interface. +

+ If you want to perform custom sorting based on element properties + you should consider using instead. + + + The source collection to sort. + + + Ignored. + + + An array containing sorted collection elements. + + + If collection is not empty and it is + neither nor . + + + +

+ Implementation of the sum aggregator. + + Aleksandar Seovic +
+ + + Returns the sum of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The sum of the numeric values in the source collection. + + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Base type for nodes that accept arguments. + + Aleksandar Seovic + + + + Base type for all expression nodes. + + Aleksandar Seovic + + + + For internal purposes only. Use for expression node implementations. + + + This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST + unfortunately is not marked as [Serializable].
+
+ Note:Since SpringAST implements , deriving classes + have to explicitely override if they need to persist additional + data during serialization. +
+
+ + + The global SpringAST node factory + + + + + Create an instance + + + + + Create an instance from a token + + + + + initialize this instance from an AST + + + + + initialize this instance from an IToken + + + + + initialize this instance from a token type number and a text + + + + + sets the text of this node + + + + + gets the text of this node + + + + + Create a new instance from SerializationInfo + + + + + populate SerializationInfo from this instance + + + + + gets or sets the token type of this node + + + + + gets or sets the text of this node + + + + + Interface that all navigation expression nodes have to implement. + + Aleksandar Seovic + + + + Returns expression value. + + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Expression variables map. + Value of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + New value for the last node of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + Expression variables map. + New value for the last node of the expression. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value. + + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Expression variables map. + Node's value. + + + + Returns node's value for the given context. + + Node's value. + + + + Evaluates this node for the given context, switching local variables map to the ones specified in . + + + + + Sets node's value for the given context. + + Object to evaluate node against. + New value for this node. + + + + Sets node's value for the given context. + + Object to evaluate node against. + Expression variables map. + New value for this node. + + + + Sets node's value for the given context. + + +

+ This is a default implementation of Set method, which + simply throws . +

+

+ This was done in order to avoid redundant Set method implementations, + because most of the node types do not support value setting. +

+
+
+ + + Returns a string representation of this node instance. + + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Holds the state during evaluating an expression. + + + + + Gets/Sets the root context of the current evaluation + + + + + Gets/Sets the current context of the current evaluation + + + + + Gets/Sets global variables of the current evaluation + + + + + Gets/Sets local variables of the current evaluation + + + + + Initializes a new EvaluationContext instance. + + The root context for this evaluation + dictionary of global variables used during this evaluation + + + + Switches current ThisContext. + + + + + Switches current LocalVariables. + + + + + Gets the type of the + + + + + Create a new instance + + + + + Create a new instance + + + + + Append an argument node to the list of child nodes + + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + + + + Asserts the argument count. + + The required count. + + + + Resolves the arguments. + + Current expression evaluation context. + An array of argument values + + + + Resolves the named arguments. + + Current expression evaluation context. + A dictionary of argument name to value mappings. + + + + Resolves the argument. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the argument without ensuring was called. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the named argument. + + Argument name. + Current expression evaluation context. + Resolved named argument value. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed assignment node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed attribute node in the navigation expression. + + Aleksandar Seovic + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Determines the type of object that should be instantiated. + + + The type name to resolve. + + + The type of object that should be instantiated. + + + If the type cannot be resolved. + + + + + Initializes this node by caching necessary constructor and property info. + + + + + + + Sets the named arguments (properties). + + Instance to set property values on. + Argument (property) name to value mappings. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Tries to determine attribute type based on the specified + attribute type name. + + + Attribute type name to resolve. + + + Resolved attribute type. + + + If type cannot be resolved. + + + + + Base class for binary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance with the supplied operands + + + + + + + Create a new instance from SerializationInfo + + + + + Evaluate the left operand + + + + + Evaluate the left operand + + + + + Gets the left operand. + + The left operand. + + + + Gets the right operand. + + The right operand. + + + + Represents parsed boolean literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the boolean literal node. + + + This is the entrypoint into evaluating this expression. + + Node's value. + + + + Represents parsed default node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns left operand if it is not null, or the right operand if it is. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Container object for the parsed expression. + + +

+ Preparing this object once and reusing it many times for expression + evaluation can result in significant performance improvements, as + expression parsing and reflection lookups are only performed once. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of the class + by parsing specified expression string. + + Expression to parse. + + + + Registers lambda expression under the specified . + + Function name to register expression as. + Lambda expression to register. + Variables dictionary that the function will be registered in. + + + + Initializes a new instance of the class + by parsing specified primary expression string. + + Primary expression to parse. + + + + Initializes a new instance of the class + by parsing specified property expression string. + + Property expression to parse. + + + + Initializes a new instance of the class. + + + + + Create a new instance from SerializationInfo + + + + + Evaluates this expression for the specified root object and returns + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value of the last node. + + + + Evaluates this expression for the specified root object and sets + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value to set last node to. + If navigation expression is empty. + + + + Evaluates this expression for the specified root object and returns + of the last node, if possible. + + Context to evaluate expression against. + Expression variables map. + Value of the last node. + + + + Contains a list of reserved variable names. + You must not use any variable names with the reserved prefix! + + + + + Variable Names using this prefix are reserved for internal framework use + + + + + variable name of the currently processed object factory, if any + + + + + Converts string representation of expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Utility class that enables easy expression evaluation. + + +

+ This class allows users to get or set properties, execute methods, and evaluate + logical and arithmetic expressions. +

+

+ Methods in this class parse expression on every invocation. + If you plan to reuse the same expression many times, you should prepare + the expression once using the static method, + and then call to evaluate it. +

+

+ This can result in significant performance improvements as it avoids expression + parsing and node resolution every time it is called. +

+

+

+
+ Aleksandar Seovic +
+ + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Value of the last node in the expression. + + + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Expression variables map. + Value of the last node in the expression. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Value to set last node to. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Expression variables map. + Value to set last node to. + + + + Represents parsed expression list node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a result of the last expression in a list. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the last expression in a list + + + + Represents parsed function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed hexadecimal integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the hexadecimal integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed indexer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + + Context to resolve property against. + Expression variables map. + PropertyInfo for this node. + + + + Represents parsed integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents lambda expression. + + Aleksandar Seovic + + + + caches argumentNames of this instance + + + + + caches body expression of this lambda function + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Gets argument names for this lambda expression. + + + + + Represents parsed list initializer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the list defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents local function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Represents parsed map entry node. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map entry defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed map initializer node in the navigation expression. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Static constructor. Initializes a map of special collection processor methods. + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Gets the best method given the name, argument values, for a given type. + + The type on which to search for the method. + Name of the method. + The binding flags. + The arg values. + Best matching method or null if none found. + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed null literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the null literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic addition operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic addition operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents AND operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical BETWEEN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents arithmetic division operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic division operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical equality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical equality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical IN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical IS operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IS operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical "less than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "less than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents VB-style logical LIKE operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical LIKE operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents logical MATCHES operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical MATCHES operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents arithmetic modulus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic modulus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic multiplication operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic multiplication operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents NOT operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Base class for unary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Gets the operand. + + The operand. + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical NOT operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical inequality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical inequality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents OR operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical OR operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic exponent operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic exponent operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic subtraction operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic subtraction operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary minus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary plus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + + Erich Eichinger + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed projection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of projection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents node that navigates to object's property or public field. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + The parent. + + + + Attempts to resolve property or field. + + + Type to search for a property or a field. + + + Property or field name. + + + Binding flags to use. + + + Resolved property or field accessor, or null + if specified cannot be resolved. + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Retrieves property or field value. + + Context to evaluate expressions against. + Current expression evaluation context. + Property or field value. + + + + Sets property value, doing any type conversions that are necessary along the way. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Sets property or field value using either dynamic or standard reflection. + + Object to evaluate node against. + New value for this node, converted to appropriate type. + + + + In the case of read only collections or custom collections that are not assignable from + IList, try to add to the collection. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + true if was able add to IList, IDictionary, or ISet + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... + + Context to resolve property against. + PropertyInfo for this node. + + + + Gets a value indicating whether this node represents a property. + + + true if this node is a property; otherwise, false. + + + + + Gets a value indicating whether this node represents a field. + + + true if this node is a field; otherwise, false. + + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified identifier. + + + Fully qualified identifier as a string. + + + + + Represents parsed real literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the real literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents a reference to a Spring-managed object. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the first context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the last context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of selection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed string literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Exception thrown when detecting invalid SpEL syntax + + Erich Eichinger + + + + TODO + + + + + TODO + + + + + + + + + + + + + + + + + + + + Gets a message that provides details on the syntax error. + + + + + The expression that caused the error + + + + + Represents ternary expression node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed type node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified typename. + + + Fully qualified typename as a string. + + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Implementation of that can be used to + format and parse boolean values. + + Erich Eichinger + + + + Interface that should be implemented by all formatters. + + + + Formatters assume that source value is a string, and make no assumptions + about the target value's type, which means that Parse method can return + object of any type. + + + Aleksandar Seovic + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Initializes a new instance of the class + using default values + + + + + Initializes a new instance of the class + + + + + Formats the specified boolean value. + + The value to format. + Formatted boolean value. + If is null. + If is not of type . + + + + Parses the specified boolean value according to settings of and + + The boolean value to parse. + Parsed boolean value as a . + If does not match or . + + + + Set/Get value to control casesensitivity of + + + Defaults to true + + + + + Set/Get value to recognize as boolean "true" value + + + Defaults to + + + + + Set/Get value to recognize as boolean "false" value + + + Defaults to + + + + + Implementation of that can be used to + format and parse currency values. + + + + CurrencyFormatter uses currency related properties of the + to format and parse currency values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of CurrencyFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the CurrencyFormatter in order + to override some of the default currency formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + currency values are formatted. + + + + + Formats the specified currency value. + + The value to format. + Formatted currency . + If is null. + If is not a number. + + + + Parses the specified currency value. + + The currency value to parse. + Parsed currency value as a . + + + + Gets or sets the currency decimal digits. + + The currency decimal digits. + + + + + Gets or sets the currency decimal separator. + + The currency decimal separator. + + + + + Gets or sets the currency group sizes. + + The currency group sizes. + + + + + Gets or sets the currency group separator. + + The currency group separator. + + + + + Gets or sets the currency symbol. + + The currency symbol. + + + + + Gets or sets the currency negative pattern. + + The currency negative pattern. + + + + + Gets or sets the currency positive pattern. + + The currency positive pattern. + + + + + Implementation of that can be used to + format and parse values. + + + + DateTimeFormatter uses properties of the + to format and parse values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of DateTimeFormatter, default DateTimeFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the DateTimeFormatter in order + to override some of the default formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + Date/time format string. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture. + + + + Formats the specified value. + + The value to format. + Formatted value. + If is null. + If is not an instance of . + + + + Parses the specified value. + + The string to parse. + Parsed value. + + + + Provides base functionality for filtering values before they actually get parsed/formatted. + + Erich Eichinger + + + + Creates a new instance of this FilteringFormatter. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Allows to rewrite a value before it gets parsed by the underlying formatter + + + + + Allows to change a value before it gets formatted by the underlying formatter + + + + + Implementation of that can be used to + format and parse floating point numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign, decimal point, exponent). + + + Aleksandar Seovic + + + + Default format string. + + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and current thread's culture. + + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and specified culture. + + The culture. + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + The culture name. + + + + Initializes a new instance of the class, + using specified format string and culture. + + The format string. + The culture. + + + + Formats the specified float value. + + The value to format. + Formatted floating point number. + If is null. + If is not a number. + + + + Parses the specified float value. + + The float value to parse. + Parsed float value as a . + + + + Replaces input strings with a given default value, + if they are null or contain whitespaces only, + + Erich Eichinger + + + + Creates a new instance of this HasTextFilteringFormatter using null as default value. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Creates a new instance of this HasTextFilteringFormatter. + + the default value to be returned, if input text doesn't contain text + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + If value contains no text, it will be replaced by a defaultValue. + + + + + Implementation of that can be used to + format and parse integer numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign). + + + Aleksandar Seovic + + + + Initializes a new instance of the class, + using default format string of '{0:D}'. + + + + + Initializes a new instance of the class, + using specified format string. + + + + + Formats the specified integer value. + + The value to format. + Formatted integer number. + If is null. + If is not an integer number. + + + + Parses the specified integer value. + + The integer value to parse. + Parsed number value as a . + + + + Implementation of that simply calls . + + + This formatter is a no-operation implementation. + + Erich Eichinger + + + + Initializes a new instance of the class. + + + + + Converts the passed value to a string by calling . + + The value to convert. + to string converted value. + + + + Returns the passed string "as is". + + The value to return. + The value passed into this method. + + + + Implementation of that can be used to + format and parse numbers. + + + + NumberFormatter uses number-related properties of the + to format and parse numbers. + + + This formatter works with both integer and decimal numbers and allows + you to format and parse numbers that conform to + number style (leading and trailing white space and/or sign, thousands separator, + decimal point) + + + If you use one of the constructors that accept culture as a parameter + to create an instance of NumberFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the NumberFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified number value. + + The value to format. + Formatted number . + If is null. + If is not a number. + + + + Parses the specified number value. + + The number value to parse. + Parsed number value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the number group sizes. + + The number group sizes. + + + + + Gets or sets the number group separator. + + The number group separator. + + + + + Gets or sets the negative pattern. + + The number negative pattern. + + + + + Implementation of that can be used to + format and parse numbers. + + + + PercentFormatter uses percent-related properties of the + to format and parse percentages. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of PercentFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the PercentFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified percentage value. + + The value to format. + Formatted percentage. + If is null. + If is not a number. + + + + Parses the specified percentage value. + + The percentage value to parse. + Parsed percentage value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the percent group sizes. + + The percent group sizes. + + + + + Gets or sets the percent group separator. + + The percent group separator. + + + + + Gets or sets the negative pattern. + + The percent negative pattern. + + + + + Gets or sets the positive pattern. + + The percent positive pattern. + + + + + Gets or sets the percent symbol. + + The percent symbol. + + + + + Gets or sets the per mille symbol. + + The per mille symbol. + + + + + Loads a list of resources that should be applied from the .NET . + + +

+ This implementation will iterate over all resource managers + within the message source and return a list of all the resources whose name starts with '$this'. +

+

+ All other resources will be ignored, but you can retrieve them by calling one of + GetMessage methods on the message source directly. +

+
+ Aleksandar Seovic +
+ + + Abstract base class that all localizers should extend + + +

+ This class contains the bulk of the localizer logic, including implementation + of the ApplyResources methods that are defined in + interface. +

+

+ All specific localizers need to do is inherit this class and implement + GetResources method that will return a list of + objects that should be applied to a specified target. +

+

+ Custom implementations can use whatever type of resource storage they want, + such as standard .NET resource sets, custom XML files, database, etc. +

+
+ Aleksandar Seovic +
+ + + Defines an interface that localizers have to implement. + + +

+ Localizers are used to automatically apply resources to object's members + using reflection. +

+
+ Aleksandar Seovic +
+ + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's culture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's uiCulture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Returns a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + implementation + that simply returns the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . + + Aleksandar Seovic + + + + Strategy interface for + resolution. + + Aleksandar Seovic + + + + Resolves the + from some context. + + +

+ The 'context' is determined by the appropriate implementation class. + An example of such a context might be a thread local bound + , or a + sourced from an HTTP + session. +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + +

+ This is an optional operation and does not need to be implemented + such that it actually does anything useful (i.e. it can be a no-op). +

+
+ + The new or + to clear the current . + +
+ + + Returns the default . + + +

+ It tries to get the + from the value of the + + property and falls back to the of the + current thread if the + + is . +

+
+ + The default + +
+ + + Resolves the + from some context. + + +

+ The 'context' in this implementation is the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + + The new or + to clear the current . + + + + + + + The default . + + + The default . + + + + + Abstract base class that all resource cache implementations should extend. + + Aleksandar Seovic + + + + Defines an interface that resource cache adapters have to implement. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Gets the list of resources from the cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Crates resource cache key for the specified target object and culture. + + Target object to apply resources to. + Resource culture to use for resource lookup. + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Resource cache implementation that doesn't cache resources. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + Always returns null. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + + + + Holds mapping between control property and it's value + as read from the resource file. + + Aleksandar Seovic + + + + Creates instance of resource mapper. + + Target property. + Resource value. + + + + Gets parsed target property expression. See + for more information on object navigation expressions. + + + + + Value of the resource that target property should be set to. + + + + + Utility class to aid in the manipulation of events and delegates. + + Griffin Caprio + + + + Returns a new instance of the requested . + + +

+ Often used to wire subscribers to event publishers. +

+
+ + The of delegate to create. + + + The target subscriber object that contains the delegate implementation. + + + referencing the delegate method on the subscriber. + + + A delegate handler that can be added to an events list of handlers, or called directly. + +
+ + + Queries the input type for a signature matching the input + signature. + + + Typically used to query a potential subscriber to see if they implement an event handler. + + to match against + to query + + matching input + signature, or if there is no match. + + + + + Creates a new instance of the EventManipulationUtilities class. + + +

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

+
+
+ + + Default implementation of the + interface. + + Griffin Caprio + + + + Creates a new instance of the EventRegistry class. + + + + + Adds the input object to the list of publishers. + + + This publishes all events of the source object to any object + wishing to subscribe + + The source object to publish. + + + + Subscribes to all events published, if the subscriber implements + compatible handler methods. + + The subscriber to use. + + + + Subscribes to published events of all objects of a given type, if the + subscriber implements compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + The target to unsubscribe from + + + + The list of event publishers. + + The list of event publishers. + + + + To be implemented by any object that wishes to receive a reference to + an . + + +

+ This interface only applies to objects that have been instantiated + within the context of an + . This interface does + not typically need to be implemented by application code, but is rather + used by classes internal to Spring.NET. +

+
+ Mark Pollack + Rick Evans +
+ + + Set the + associated with the + that created this + object. + + +

+ This property will be set by the relevant + after all of this + object's dependencies have been resolved. This object can use the + supplied + immediately to publish or subscribe to one or more events. +

+
+
+ + + Marks a constructor, field, propery or config method as to be + autowired by Spring's dependency injection facilities. + + Only one constructor (at max) of any given bean class may carry this + annotation, indicating the constructor to autowire when used as a Spring + bean. Such a constructor does not have to be public. + + Fields are injected right after construction of a object, before any + config methods are invoked. Such a config field does not have to be public. + + Config methods may have an arbitrary name and any number of arguments; + each of those arguments will be autowired with a matching bean in the + Spring container. Object property setter methods are effectively just + a special case of such a general config method. Such config methods + do not have to be public. + + In the case of multiple argument methods, the 'required' parameter is + applicable for all arguments. + + In case of a {@link java.util.Collection} or {@link java.util.Map} + dependency type, the container will autowire all beans matching the + declared value type. In case of a Map, the keys must be declared as + type String and will be resolved to the corresponding bean names. + + Note that actual injection is performed through a + {@link org.springframework.beans.factory.config.BeanPostProcessor + BeanPostProcessor} which in turn means that you cannot + use {@code @Autowired} to inject references into + {@link org.springframework.beans.factory.config.BeanPostProcessor + BeanPostProcessor} or + {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor BeanFactoryPostProcessor} + types. Please consult the javadoc for the {@link AutowiredAnnotationBeanPostProcessor} + class (which, by default, checks for the presence of this annotation). + + + + + Defines it Autowired PostProcessor should fail if object is not set + + + + + implementation + that autowires annotated fields, properties and arbitrary config methods. + Such members to be injected are detected through an attribute: by default, + Spring's . + + Only one constructor (at max) of any given bean class may carry this + annotation with the 'required' parameter set to true, + indicating the constructor to autowire when used as a Spring bean. + If multiple non-required constructors carry the annotation, they + will be considered as candidates for autowiring. The constructor with + the greatest number of dependencies that can be satisfied by matching + beans in the Spring container will be chosen. If none of the candidates + can be satisfied, then a default constructor (if present) will be used. + An annotated constructor does not have to be public. + + Fields are injected right after construction of a bean, before any + config methods are invoked. Such a config field does not have to be public. + + Config methods may have an arbitrary name and any number of arguments; each of + those arguments will be autowired with a matching bean in the Spring container. + Bean property setter methods are effectively just a special case of such a + general config method. Config methods do not have to be public. + + Note: A default AutowiredAttributeObjectPostProcessor will be registered + by the "context:annotation-config" and "context:component-scan" XML tags. + Remove or turn off the default annotation configuration there if you intend + to specify a custom AutowiredAnnotationBeanPostProcessor bean definition. + NOTE: Annotation injection will be performed before XML injection; + thus the latter configuration will override the former for properties wired through + both approaches. + + + + + Adapter that implements all methods on + as no-ops, which will not change normal processing of each object instantiated + by the container. Subclasses may override merely those methods that they are + actually interested in. + + + Note that this base class is only recommendable if you actually require + functionality. If all you need + is plain functionality, prefer a straight + implementation of that (simpler) interface. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Extension of the interface, + adding a callback for predicting the eventual type of a processed object. + + This interface is a special purpose interface, mainly for + internal use within the framework. In general, application-provided + post-processors should simply implement the plain + interface or derive from the + class. New methods might be added to this interface even in point releases. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Subinterface of + + that adds a before-instantiation callback and a callback after instantiation but before + explicit properties are set or autowiring occurs. + + + + Typically used to suppress default instantiation for specific target objects, + for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, + lazily initializing targets, etc), or to implement additional injection strategies such as field + injection. + + + This interface is a special purpose interface, mainly for internal use within the framework. + It is recommended to implement the plain interface as far as + possible, or to derive from in order to be shielded + from extension to this interface. + + + Juergen Hoeller + Rick Evans (.NET) + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Predicts the type of the object to be eventually returned from this + processors callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Predicts the type of the object to be eventually returned from this + processors PostProcessBeforeInstantiation callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + 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. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + 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. + +
+ + + Interface to be implemented by objects that wish to be aware of their owning + . + + +

+ For example, objects can look up collaborating objects via the factory. +

+

+ Note that most objects will choose to receive references to collaborating + objects via respective properties and / or an appropriate constructor. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + 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. + +
+ + + Add a Autowired Attribute Type + + + + + Create a new instance of an Autowire Post Processor + with standard attributes of + and + + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Finds autowire candidates and verifies them + + + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + + + + + Injects autoried annotated properties, fields, methods into objectInstance + + + + + Name of the object. + The actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Register the specified bean as dependent on the autowired beans. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ + The order value. + +
+ + + 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. + +
+ + + Class representing injection information about an annotated field. + + + + + Represents an element that needs to be injected + + + + + Internal class for managing injection metadata. + Not intended for direct use in applications. + + + + + + + + + + + + + + + + Inject values for members into object instance + + + + + + + + Represents an element that needs to be injected + + + + + The Property, field, method or constructor info + + + + + Instantiates a new inject element + + + + + + Ececuted to inject value to associated memeber info + + + + + + + + Class representing injection information about an annotated field. + + + + + Class representing injection information about an annotated method. + + + + + implementation + that invokes attributed init and destroy methods. Allows for an attributation + alternative to Spring's and + callback interfaces. + + Invoke and destroy annotations may be applied to methods of any visibility: + public, protected, or private. Multiple such methods + may be annotated, but it is recommended to only annotate one single + init method and destroy method, respectively. + + + + + Subinterface of + that adds + a before-destruction callback. + + + The typical usage will be to invoke custom destruction callbacks on + specific object types, matching corresponding initialization callbacks. + + Juergen Hoeller + Simon White (.NET) + + + + Apply this + to the + given new object instance before its destruction. Can invoke custom + destruction callbacks. + + The new object instance. + The name of the object. + + In case of errors. + + + + + Creates InitDestroy Post Processor with default attribute types of + + + + + + Applies PostConstruct init method initialisation if instance is attributed + + 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. + + + + + No special post processing after initialization + + + + + Executed PreDestroy methods in given order for provided instance + + The new object instance.The name of the object.In case of errors. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ + The order value. + +
+ + + Specify the init attribute to check for, indicating initialization + methods to call after configuration of an object. + + + + + Specify the destroy attribute to check for, indicating disposal + methods to call before object is destroyed + + + + + + + + + + Defines a method that will be called during the intantiation of an instance + + + + + Initializes a new instance of the PostConstruct class with order = 1 + + + + + Initializes a new instance of the PostConstruct class with defined order + + Order in which the PostContruct method is called + + + + Defined the order in which the PostContruct methods are called + + + + + Defines a method that will be called prior to the destruction of the object instance + + + + + Initializes a new instance of the PreDestroy attribute with order = 1 + + + + + Initializes a new instance of the PreDestroy attribute with defined order + + Order in which the PostContruct method is called + + + + Defined the order in which the PreDestroy methods are called + + + + + implementation that matches bean definition qualifier + against on the field or parameter to be autowired. + Also supports suggested expression values through a attribute. + + + + + Strategy interface for determining whether a specific object definition + qualifies as an autowire candidate for a specific dependency. + + Mark Fisher + Juergen hoeller + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Determine whether a default value is suggested for the given dependency. + + The descriptor for the target method parameter or field + The value suggested (typically an expression String), + or null if none found + + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for Spring's standard attribute. + + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for the given qualifier attribute type. + + the qualifier attribute to look for + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for the given qualifier attribute types. + + the qualifier annotations to look for + + + + Register the given type to be used as a qualifier when autowiring. +

This identifies qualifier annotations for direct use (on fields, + method parameters and constructor parameters) as well as meta + annotations that in turn identify actual qualifier annotations.

+

This implementation only supports annotations as qualifier types. + The default is Spring's attribute which serves + as a qualifier for direct use and also as a meta attribute.

+
+ the attribute type to register +
+ + + Determine whether the provided object definition is an autowire candidate. +

To be considered a candidate the object's autowire-candidate + attribute must not have been set to 'false'. Also, if an attribute on + the field or parameter to be autowired is recognized by this bean factory + as a qualifier, the object must 'match' against the attribute as + well as any attributes it may contain. The bean definition must contain + the same qualifier or match by meta attributes. A "value" attribute will + fallback to match against the bean name or an alias if a qualifier or + attribute does not match.

+
+
+ + + Match the given qualifier annotations against the candidate bean definition. + + + + + Checks whether the given attribute type is a recognized qualifier type. + + + + + Match the given qualifier attribute against the candidate bean definition. + + + + + Determine whether the given dependency carries a value attribute. + + + + + Determine a suggested value from any of the given candidate annotations. + + + + + This annotation may be used on a field or parameter as a qualifier for + candidate beans when autowiring. It may also be used to annotate other + custom annotations that can then in turn be used as qualifiers. + + + + + Instantiate a new qualifier with an empty name + + + + + Instantiate a new qualifier with a givin name + + name to use as qualifier + + + + Checks weather the attribute is the same + + + + + + + Gets the name associated with this qualifier + + + + + Marks a property as being 'required': that is, the setter property + must be configured to be dependency-injected with a value. + + Consult the SDK documentation for , + which, by default, checks for the presence of this annotation. + + Rob Harrop + Mark Pollack + + + + A implementation that enforces required properties to have been configured. + Required properties are detected through an attribute, by default, Spring's + attribute. + + + The motivation for the existence of this IObjectPostProcessor is to allow + developers to annotate the setter properties of their own classes with an + arbitrary attribute to indicate that the container must check + for the configuration of a dependency injected value. This neatly pushes + responsibility for such checking onto the container (where it arguably belongs), + and obviates the need (in part) for a developer to code a method that + simply checks that all required properties have actually been set. + + Please note that an 'init' method may still need to implemented (and may + still be desirable), because all that this class does is enforce that a + 'required' property has actually been configured with a value. It does + not check anything else... In particular, it does not check that a + configured value is not null. + + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Cache for validated object names, skipping re-validation for the same object + + + + + Post-process the given property values before the factory applies them + to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. + + The property values that the factory is about to apply (never null). + The 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances or null to skip property population. + + If a required property value has not been specified + in the configuration metadata. + + + + Determines whether the supplied property is required to have a value, that is to be dependency injected. + + + This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that + the property has a setter method. + + The target PropertyInfo + + true if the supplied property has been marked as being required;; otherwise, false if + not or if the supplied property does not have a setter method + + + + + Builds an exception message for the given list of invalid properties. + + The list of names of invalid properties. + Name of the object. + The exception message + + + + Sets the type of the required attribute, to be used on a property setter + + + The default required attribute type is the Spring-provided attribute. + This setter property exists so that developers can provide their own + (non-Spring-specific) annotation type to indicate that a property value is required. + + The type of the required attribute. + + + + Base class that provides common functionality needed for several IObjectFactoryPostProcessor + implementations + + Mark Pollack + + + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Resolves the supplied into a + instance. + + The object that is to be resolved into a + instance. + The error context source. + The error context string. + A resolved . + +

+ This (default) implementation supports resolving + s and s. + Only override this method if you want to key your type alias + on something other than s + and s. +

+
+ + If the supplied is , + or the supplied cannot be resolved. + +
+ + + Return the order value of this object, with a higher value meaning + greater in terms of sorting. + + The order value. + + + + + Simple template superclass for + implementations that allows for the creation of a singleton or a prototype + instance (depending on a flag). + + + If the value of the + + property is (this is the default), this class + will create a single instance of it's object upon initialization and + subsequently return the singleton instance; else, this class will + create a new instance each time (prototype mode). Subclasses must + implement the + + template method to actually create objects. + + Juergen Hoeller + Keith Donald + Simon White (.NET) + + + + Interface to be implemented by objects used within an + that are themselves + factories. + + +

+ If an object implements this interface, it is used as a factory, + not directly as an object. s + can support singletons and prototypes + ()... + please note that an + itself can only ever be a singleton. It is a logic error to configure an + itself to be a prototype. +

+ + An object that implements this interface cannot be used as a normal object. + +
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + + If this method is being called in the context of an enclosing IoC container and + returns , the IoC container will consider this factory + object as not being fully initialized and throw a corresponding (and most + probably fatal) exception. + + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + 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? + + + + + Invoked by an + after it has injected all of an object's dependencies. + + + In the event of misconfiguration (such as the failure to set a + required property) or if initialization fails. + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + Template method that subclasses must override to construct + the object returned by this factory. + + + Invoked once immediately after the initialization of this + in the case of + a singleton; else, on each call to the + + method. + + + If an exception occured during object creation. + + + A distinct instance of the object created by this factory. + + + + + Performs cleanup on any cached singleton object. + + +

+ Only makes sense in the context of a singleton object. +

+
+ + +
+ + + Is the object managed by this factory a singleton or a prototype? + + +

+ Please note that changing the value of this property after + this factory object instance has been created by an enclosing + Spring.NET IoC container really is a programming error. This + property should really only be set once, prior to the invocation + of the + + callback method. +

+
+ +
+ + + Return the of object that this + creates, or + if not known in advance. + + + + + + The various autowiring modes. + + Rick Evans + + + + Do not autowire. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Implementation of that + resolves variable name against command line arguments. + + Aleksandar Seovic + + + + Defines contract that different variable sources have to implement. + + +

+ The "variable sources" are objects containing name-value pairs + that allow a variable value to be retrieved for the given name.

+

+ Out of the box, Spring.NET supports a number of variable sources, + that allow users to obtain variable values from .NET config files, + Java-style property files, environment, registry, etc.

+

+ Users can always write their own variable sources implementations, + that will allow them to load variable values from the database or + other proprietary data source.

+
+ + + + + + + Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Default constructor. + Initializes command line arguments from the environment. + + + + + Constructor that allows arguments to be passed externally. + Useful for testing. + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes command line arguments dictionary. + + + + + Gets or sets a prefix that should be used to + identify arguments to extract values from. + + + A prefix that should be used to identify arguments + to extract values from. Defaults to slash ("/"). + + + + + Gets or sets a character that should be used to + separate argument name from its value. + + + A character that should be used to separate argument + name from its value. Defaults to colon (":"). + + + + + Implementation of that + resolves variable name against name-value sections in + the standard .NET configuration file. + + Aleksandar Seovic + + + + Initializes a new instance of + + + + + Initializes a new instance of from the given + + + + + Initializes a new instance of from the given + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets a list of section names variables should be loaded from. + + + All sections specified need to be handled by the + in order to be processed successfully. + + + A list of section names variables should be loaded from. + + + + + Convinience property. Gets or sets a single section + to read properties from. + + + The section specified needs to be handled by the + in order to be processed successfully. + + + A section to read properties from. + + + + + Implementation of that + resolves variable name against provided variables. + + + Variable name resolution is case insensitive. + + Bruno Baia + + + + Initializes a new instance of . + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Gets or sets variables. + + + + + Various utility methods for .NET style .config files. + + +

+ Currently supports reading custom configuration sections and returning them as + objects. +

+
+ Simon White + Mark Pollack +
+ + + Initializes the type members + + + + + Reads the specified configuration section into a + . + + The resource to read. + The section name. + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + The populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Read from the specified configuration from the supplied XML + into a + . + + + + Does not support section grouping. The supplied XML + must already be loaded. + + + + The to read from. + + + The configuration section name to read. + + + A newly populated + . + + + If any errors are encountered while reading (this only applies to + v1.1 and greater of the .NET Framework). + + + If any errors are encountered while reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Returns the section from the specified resource with the given section name + + + + + Returns the section from the specified resource with the given section name. Use + in case no section handler is specified. + + + + + Returns the typed section from the specified resource with the given section name + + + + + Returns the section from the specified resource with the given section name. Use + in case no section handler is specified. + + + + + Returns the typed result of evaluating the specified . + + if the result's type does not match the expected type + + + + Reads the specified configuration section from the given + + + + + + + + Reads the specified configuration section from the given + + + + + + + + + Determine the configuration section handler type + + + + + Populates the supplied with values from + a .NET application configuration file. + + + The + to add any key-value pairs to. + + + The configuration section name in the a .NET application configuration + file. + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + if the supplied + was found. + + + + + Creates a new instance of the ConfigurationReader class. + + +

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

+
+
+ + + Implementation of that + resolves variable name connection strings defined in + the standard .NET configuration file. + + +

+ When the <connectionStrings> configuration section is processed by this class, + two variables are defined for each connection string: one for connection string and + the second one for the provider name.

+

+ Variable names are generated by appending '.connectionString' and '.providerName' + literals to the value of the name attribute of the connection string element. + For example:

+
+            
+               
+            
+            
+

+ will result in two variables being created: myConn.connectionString and myConn.providerName. + You can reference these variables within your object definitions, just like any other variable.

+
+ Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Holder for constructor argument values for an object. + + +

+ Supports values for a specific index or parameter name (case + insensitive) in the constructor argument list, and generic matches by + . +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Can be used as an argument filler for the + + overload when one is not looking for an argument by index. + + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Add argument value for the given index in the constructor argument list. + + + The index in the constructor argument list. + + + The argument value. + + + + + Add argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + The argument value. + + The of the argument + . + + + + + Add argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + The argument value. + + If the supplied is + or is composed wholly of whitespace. + + + + + Get argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + + The required of the argument. + + + The + + for the argument, or if none set. + + + + + Get argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + + The + + for the argument, or if none set. + + + + + Does this set of constructor arguments contain a named argument matching the + supplied name? + + + + The comparison is performed in a case-insensitive fashion. + + + The named argument to look up. + + if this set of constructor arguments + contains a named argument matching the supplied + name. + + + + + Add generic argument value to be matched by type. + + + The argument value. + + + + + Add generic argument value to be matched by type. + + The argument value. + + The of the argument + . + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + The + + for the argument, or if none set. + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list, or to the named argument, or + generically matches by . + + + The index of the argument in the constructor argument list. May be + negative, to denote the fact that we are not looking for an + argument by index (see + . + + + The name of the argument in the constructor argument list. May be + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Return the map of indexed argument values. + + + An with + indices as keys and + s + as values. + + + + + Return the map of named argument values. + + + An with + named arguments as keys and + s + as values. + + + + + Return the set of generic argument values. + + + A of + s. + + + + + Return the number of arguments held in this instance. + + + + + Returns true if this holder does not contain any argument values, + neither indexed ones nor generic ones. + + + + + Holder for a constructor argument value, with an optional + attribute indicating the target + of the actual constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + The of the argument + . Can also be one of the common + aliases (int, bool, + float, etc). + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Gets and sets the value for the constructor argument. + + +

+ Only necessary for manipulating a registered value, for example in + s. +

+
+
+ + + Return the of the constructor + argument. + + + + + + implementation that allows for convenient registration of custom + s. + + + + The use of this class is typically not required; the .NET + mechanism of associating a + with a + via the use of the + is the + recommended (and standard) way. This class primarily exists to cover + those cases where third party classes to which one does not have the + source need to be exposed to the type conversion mechanism. + +

+ Because the + + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever type conversion is required. If + one is using a + + object definition within the scope of an + , no such automatic + pickup of the + + is performed (custom converters will have to be added manually using the + + method). For most application scenarios, one will get better + mileage using the + abstraction. +

+
+ +

+ The following examples all assume XML based configuration, and use + inner object definitions to define the custom + objects (nominally to + avoid polluting the object name space, but also because the + configuration simply reads better that way). +

+ + + + + + + + + + + + + + + + +

+ The following example illustrates a complete (albeit naieve) use case + for this class, including a custom + implementation, said + converters domain class, and the XML configuration that hooks the + converter in place and makes it available to a Spring.NET container for + use during object resolution. +

+

+ The domain class is a simple data-only object that contains the data + required to send an email message (such as the host and user account + name). A developer would prefer to use a string of the form + UserName=administrator,Password=r1l0k1l3y,Host=localhost to + configure the mail settings and just let the container take care of the + conversion. +

+ + namespace ExampleNamespace + { + public sealed class MailSettings + { + private string _userName; + private string _password; + private string _host; + + public string Host + { + get { return _host; } + set { _host = value; } + } + + public string UserName + { + get { return _userName; } + set { _userName = value; } + } + + public string Password + { + get { return _password; } + set { _password = value; } + } + } + + public sealed class MailSettingsConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (typeof (string) == sourceType) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + string text = value as string; + if(text != null) + { + MailSettings mailSettings = new MailSettings(); + string[] tokens = text.Split(','); + for (int i = 0; i < tokens.Length; ++i) + { + string token = tokens[i]; + string[] settings = token.Split('='); + typeof(MailSettings).GetProperty(settings[0]) + .SetValue(mailSettings, settings[1], null); + } + return mailSettings; + } + return base.ConvertFrom(context, culture, value); + } + } + + // a very naieve class that uses the MailSettings class... + public sealed class ExceptionLogger + { + private MailSettings _mailSettings; + + public MailSettings MailSettings { + { + set { _mailSettings = value; } + } + + public void Log(object value) + { + Exception ex = value as Exception; + if(ex != null) + { + // use _mailSettings instance... + } + } + } + } + +

+ The attendant XML configuration for the above classes would be... +

+ + + + + + + + + + + + + + + + Juergen Hoeller + Simon White (.NET) + + + + + + + Registers any custom converters with the supplied + . + + + The object factory to register the converters with. + + + In case of errors. + + + + + Resolves the supplied into a + instance. + + + The object that is to be resolved into a + instance. + + + A resolved instance. + + + If the supplied is , + or the supplied cannot be resolved. + + + + + The custom converters to register. + + +

+ The uses the type name + of the class that requires conversion as the key, and an + instance of the + that will effect + the conversion. Alternatively, the actual + of the class that requires conversion + can be used as the key. +

+
+ +

+ + IDictionary converters = new Hashtable(); + converters.Add( "System.Date", new MyCustomDateConverter() ); + // a System.Type instance can also be used as the key... + converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); + +

+
+
+ + + implementation that + creates delegates. + + +

+ Supports the creation of s for both + instance and methods. +

+
+ Rick Evans +
+ + + Callback method called once all factory properties have been set. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Creates the delegate. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + The of + created by this factory. + + +

+ Returns the + if accessed prior to the method + being called. +

+
+
+ + + The of the + created by this factory. + + + + + The name of the method that is to be invoked by the created + delegate. + + + + + The target if the + refers to a method. + + + + + The target object if the + refers to an instance method. + + + + + A generic implementation of an , that delegates post processing to a passed delegate + + + This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. + + + The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on + the context instance: + + IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); + ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => + { + of.RegisterSingleton("someObject", someObject); + })); + + + Erich Eichinger + + + + Get or Set the handler to delegate configuration to + + + + + Descriptor for a specific dependency that is about to be injected. + Wraps a constructor parameter, a method parameter or a field, + allowing unified access to their metadata. + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for a method or constructor parameter. + Considers the dependency as 'eager' + + The MethodParameter to wrap. + if set to true if the dependency is required. + + + + Initializes a new instance of the class for a method or a constructor parameter. + + The MethodParameter to wrap. + if set to true the dependency is required. + if set to true the dependency is 'eager' in the sense of + eagerly resolving potential target objects for type matching. + + + + Create a new descriptor for a property. + Considers the dependency as 'eager'. + property to wrap + required whether the dependency is required + + + + + Create a new descriptor for a property. + property to wrap + whether the dependency is required + whether this dependency is 'eager' in the sense of + eagerly resolving potential target beans for type matching + + + + + Create a new descriptor for a field. + Considers the dependency as 'eager'. + field to wrap + whether the dependency is required + + + + + Create a new descriptor for a field. + field to wrap + whether the dependency is required + whether this dependency is 'eager' in the sense of + eagerly resolving potential target beans for type matching + + + + + Gets a value indicating whether this dependency is required. + + true if required; otherwise, false. + + + + Determine the declared (non-generic) type of the wrapped parameter/field. + + The type of the dependency (never null + + + + Gets a value indicating whether this is eager in the sense of + eagerly resolving potential target beans for type matching. + + true if eager; otherwise, false. + + + + Gets the wrapped MethodParameter, if any. + + The method parameter. + + + + Gets the Attributes assigned to Field, Property or Paramater + + + + + Gets the name of the member info + + + + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+ + If the value is . + + + If the value is an . + + + If the value is an interface. + +
+ + + The of objects created by this factory. + + + Always returns the . + + + + + A very simple, hashtable-based implementation of + + Erich Eichinger + + + + Creates a new, empty variable source + + + + + Creates a new, empty and case-insensitive variable source + + + + + Create a new variable source from a list of paired string values. + + + + The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: + + new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) + + + + the argument list containing pairs, or null + + + + Initializes a new instance of the DictionaryVariableSource class. + + + + + Creates a new variable source, reading values from another dictionary + and converting them to strings if necessary + + + + + Adds a key/value pair + + this dictionary. allows for fluent config + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Performs a variable name lookup + + + + + Specifies how instances of the + + class must apply environment variables when replacing values. + + Mark Pollack + + + + Never replace environment variables. + + + + + If properties are not specified via a resource, + then resolve using environment variables. + + + + + Apply environment variables first before applying properties from a + resource. + + + + + Implementation of that + resolves variable name against environment variables. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Holder for event handler values for an object. + + Rick Evans (.NET) + + + + The empty array of s. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Adds the supplied handler to the collection of event handlers. + + The handler to be added. + + + + The mapping of event names to an + of + s. + + + + + Gets the of events + that have handlers associated with them. + + + + + Gets the of + s for the supplied + event name. + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to a Spring that should be evaluated at runtime. + + Aleksandar Seovic + + + + Creates a new instance of the + + class. + + The expression to resolve. + + + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Gets or sets the expression string. Setting the expression string will cause + the expression to be parsed. + + The expression string. + + + + Return the expression. + + + + + Properties for this expression node. + + + + + implementation that + retrieves a static or non-static public field value. + + +

+ Typically used for retrieving public constants. +

+
+ +

+ The following example retrieves the field value... +

+ + + + + + +

+ The previous example could also have been written using the convenience + + property, like so... +

+ + + + + +

+ This class also implements the + interface + (). + If the id (or name) of one's + + object definition is set to the + of the field to be retrieved, then the id (or + name) of one's object definition will be used for the name of the + field lookup. See below for an example of this + concise style of definition. +

+ + + + + + + +

+ The usage for retrieving instance fields is similar. No example is shown + because public instance fields are generally bad practice; but if + you have some legacy code that exposes public instance fields, or if you + just really like coding public instance fields, then you can use this + implementation to + retrieve such field values. +

+ + Juergen Hoeller + Rick Evans (.NET) + + + + Interface to be implemented by objects that wish to be aware of their object + name in an . + + +

+ Note that most objects will choose to receive references to collaborating + objects via respective properties. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + 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. +

+
+
+ + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + +

+ This method allows the object instance to perform initialization only + possible when all object properties have been set and to throw an + exception in the event of misconfiguration. +

+
+ + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The of the + field to be retrieved. + + + + + Set the name of the object in the object factory that created this object. + + + The name of the object in the factory. + + +

+ In the context of the + + class, the + + value will be interepreted as the value of the + + property if no value has been explicitly assigned to the + + property. This allows for concise object definitions with just an id or name; + see the class documentation for + + for an example of this style of usage. +

+
+
+ + + The name of the field the value of which is to be retrieved. + + +

+ If the + + has been set (and is not ), then the value of this property + refers to an instance field name; it otherwise refers to a + field name. +

+
+
+ + + The object instance on which the field is defined. + + + + + The on which the field is defined. + + + + + The of object that this + creates, or + if not known in advance. + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + Extension of the + interface to be implemented by object factories that are capable of + autowiring and expose this functionality for existing object instances. + + Juergen Hoeller + Rick Evans (.NET) + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + the resolved object, or null if none found + if dependency resolution failed + + + + Extension of the interface + that injects dependencies into the object managed by the factory. + + Bruno Baia + + + + Gets the template object definition that should be used + to configure the instance of the object managed by this factory. + + + + + SPI interface to be implemented by most if not all listable object factories. + + +

+ Allows for framework-internal plug'n'play, e.g. in + . +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Configuration interface to be implemented by most if not all object + factories. + + +

+ Provides the means to configure an object factory in addition to the + object factory client methods in the + interface. +

+

+ Allows for framework-internal plug'n'play even when needing access to object + factory configuration methods. +

+

+ When disposed, it will destroy all cached singletons in this factory. Call + when you want to shutdown + the factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Interface that defines a registry for shared object instances. + + + Can be implemented by + implementations in order to expose their singleton management facility + in a uniform manner. + + The interface extends this interface. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Registers the given existing object as singleton in the object registry, + under the given object name. + + + + The given instance is supposed to be fully initialized; the registry + will not perform any initialization callbacks (in particular, it won't + call IInitializingObject's AfterPropertiesSet method). + The given instance will not receive any destruction callbacks + (like IDisposable's Dispose method) either. + + + If running within a full IObjectFactory: Register an object definition + instead of an existing instance if your object is supposed to receive + initialization and/or destruction callbacks. + + + Typically invoked during registry configuration, but can also be used + for runtime registration of singletons. As a consequence, a registry + implementation should synchronize singleton access; it will have to do + this anyway if it supports a BeanFactory's lazy initialization of singletons. + + + Name of the object. + The singleton object. + + + + + + Return the (raw) singleton object registered under the given name. + + + + Only checks already instantiated singletons; does not return an Object + for singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to access manually registered singletons + . Can also be used to access a singleton + defined by an object definition that already been created, in a raw fashion. + + + Name of the object to look for. + the registered singleton object, or null if none found + + + + + Check if this registry contains a singleton instance with the given name. + + + + Only checks already instantiated singletons; does not return true + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check whether a + singleton defined by an object definition has already been created. + + + To check whether an object factory contains an object definition with a given name, + use ListableBeanFactory's ContainsObjectDefinition. Calling both + ContainsObjectDefinition and ContainsSingleton answers + whether a specific object factory contains an own object with the given name. + + + Use IObjectFactory's ContainsObject for general checks whether the + factory knows about an object with a given name (whether manually registered singleton + instance or created by bean definition), also checking ancestor factories. + + + Name of the object to look for. + + true if this bean factory contains a singleton instance with the given name; otherwise, false. + + + + + + + + Gets the names of singleton objects registered in this registry. + + + + Only checks already instantiated singletons; does not return names + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + The list of names as String array (never null). + + + + + + + Gets the number of singleton beans registered in this registry. + + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + The number of singleton objects. + + + + + + + Ignore the given dependency type for autowiring. + + +

+ To be invoked during factory configuration. +

+

+ This will typically be used for dependencies that are resolved + in other ways, like + through . +

+
+ + The to be ignored. + +
+ + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a new + that will get applied to objects created by this factory. + + +

+ To be invoked during factory configuration. +

+
+ + The + to register. + +
+ + + Given an object name, create an alias. + + +

+ This is typically used to support names that are illegal within + XML ids (which are used for object names). +

+

+ Typically invoked during factory configuration, but can also be + used for runtime registration of aliases. Therefore, a factory + implementation should synchronize alias access. +

+
+ The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + +
+ + + Register the given custom + for all properties of the given . + + +

+ To be invoked during factory configuration. +

+
+ + The required of the property. + + + The to register. + +
+ + + Add a String resolver for embedded values such as annotation attributes. + + the String resolver to apply to embedded values + + + + Resolve the given embedded value, e.g. an annotation attribute. + + the value to resolve + the resolved value (may be the original value as-is) + + + + Set the parent of this object factory. + + +

+ Note that the parent shouldn't be changed: it should only be set outside + a constructor if it isn't available when an object of this class is + created. +

+
+
+ + + Returns the current number of registered + s. + + + The current number of registered + s. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + +

+ Typically invoked at the end of factory setup, if desired. +

+

+ As this is a startup method, it should destroy already created singletons if + it fails, to avoid dangling resources. In other words, after invocation + of that method, either all or no singletons at all should be + instantiated. +

+
+ + If one of the singleton objects could not be created. + +
+ + + Register a special dependency type with corresponding autowired value. + + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the BeanFactory interface itself. + + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + May be used to store custom value references in object definition properties. + + + Erich Eichinger + + + + + + the object factory holding the given object definition + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Denotes a special placeholder collection that may contain + s or + other placeholder objects that will need to be resolved. + + +

+ 'A special placeholder collection' means that the elements of this + collection can be placeholders for objects that will be resolved later by + a Spring.NET IoC container, i.e. the elements themselves will be + resolved at runtime by the enclosing IoC container. +

+

+ The core Spring.NET library already provides three implementations of this interface + straight out of the box; they are... +

+ + + + . + + + + + . + + + + + . + + + +

+ If you have a custom collection class (i.e. a class that either implements the + directly or derives from a class that does) + that you would like to expose as a special placeholder collection (i.e. one that can + have s as elements + that will be resolved at runtime by an appropriate Spring.NET IoC container, just + implement this interface. +

+
+ +

+ Lets say one has a Bag class (i.e. a collection that supports bag style semantics). +

+ + using System; + + using Spring.Objects.Factory.Support; + + namespace MyNamespace + { + public sealed class Bag : ICollection + { + // ICollection implementation elided for clarity... + + public void Add(object o) + { + // implementation elided for clarity... + } + } + + public class ManagedBag : Bag, IManagedCollection + { + public ICollection Resolve( + string objectName, RootObjectDefinition definition, + string propertyName, ManagedCollectionElementResolver resolver) + { + Bag newBag = new Bag(); + string elementName = propertyName + "[bag-element]"; + foreach(object element in this) + { + object resolvedElement = resolver(objectName, definition, elementName, element); + newBag.Add(resolvedElement); + } + return newBag; + } + } + } + +
+ Rick Evans +
+ + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Resolves a single element value of a managed collection. + + +

+ If the does not need to be resolved or + converted to an appropriate , the + will be returned as-is. +

+
+ + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + That element of a managed collection that may need to be resolved + to a concrete value. + + A fully resolved element. +
+ + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + implementation that + creates instances of the class. + + +

+ Typically used for retrieving shared + instances for common topics (such as the 'DAL', 'BLL', etc). The + + property determines the name of the + Common.Logging logger. +

+
+ Rick Evans + +
+ + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The name of the instance served up by + this factory. + + + If the supplied is + or contains only whitespace character(s). + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object + managed by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The name of the instance served up by + this factory. + + + The name of the instance served up by + this factory. + + + If the supplied to the setter is + or contains only whitespace character(s). + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Tag subclass used to hold a dictionary of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Interface representing an object whose value set can be merged with that of a parent object. + + Rob Harrop + Mark Pollack (.NET) + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. + + + + + Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. + + The approximate number of elements that the object can initially contain. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the keys of this managed dictionary. + + The unresolved name for the type of the keys of this managed dictionary. + + + + Gets or sets the unresolved name for the + of the values of this managed dictionary. + + The unresolved name for the type of the values of this managed dictionary. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a list of managed elements. + + Rod Johnson + Rick Evans (.NET) + + + + Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. + + + + + Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. + + The number of elements that the new list can initially store. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed list. + + The unresolved name for the type of the elements of this managed list. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag class which represent a Spring-managed instance that + supports merging of parent/child definitions. + + + + + Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + + + + Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + The initial number of entries that the can contain. is less than zero. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a set of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed set. + + The unresolved name for the type of the elements of this managed set. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + An that returns a value + that is the result of a or instance method invocation. + + +

+ Note that this class generally is expected to be used for accessing factory methods, + and as such defaults to operating in singleton mode. The first request to + + by the owning object factory will cause a method invocation, the return + value of which will be cached for all subsequent requests. The + property may be set to + , to cause this factory to invoke the target method each + time it is asked for an object. +

+

+ A target method may be specified by setting the + property to a string representing + the method name, with specifying + the that the method is defined on. + Alternatively, a target instance method may be specified, by setting the + property as the target object, and + the property as the name of the + method to call on that target object. Arguments for the method invocation may be + specified by setting the property. +

+

+ Another (esoteric) use case for this factory object is when one needs to call a method + that doesn't return any value (for example, a class method to + force some sort of initialization to happen)... this use case is not supported by + factory-methods, since a return value is needed to become the object. +

+

+ + This class depends on the + + method being called after all properties have been set, as per the + contract. If you are + using this class outside of a Spring.NET IoC container, you must call one of either + or + yourself to ready the object's internal + state, or you will get a nasty . + +

+
+ +

+ The following example uses an instance of this class to call a + factory method... +

+ + + + + + + + 1st + 2nd + and 3rd arguments + + + + +

+ The following example is similar to the preceding example; the only pertinent difference is the fact that + a number of different objects are passed as arguments, demonstrating that not only simple value types + are valid as elements of the argument list... +

+ + + + + + + + + + + 1st + + + + + + + http://www.springframework.net/ + + + + + +

+ Named parameters are also supported... this next example yields the same results as + the preceding example (that did not use named arguments). +

+ + + + + + + + + + 1st + and 3rd arguments + 2nd + + + + +

+ Similarly, the following example uses an instance of this class to call an instance method... +

+ + + + + + + + + +

+ The above example could also have been written using an anonymous inner object definition... if the + object on which the method is to be invoked is not going to be used outside of the factory object + definition, then this is the preferred idiom because it limits the scope of the object on which the + method is to be invoked to the surrounding factory object. +

+ + + + + + + + + + Colin Sampaleanu + Juergen Hoeller + Rick Evans (.NET) + Simon White (.NET) + + + + + + Specialisation of the class that tries + to convert the given arguments for the actual target method via an + appropriate implementation. + + Juergen Hoeller + Rick Evans + + + + + Helper class allowing one to declaratively specify a method call for later invocation. + + +

+ Typically not used directly but via its subclasses such as + . +

+

+ Usage: specify either the and + or the + and + properties respectively, and + (optionally) any arguments to the method. Then call the + method to prepare the invoker. + Once prepared, the invoker can be invoked any number of times. +

+
+ +

+ The following example uses the class to invoke the + ToString() method on the Foo class using a mixture of both named and unnamed + arguments. +

+ + public class Foo + { + public string ToString(string name, int age, string address) + { + return string.Format("{0}, {1} years old, {2}", name, age, address); + } + + public static void Main() + { + Foo foo = new Foo(); + MethodInvoker invoker = new MethodInvoker(); + invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; + invoker.AddNamedArgument("age", 29); + invoker.Prepare(); + // at this point, the arguments that will be passed to the method invocation + // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} + string details = (string) invoker.Invoke(); + Console.WriteLine (details); + // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' + } + } + +
+ Colin Sampaleanu + Juergen Hoeller + Simon White (.NET) +
+ + + The used to search for + the method to be invoked. + + + + + The value returned from the invocation of a method that returns void. + + + + + The method that will be invoked. + + + + + Creates a new instance of the class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set, or a matching argument could not be found + for a named argument (typically down to a typo). + + + If the specified method could not be found. + +
+ + + Searches for and returns the method that is to be invoked. + + + The return value of this method call will subsequently be returned from the + . + + The method that is to be invoked. + + If no method could be found. + + + If more than one method was found. + + + + + Adds the named argument to this instances mapping of argument names to argument values. + + + The name of an argument on the method that is to be invoked. + + + The value of the named argument on the method that is to be invoked. + + + + + Returns the prepared object that + will be invoked. + + +

+ A possible use case is to determine the return of the method. +

+
+ + The prepared object that + will be invoked. + +
+ + + Invoke the specified method. + + +

+ The invoker needs to have been prepared beforehand (via a call to the + method). +

+
+ + The object returned by the method invocation, or + if the method returns void. + + + If at least one of the arguments passed to this + was incompatible with the signature of the invoked method. + +
+ + + The target on which to call the target method. + + +

+ Only necessary when the target method is ; + else, a target object needs to be specified. +

+
+
+ + + The target object on which to call the target method. + + +

+ Only necessary when the target method is not ; + else, a target class is sufficient. +

+
+
+ + + The name of the method to be invoked. + + +

+ Refers to either a method + or a non- method, depending on + whether or not a target object has been set. +

+
+ +
+ + + Arguments for the method invocation. + + +

+ Ordering is significant... the order of the arguments in this + property must match the ordering of the various parameters on the target + method. There does however exist a small possibility for confusion when + the arguments in this property are supplied in addition to one or more named + arguments. In this case, each named argument is slotted into the index position + corresponding to the named argument... once once all named arguments have been + resolved, the arguments in this property are slotted into any remaining (empty) + slots in the method parameter list (see the example in the overview of the + class if this is not clear). +

+

+ If this property is not set, or the value passed to the setter invocation + is or a zero-length array, a method with no (un-named) arguments is assumed. +

+
+ +
+ + + The resolved arguments for the method invocation. + + + + This property is not set until the target method has been resolved via a call to the + method). It is a combination of the + named and plain vanilla arguments properties, and it is this object array that + will actually be passed to the invocation of the target method. + +

+ Setting the value of this property to results in basically clearing out any + previously prepared arguments... another call to the + method will then be required to prepare the arguments again (or the prepared arguments + can be set explicitly if so desired). +

+
+ + +
+ + + Named arguments for the method invocation. + + +

+ The keys of this dictionary are the () names of the + method arguments, and the () values are the actual + argument values themselves. +

+

+ If this property is not set, or the value passed to the setter invocation + is a reference, a method with no named arguments is assumed. +

+
+ +
+ + + Creates a new instance of the + class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set. + + + If the specified method could not be found. + +
+ + + Register the given custom + for all properties of the given . + + + The of property. + + + The to register. + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + +

+ Returns the return value of the method that is to be invoked. +

+

+ Will return the same value each time if the + + property value is . +

+
+ + An instance (possibly shared or independent) of the object managed by + this factory. + + +
+ + + Prepares this method invoker. + + + If all required properties are not set. + + + If the specified method could not be found. + + + + + + If a singleton should be created, or a new object on each request. + Defaults to . + + + + + Return the return value of the method + that this factory invokes, or if not + known in advance. + + +

+ If the return value of the method that this factory is to invoke is + , then the + will be returned (in accordance with the + contract that + treats a value as a configuration error). +

+
+ +
+ + + Holder for an with + name and aliases. + + +

+ Recognized by + + for inner object definitions. Registered by + , + which also uses it as general holder for a parsed object definition. +

+

+ Can also be used for programmatic registration of inner object + definitions. If you don't care about the functionality offered by the + interface and the like, + registering + or is good enough. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + + The name of the object definition. + + + + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + The name of the object. + + Any aliases for the supplied + + + + + Checks wether a givin candidate name has a defined object or alias + + name to check if exists + + + + + The held by this + instance. + + + + + The name of the object definition. + + + + + Any aliases for the object definition. + + +

+ Guaranteed to never return ; if the associated + + does not have any aliases associated with it, then an empty + array will be returned. +

+
+
+ + + Visitor class for traversing objects, in particular + the property values and constructor arguments contained in them resolving + object metadata values. + + + Used by and + to parse all string values contained in a ObjectDefinition, resolving any placeholders found. + + Mark Pollack + + + + Initializes a new instance of the class. + + The handler to be called for resolving variables contained in a string. + + + + Initializes a new instance of the class + for subclassing + + Subclasses should override the ResolveStringValue method + + + + Traverse the given ObjectDefinition object and the MutablePropertyValues + and ConstructorArgumentValues contained in them. + + The object definition to traverse. + + + + Visits the ObjectDefinition property ObjectTypeName, replacing string values using + the specified IVariableSource. + + The object definition. + + + + Visits the property values of the ObjectDefinition, replacing string values + using the specified IVariableSource. + + The object definition. + + + + Visits the indexed constructor argument values, replacing string values using the + specified IVariableSource. + + The indexed argument values. + + + + Visits the named constructor argument values, replacing string values using the + specified IVariableSource. + + The named argument values. + + + + Visits the generic constructor argument values, replacing string values using + the specified IVariableSource. + + The genreic argument values. + + + + Configures the constructor argument ValueHolder. + + The vconstructor alue holder. + + + + Resolves the given value taken from an object definition according to its type + + the value to resolve + the resolved value + + + + Visits the ManagedList property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet properties KeyTypeName and ValueTypeName and + calls for dictionary's value element. + + + + + Visits the elements of a NameValueCollection and calls + for value of each element. + + + + + calls the to resolve any variables contained in the raw string. + + the raw string value containing variable placeholders to be resolved + If no has been configured. + the resolved string, having variables being replaced, if any + + + + Returns a value that is an + that + returns an object from an + . + + +

+ The primary motivation of this class is to avoid having a client object + directly calling the + + method to get a prototype object out of an + , which would be a + violation of the inversion of control principle. With the use of this + class, the client object can be fed an + as a property + that directly returns one target prototype object. +

+

+ The object referred to by the value of the + + property does not have to be a prototype object, but there is little + to no point in using this class in conjunction with a singleton object. +

+
+ +

+ The following XML configuration snippet illustrates the use of this + class... +

+ + + + + + + + + + + + + + + + Colin Sampaleanu + Simon White (.NET) + + + + Returns an instance of the object factory. + + The object factory. + + + + Invoked by an + after it has set all supplied object properties. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Sets the name of the target object. + + + + + 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 of object created by this factory. + + + + + Interface defining a factory which can return an object instance + (possibly shared or independent) when invoked. + + + This interface is typically used to encapsulate a generic factory + which returns a new instance (prototype) on each invocation. + It is similar to the , but + implementations of the aforementioned interface are normally meant to be defined + as instances by the user in an , + while implementations of this class are normally meant to be fed as a property to + other objects; as such, the + method + has different exception handling behavior. + + Colin Sampaleanu + Simon White (.NET) + + + + Return an instance (possibly shared or independent) + of the object managed by this factory. + + + An instance of the object (should never be ). + + + + + Creates a new instance of the GenericObjectFactory class. + + + The enclosing + . + + + + + Returns the object created by the enclosed object factory. + + The created object. + + + + An implementation + that exposes an arbitrary target object under a different name. + + +

+ Usually, the target object will reside in a different object + definition file, using this + to link it in + and expose it under a different name. Effectively, this corresponds + to an alias for the target object. +

+ + For XML based object definition files, a <alias> + tag is available that effectively achieves the same. + +
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Initialize a new default instance + + + + + Initialize this instance with the predefined and . + + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The name of the target object. + + +

+ The target object may potentially be defined in a different object + definition file. +

+
+ The name of the target object. +
+ + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Callback that supplies the owning factory to an object instance. + + + The owning + (may not be ). The object can immediately + call methods on the factory. + + + In case of initialization errors. + + + + + + + Erich Eichinger + + + + Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. + + + + + Role hint indicating that a is a supporting + part of some larger configuration, typically an outer ComponentDefinition + SUPPORT objects are considered important enough to be aware + of when looking more closely at a particular ComponentDefinition, + but not when looking at the overall configuration of an application. + + + + + Role hint indicating that a is providing an + entirely background role and has no relevance to the end-user. This hint is + used when registering objects that are completely part of the internal workings + of a ComponentDefinition. + + + + + Implementation of that + resolves variable name against Java-style property file. + + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets the locations of the property files + to read properties from. + + + The locations of the property files + to read properties from. + + + + + Convinience property. Gets or sets a single location + to read properties from. + + + A location to read properties from. + + + + + Sets a value indicating whether to ignore resource locations that do not exist. This will call + the Exists property. + + + true if one should ignore missing resources; otherwise, false. + + + + + Overrides default values in one or more object definitions. + + +

+ Instances of this class override already existing values, and is + thus best suited to replacing defaults. If you need to replace + placeholder values, consider using the + + class instead. +

+

+ In contrast to the + + class, the original object definition can have default + values or no values at all for such object properties. If an overriding + configuration file does not have an entry for a certain object property, + the default object value is left as is. Also note that it is not + immediately obvious to discern which object definitions will be mutated by + one or more + s + simply by looking at the object configuration. +

+

+ Each line in a referenced configuration file is expected to take the + following form... +

+ + + +

+ The name.property key refers to the object name and the + property that is to be overridden; and the value is the overridding + value that will be inserted into the appropriate object definition's + named property. +

+

+ Please note that in the case of multiple + s + that define different values for the same object definition value, the + last overridden value will win (due to the fact that the values + supplied by previous + s + will be overridden). +

+
+ +

+ The following XML context definition defines an object that has a number + of properties, all of which have default values... +

+ + + + + + + + +

+ What follows is a .NET config file snippet for the above example (assuming + the need to override one of the default values)... +

+ + + + + + +
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + Allows for the configuration of individual object property values from + a .NET .config file. + + +

+ Useful for custom .NET .config files targetted at system administrators + that override object properties configured in the application context. +

+

+ Two concrete implementations are provided in the Spring.NET core library: + + + + + for <add key="placeholderKey" value="..."/> style + overriding (pushing values from a .NET .config file into object + definitions). + + + + + + for replacing "${...}" placeholders (pulling values from a .NET .config + file into object definitions). + + + +

+

+ Please refer to the API documentation for the concrete implementations + listed above for example usage. +

+
+ Juergen Hoeller + Simon White (.NET) + + +
+ + + The default configuration section name to use if none is explictly supplied. + + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Modify the application context's internal object factory after its + standard initialization. + + + The object factory used by the application context. + + + In case of errors. + + + + + + Loads properties from the configuration sections + specified in into . + + The instance to be filled with properties. + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Validates the supplied . + + +

+ Basically, if external locations are specified, ensure that either + one or a like number of config sections are also specified. +

+
+ + The to be validated. + +
+ + + Simply initializes the supplied + collection with this instances default + (if any). + + + The collection to be so initialized. + + + + + The policy for resolving conflicting property overrides from + several resources. + + +

+ When merging conflicting property overrides from several resources, + should append an override with the same key be appended to the + current value, or should the property override from the last resource + processed override previous values? +

+

+ The default value is ; i.e. a property + override from the last resource to be processed overrides previous + values. +

+
+ + if the property override from the last resource + processed overrides previous values. + +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + The default properties to be applied. + + +

+ These are to be considered defaults, to be overridden by values + loaded from other resources. +

+
+
+ + + The location of the .NET .config file that contains the property + overrides that are to be applied. + + + + + The locations of the .NET .config files containing the property + overrides that are to be applied. + + + + + The configuration sections to look for within the .config files. + + + + + + + Should a failure to find a .config file be ignored? + + +

+ is only appropriate if the .config file is + completely optional. The default is . +

+
+ + if a failure to find a .config file is to be + ignored. + +
+ + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Process the given key as 'name.property' entry. + + + The object factory containing the object definitions that are to be + processed. + + The key. + The value. + + If an error occurs. + + + If the property was not well formed (i.e. not in the format "name.property"). + + + + + implementation that + evaluates a property path on a given target object. + + +

+ The target object can be specified directly or via an object name (see + example below). +

+

+ Please note that the + is an implementation, and as such has + to comply with the contract of the + interface; more specifically, this means that the end result of the property lookup path + evaluation cannot be ( + implementations are not permitted to return ). If the resut of a + property lookup path evaluates to , an exception will be thrown. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + Juergen Hoeller + Rick Evans (.NET) + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The target object that the property path lookup is to be applied to. + + +

+ This would most likely be an inner object, but can of course be + any object reference. +

+
+ + The target object that the property path lookup is to be applied to. + + +
+ + + The (object) name of the target object that the property path lookup + is to be applied to. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this name prior to resolution. The implication of this is that + one cannot use the + class in conjunction with object names that start or end with whitespace. +

+
+ + The (object) name of the target object that the property path lookup + is to be applied to. + + +
+ + + The property (lookup) path to be applied to the target object. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this path prior to resolution. Whitespace is not a valid + identifier for property names (in part or whole) in CLS-based languages, + so this is a not unreasonable action. Please also note that whitespace + that is embedded within the property path will be left as-is (which may + or may not result in an error being thrown, depending on the context of + the whitespace). +

+
+ +

+ Examples of such property lookup paths can be seen below; note that + property lookup paths can be nested to an arbitrary level. +

+ + name.length + accountManager.account['the key'].name + accounts[0].name + +
+ + The property (lookup) path to be applied to the target object. + +
+ + + The 'expected' of the result from evaluating the + property path. + + +

+ This is not necessary for directly specified target objects, or + singleton target objects, where the can + be determined via reflection. Just specify this in case of a + prototype target, provided that you need matching by type (for + example, for autowiring). +

+

+ It is permissable to set the value of this property to + (which in any case is the default value). +

+
+ + The 'expected' of the result from evaluating the + property path. + +
+ + + 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? + + + + + + Set the name of the object in the object factory that created this object. + + +

+ The object name of this + + will be interpreted as "objectName.property" pattern, if neither the + + + have been supplied (set). +

+

+ This allows for concise object definitions with just an id or name. +

+
+ + The name of the object in the factory. + +
+ + + 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. + + + + + Resolves placeholder values in one or more object definitions. + + +

+ The default placeholder syntax follows the NAnt style: ${...}. + Instances of this class can be configured in the same way as any other + object in a Spring.NET container, and so custom placeholder prefix + and suffix values can be set via the + and properties. +

+ +

+ The following example XML context definition defines an object that has + a number of placeholders. The placeholders can easily be distinguished + by the presence of the ${} characters. +

+ + + + + + + + +

+ The associated XML configuration file for the above example containing the + values for the placeholders would contain a snippet such as .. +

+ + + + + + + + +

+ The preceding XML snippet listing the various property keys and their + associated values needs to be inserted into the .NET config file of + your application (or Web.config file for your ASP.NET web application, + as the case may be), like so... +

+ + + + + + + + +
+

+ + checks simple property values, lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. +

+ + + + + + + + +

+ In contrast to the + + class, this configurer only permits the replacement of explicit + placeholders in object definitions. Therefore, the original definition + cannot specify any default values for its object properties, and the + placeholder configuration file is expected to contain an entry for each + defined placeholder. That is, if an object definition contains a + placeholder ${foo}, there should be an associated + <add key="foo" value="..."/> entry in the + referenced placeholder configuration file. Default property values + can be defined via the inherited + + collection to overcome any perceived limitation of this feature. +

+

+ If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. If you want to resolve properties from multiple configuration + resources, simply specify multiple resources via the + + property. Finally, please note that you can also define multiple + + instances, each with their own custom placeholder syntax. +

+
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Initializes the new instance + + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Parse values recursively to be able to resolve cross-references between + placeholder values. + + + The map of constructor arguments / property values. + + The string to be resolved. + The placeholders that have already been visited + during the current resolution attempt (used to detect circular references + between placeholders). Only non-null if we're parsing a nested placeholder. + + If an error occurs. + + The resolved string. + + + + Resolve the given placeholder using the given name value collection, + performing an environment variables check according to the given mode. + + +

+ The default implementation delegates to + + before/afer the environment variable check. Subclasses can override + this for custom resolution strategies, including customized points + for the environment properties check. +

+
+ The placeholder to resolve + + The merged name value collection of this configurer. + + The environment variable mode. + + The resolved value or if none. + + +
+ + + Resolve the given placeholder using the given name value collection. + + +

+ This (the default) implementation simply looks up the value of the + supplied key. +

+

+ Subclasses can override this for customized placeholder-to-key + mappings or custom resolution strategies, possibly just using the + given name value collection as fallback. +

+
+ The placeholder to resolve. + + The merged name value collection of this configurer. + + The resolved value. +
+ + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Controls how environment variables will be used to + replace property placeholders. + + +

+ See the overview of the + + enumeration for the available options. +

+
+
+ + + Simple strategy interface for resolving a String value. + + + + + Resolve the given String value, for example parsing placeholders. + + the original String value + the resolved String value + + + + implementation that + retrieves a or non-static public property value. + + +

+ Typically used for retrieving public property values. +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + Template method that subclasses must override to construct the object + returned by this factory. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + The of the static property + to be retrieved. + + + + + Arguments for the property invocation. + + +

+ If this property is not set, or the value passed to the setter invocation + is a null or zero-length array, a property with no arguments is assumed. +

+
+
+ + + The name of the property the value of which is to be retrieved. + + +

+ Refers to either a property or a non-static property, + depending on a target object being set. +

+
+
+ + + The object instance on which the property is defined. + + + + + The on which the property is defined. + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + Implementation of that + resolves variable name against registry key. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, + strings are concatenated to a comma-separated list following + + + The variable value if able to resolve, null otherwise. + + + + + Gets or sets the registry key to obtain variable values from. + + + The registry key to obtain variable values from. + + + + + + implementation that allows for convenient registration of custom + IResource implementations. + + +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of IResources is required. +

+
+ Mark Pollack + + +
+ + + Registers custom IResource implementations. The supplied + is not used since IResourse implementations + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The IResource implementations, i.e. resource handlers, to register. + + +

+ The has the + contains the resource protocol name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + The value can be the fully qualified name of the IResource + implementation, a string, or + an actual of the IResource class + +

+
+
+ + + A convenience class to create a + given the resource base + name and assembly name. + + +

+ This is currently the preferred way of injecting resources into view + tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). + A GUI component (typically a Windows Form) is injected with + an instance, and can + then proceed to use the various GetXxx() methods on the + to retrieve images, + strings, custom resources, etc. +

+
+ Mark Pollack + + + +
+ + + Creates a . + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The root name of the resources. + + +

+ For example, the root name for the resource file named + "MyResource.en-US.resources" is "MyResource". +

+ + The namespace is also prefixed before the resource file name. + +
+
+ + + The string representation of the assembly that contains the resource. + + + + + The . + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to another object in this factory to be resolved at runtime. + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + +

+ This does not mark this object as being a reference to + another object in any parent factory. +

+
+ The name of the target object. +
+ + + Creates a new instance of the + + class. + + +

+ This variant constructor allows a client to specifiy whether or not + this object is a reference to another object in a parent factory. +

+
+ The name of the target object. + + Whether this object is an explicit reference to an object in a + parent factory. + +
+ + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Determines whether the specified RuntimeObjectReference is equal to the current RuntimeObjectReference. + + true if the specified RuntimeObjectReference is equal to the current RuntimeObjectReference; otherwise, false. + + + + Determines whether the specified System.Object is equal to the current RuntimeObjectReference. + + true if the specified RuntimeObjectReference is equal to the current RuntimeObjectReference; otherwise, false. + + + + Serves as a hash function for RuntimeObjectReference. + + A hash code for the currentRuntimeObjectReference. + + + + Return the target object name. + + + + + Is this is an explicit reference to an object in the parent + factory? + + + if this is an explicit reference to an + object in the parent factory. + + + + + Simple factory object for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target set. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + Configure all ISharedStateAware objects, delegating concrete handling to the list of . + + + + + Creates a new empty instance. + + + + + Creates a new preconfigured instance. + + + priority value affecting order of invocation of this processor. See interface. + + + + Iterates over configured list of s until + the first provider is found that
+ a) true == provider.CanProvideState( instance, name )
+ b) null != provider.GetSharedState( instance, name )
+
+
+ + + A NoOp for this processor + + + The new object instance. + + + The name of the object. + + + the original . + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Get/Set the (already ordererd!) list of instances. + + + If this list is not set, the containing object factory will automatically + be scanned for instances. + + + + + Implementation of that + resolves variable name against special folders (as defined by + enumeration). + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves specified special folder to its full path. + + + The name of the special folder to resolve. Should be one of the values + defined by the enumeration. + + + The folder path if able to resolve, null otherwise. + + + + + + implementation that allows for convenient registration of custom + type aliases. + + + Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of type aliases is required. +

+
+ Mark Pollack + + +
+ + + Registers any type aliases. The supplied + is not used since type aliases + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The type aliases to register. + + +

+ The has the + contains the alias name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + the value can be the fully qualified name of the type as a string or + an actual of the class that + being aliased. +

+
+
+ + + Holder for a typed value. + + +

+ Can be added to object definitions to explicitly specify + a target type for a value, + for example for collection + elements. +

+

+ This holder just stores the value and the target + . The actual conversion will be performed by + the surrounding object factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Bruno Baia (.NET) +
+ + + Creates a new instance of the + + class. + + + + + Initializes a new instance of the class. + + The value. + + + + Creates a new instance of the + + class. + + + The value that is to be converted. + + + The to convert to. + + + If the supplied is + . + + + + + Creates a new instance of the + + class. + + + The value that is to be converted. + + + The unresolved type to convert to. + + + If the supplied is a + or an empty string. + + + + + Determine the type to convert to, resolving it from a specified type name if necessary. + + The resolved type to convert to. + + + + The value that is to be converted. + + +

+ Obviously if the + + is the , no conversion + will actually be performed. +

+
+
+ + + The to convert to. + + + If the setter is supplied with a value. + + + + + The unresolved type to convert to. + + + If the setter is supplied with a value or an empty string. + + + + + Gets a value indicating whether this instance has target type. + + + true if this instance has target type; otherwise, false. + + + + + Provides methods for type-safe accessing s. + + Erich Eichinger + + + + Initialize a new instance of an + + The underlying to read values from. + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns an of 's type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + An of 's type that contains the value of the specified variable + or , if returns null. + + + + + Returns an of 's type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + An of 's type that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns or . + + A that contains the value of the specified variable + or , if returns null. + + + + + Resolves placeholder values in one or more object definitions + + + The placeholder syntax follows the NAnt style: ${...}. + Placeholders values are resolved against a list of + s. In case of multiple definitions + for the same property placeholder name, the first one in the + list is used. + Variable substitution is performed on simple property values, + lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. + + + + + + + + + + If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. + + Mark Pollack + + + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Create a new instance without any variable sources + + + + + Create a new instance and initialize with the given variable source + + + + + + Create a new instance and initialize with the given list of variable sources + + + + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Apply the property replacement using the specified s for all + object in the supplied + . + + + The + used by the application context. + + + If an error occured. + + + + + Sets the list of s that will be used to resolve placeholder names. + + A list of s. + + + + Sets that will be used to resolve placeholder names. + + A instance. + + + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + Initializes a new instance of the Location class. + + + + + + + Initializes a new instance of the Location class. + + + + + + Thrown when an + encounters an internal error, and its definitions are invalid. + + +

+ An example of a situation when this exception would be thrown is + in the case of an XML document containing object definitions being + malformed. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectDefinitionStoreException class. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Initializes a new instance of the class. + + + The description of the resource that the object definition came from + + The detail message (used as exception message as-is) + The root cause. (may be null + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The description of the resource associated with the object + + + + + The name of the object that trigger the exception. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Initializes a new instance of the ObjectDefinitionParsingException class. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The description of the resource that the object definition came from + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Initializes a new instance of the class. + + + The description of the resource that the object definition came from + + The detail message (used as exception message as-is) + The root cause. (may be null + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The description of the resource that the object definition came from + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Context that gets passed along an object definition reading process, + encapsulating all relevant configuraiton as well as state. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The resource. + + + + Gets the resource. + + The resource. + + + + Abstract superclass + that implements default object creation. + + +

+ Provides object creation, initialization and wiring, supporting + autowiring and constructor resolution. Handles runtime object + references, managed collections, and object destruction. +

+

+ The main template method to be implemented by subclasses is + , + used for autowiring by type. Note that this class does not implement object + definition registry capabilities + ( + does). +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Abstract superclass for + implementations. + + +

+ This class provides singleton / prototype determination, singleton caching, + object definition aliasing, + handling, and object definition merging for child object definitions. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Marker object to be temporarily registered in the singleton cache, + while instantiating an object (in order to be able to detect circular references). + + + + + Used as value in hashtable that keeps track of singleton names currently in the + process of being created. Would not be necessary if we created a case insensitive implementation of + ISet. + + + + + The instance for this class. + + + + + Cache of singleton objects created by s: FactoryObject name -> product + + + + + Disposable object instances: object name --> disposable instance + + + + + root object definitons: object name --> Root Object Definition + + + + + Whether to cache object metadata or rather reobtain it for every access + + + + + Names of object that have already been created at least once + + + + + Creates a new instance of the + class. + + +

+ This constructor implicitly creates an + + that treats the names of objects in this factory in a case-sensitive fashion. +

+

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + +
+ + + Creates a new instance of the + class. + + +

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

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + + + Any parent object factory; may be . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + In case of errors. + +
+ + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + In case of errors. + +
+ + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Create instance only - suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself, + nor throw an exception. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Does this object factory contain an object definition with the + supplied ? + + +

+ Does not consider any hierarchy this factory may participate in. + Invoked by + + when no cached singleton instance is found. +

+
+ + The name of the object to look for. + + + if this object factory contains an object + definition with the supplied . + +
+ + + Adds the supplied (object) to this factory's + singleton cache. + + +

+ To be called for eager registration of singletons, e.g. to be able to + resolve circular references. +

+ + If a singleton has already been registered under the same name as + the supplied , then the old singleton will + be replaced. + +
+ The name of the object. + The singleton object. + + If the argument is + or consists wholly of whitespace characters; or if the + is . + +
+ + + Return the object name, stripping out the factory dereference prefix if + necessary, and resolving aliases to canonical names. + + + The transformed name of the object. + + + + + Ensures, that the given name is prefixed with + if it incidentially already starts with this prefix. This avoids troubles when dereferencing + the object name during + + + + + Determines whether the specified name is defined as an alias as opposed + to the name of an actual object definition. + + The object name to check. + + true if the specified name is alias; otherwise, false. + + + + + Return a , + even by traversing parent if the parameter is a child definition. + + + The name of the object. + + + Are ancestors to be included in the merge? + + +

+ Will ask the parent object factory if not found in this instance. +

+
+ + A merged + with overridden properties. + +
+ + + Return a , + even by traversing parent if the parameter is a child definition. + + The name. + The od. + + A merged + with overridden properties. + + + + + Return a , + even by traversing parent if the parameter is a child definition. + + + A merged + with overridden properties. + + + + + Gets the merged local object definition. + + Name of the object. + + Merged RootBeanDefinition, traversing the parent bean definition + if the specified bean corresponds to a child bean definition. + + + + + Determines whether the metadata for the specified object name is eligible for caching. + + Name of the bean. + + true if [is object eligible for metadata caching] [the specified bean name]; otherwise, false. + + + + + Creates the root object definition. + + The template definition to base root definition on. + Root object definition. + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Gets the type for the given FactoryObject. + + The factory object instance to check. + the FactoryObject's object type + + + + Gets the object type for the given FactoryObject definition, as far as possible. + Only called if there is no singleton instance registered for the target object already. + + + The default implementation creates the FactoryObject via GetObject + to call its ObjectType property. Subclasses are encouraged to optimize + this, typically by just instantiating the FactoryObject but not populating it yet, + trying whether its ObjectType property already returns a type. + If no type found, a full FactoryObject creation as performed by this implementation + should be used as fallback. + + Name of the object. + The merged object definition for the object. + The type for the object if determinable, or null otherwise + + + + Predict the eventual object type (of the processed object instance) for the + specified object. + + + Does not need to handle FactoryObjects specifically, since it is only + supposed to operate on the raw object type. + This implementation is simplistic in that it is not able to + handle factory methods and InstantiationAwareBeanPostProcessors. + It only predicts the object type correctly for a standard object. + To be overridden in subclasses, applying more sophisticated type detection. + + Name of the object. + The merged object definition to determine the type for. May be null + The type of the object, or null if not predictable + + + + Get the object for the given object instance, either the object + instance itself or its created object in case of an + . + + The object instance. + + The name that may include the factory dereference prefix (=the requested name). + + + The canonical object name + + the merged object definition + + The singleton instance of the object. + + + + + Obtain an object to expose from the given IFactoryObject. + + The IFactoryObject instance. + Name of the object. + The merged object definition. + The object obtained from the IFactoryObject + If IFactoryObject object creation failed. + + + + Post-process the given object that has been obtained from the FactoryObject. + The resulting object will be exposed for object references. + + The default implementation simply returns the given object + as-is. Subclasses may override this, for example, to apply + post-processors. + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Convenience method to pull an + from this factory. + + + The name of the factory object to be retrieved. If this name is not a valid + name, it will be converted + into one. + + + The associated with the + supplied . + + + + + Is the supplied a factory object dereference? + + + + + Determines whether the type of the given object definition matches the + specified target type. + + Allows for lazy load of the actual object type, provided that the + type match can be determined otherwise. + The default implementation simply delegates to the standard + ResolveObjectType method. Subclasses may override this to use + a differnt strategy. + + Name of the object (for error handling purposes). + The merged object definition to determine the type for. + Type to match against (never null). + + true if object definition matches tye specified target type; otherwise, false. + + if we failed to load the type." + + + + Resolves the type of the object for the specified object definition resolving + an object type name to a Type (if necessary) and storing the resolved Type + in the object definition for further use. + + The merged object definition to dertermine the type for. + Name of the object (for error handling purposes). + + + + + Is the object (definition) with the supplied an + ? + + The name of the object to be checked. + + the object (definition) with the supplied + an ? + + + + + Remove the object identified by the supplied + from this factory's singleton cache. + + + The name of the object that is to be removed from the singleton + cache. + + + If the argument is or + consists wholly of whitespace characters. + + + + + Return the names of objects in the singleton cache that match the given + object type (including subclasses). + + + The class or interface to match, or for all object names. + + +

+ Will not consider s + as the type of their created objects is not known before instantiation. +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of objects in the singleton cache that match the given + object type (including subclasses), or an empty array if none. + +
+ + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical instance name. + Will ask the parent factory if the instance cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical instance name. + Will ask the parent factory if the instance cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines the of the object with the + supplied . + + +

+ More specifically, checks the of object that + would return. + For an , returns the + of object that the + creates. +

+

+ Please note that (prototype) objects created via a factory method or + objects are handled + slightly differently, in that we don't want to needlessly create + instances of such objects just to determine the + of object that they create. +

+
+ The name of the object to query. + + The of the object or + if not determinable. + +
+ + + Determines the of the object defined + by the supplied object . + + +

+ This, the default, implementation returns + to indicate that the type cannot be determined. Subclasses are + encouraged to try to determine the actual return + here, matching their strategy of resolving + factory methods in the + Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject + implementation. +

+
+ + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + +
+ + + Returns the names of the objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The names of the objects in the singleton cache. +
+ + + Returns the number of objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The number of objects in the singleton cache. +
+ + + Destroys the named singleton object. + + +

+ Delegates to + + if a corresponding singleton instance is found. +

+
+ + The name of the singleton object that is to be destroyed. + + +
+ + + Check the supplied merged object definition for any possible + validation errors. + + + The object definition to be checked for validation errors. + + + The name of the object associated with the supplied object definition. + + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + + In the case of object validation errors. + + + + + Parent object factory, for object inheritance support + + + + + Dependency types to ignore on dependency check and autowire, as Set of + Type objects: for example, string. Default is none. + + + + + ObjectPostProcessors to apply in CreateObject + + + + + String Resolver applied to Autowired value injections + + + + + Indicates whether any IInstantiationAwareBeanPostProcessors have been registered + + + + + Indicates whether any IDestructionAwareBeanPostProcessors have been registered + + + + + Set of registered singletons, containing the instance names in registration order + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + Determines whether the local object factory contains a instance of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Is this object a singleton? + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Does this object factory or one of its parent factories contain an object with the given name? + + + This method scans the object factory hierarchy starting with the current factory instance upwards. + Use if you want to explicitely check just this object factory instance. + + . + + + + Return the aliases for the given object name, if defined. + + . + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name, + optionally injecting dependencies. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + whether to inject dependencies or not. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + + Requireses the destruction. + + The instance to check. + The corresponding instance definition. + + Boolean indicating whether destruction is required. + + + + + Checks, if the passed instance is of the required type. + + the name of the object + the actual instance + the type contract the given instance must adhere. + the object instance passed in via (for more fluent usage) + + if is null or not assignable to . + + + + + Creates a singleton instance for the specified object name and definition. + + + The object name (will be used as the key in the singleton cache key). + + The object definition. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The created object instance. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + + + + Destroy all cached singletons in this factory. + + + + + Ignore the given dependency type for autowiring + + . + + + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a String resolver for embedded values such as annotation attributes. + + the String resolver to apply to embedded values + + + + Resolve the given embedded value, e.g. an annotation attribute. + + the value to resolve + the resolved value (may be the original value as-is) + + + + Add a new + that will get applied to objects created by this factory. + + + The + to register. + + . + + + + Given an object name, create an alias. + + . + + + + Register the given custom + for all properties of the given . + + . + + + + Register the given existing object as singleton in the object factory, + under the given object name. + + . + + + + Does this object factory contains a singleton instance with the + supplied ? + + + + + + Tries to find a cached object for the specified name. + + Teh object name to look for. + The cached object if found, otherwise. + + + + Registers the disposable object. + + Name of the instance. + The instance. + Add the given instance to the list of disposable beans in this registry. + Disposable beans usually correspond to registered singletons, + matching the instance name but potentially being a different instance + (for example, a DisposableBean adapter for a singleton that does not + naturally implement ). + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + Name of the object to check. + + true if is object name in use; otherwise, false. + + + + + Gets the singleton lock for a given object name. + + Name of the object. + lock object + + + + Returns, whether this factory treats object names case sensitive or not. + + + + + Gets the of + s + that will be applied to objects created by this factory. + + + + + Gets the set of classes that will be ignored for autowiring. + + +

+ The elements of this are + s. +

+
+
+ + + Returns, whether this object factory instance contains objects. + + + + + Returns, whether this object factory instance contains objects. + + + + + Gets the temporary object that is placed + into the singleton cache during object resolution. + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + The parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Returns the current number of registered + s. + + + The current number of registered + s. + + . + + + + Gets the names of singleton objects registered in this registry. + + The list of names as String array (never null). + + + Only checks already instantiated singletons; does not return names + for singleton instance definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + + + + + + + Gets the number of singleton beans registered in this registry. + + The number of singleton objects. + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + + + + + + + Makes a distinction between sort order and object identity. + This is important when used with , since most + implementations assume Order == Identity + + + + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + The used during the invocation and + searching for of methods. + + + + + The instance for this class. + + + + + Creates a new instance of the + + class. + + +

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

+
+ Flag specifying whether to make this object factory case sensitive or not. +
+ + + Creates a new instance of the + + class. + + +

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

+
+ Flag specifying whether to make this object factory case sensitive or not. + The parent object factory, or if none. +
+ + + Predict the eventual object type (of the processed object instance) for the + specified object. + + Name of the object. + The merged object definition to determine the type for. May be null + + The type of the object, or null if not predictable + + + + + Determines the of the object defined + by the supplied object . + + + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + + + Apply any + s. + + +

+ The returned instance may be a wrapper around the original. +

+
+ + The of the object that is to be + instantiated. + + + The name of the object that is to be instantiated. + + + An instance to use in place of the original instance. + + + In case of errors. + +
+ + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + + + + Apply the given property values, resolving any runtime references + to other objects in this object factory. + + + The object name passed for better exception information. + + + The definition of the named object. + + + The wrapping the target object. + + + The new property values. + + +

+ Must use deep copy, so that we don't permanently modify this property. +

+
+
+ + + Create the value resolver strategy to use for resolving raw property values + + + + + Return an array of object-type property names that are unsatisfied. + + +

+ These are probably unsatisfied references to other objects in the + factory. Does not include simple properties like primitives or + s. +

+
+ + An array of object-type property names that are unsatisfied. + + + The definition of the named object. + + + The wrapping the target object. + +
+ + + Destroy all cached singletons in this factory. + + +

+ To be called on shutdown of a factory. +

+
+
+ + + Populate the object instance in the given + with the property values from the + object definition. + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Wires up any exposed events in the object instance in the given + with any event handler + values from the . + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Fills in any missing property values with references to + other objects in this factory if autowire is set to + . + + + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + + + + + Defines "autowire by type" (object properties by type) behavior. + + +

+ This is like PicoContainer default, in which there must be exactly one object + of the property type in the object factory. This makes object factories simple + to configure for small namespaces, but doesn't work as well as standard Spring + behavior for bigger applications. +

+
+ + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + +
+ + + Ignore the given dependency type for autowiring + + + This will typically be used by application contexts to register + dependencies that are resolved in other ways, like IOjbectFactory through + IObjectFactoryAware or IApplicationContext through IApplicationContextAware. + By default, IObjectFactoryAware and IObjectName interfaces are ignored. + For further types to ignore, invoke this method for each type. + + . + + + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Add the created, but yet unpopulated singleton to the singleton cache + to be able to resolve circular references + + the name of the object to add to the cache. + the definition used to create and populated the object. + the raw object instance. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Remove the specified singleton from the singleton cache that has + been added before by a call to + + the name of the object to remove from the cache. + the definition used to create and populated the object. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Creates an instance from the passed in + using constructor + + The name of the object to create - used for error messages. + The describing the object to be created. + optional arguments to pass to the constructor + An wrapping the already instantiated object + + + + Instantiates the given object using its default constructor + + Name of the object. + The definition. + IObjectWrapper for the new instance + + + + Determines candidate constructors to use for the given object, checking all registered + + + Raw type of the object. + Name of the object. + the candidate constructors, or null if none specified + In case of errors + + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + "autowire constructor" (with constructor arguments by type) behaviour. + + The name of the object to autowire by type. + The object definition to update through autowiring. + The chosen candidate constructors. + The argument values passed in programmatically via the GetObject method, + or null if none (-> use constructor argument values from object definition) + + An for the new instance. + + + + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: in this mode, a Spring.NET + object factory is able to host components that expect constructor-based + dependency resolution. + + + + + + Perform a dependency check that all properties exposed have been set, if desired. + + +

+ Dependency checks can be objects (collaborating objects), simple (primitives + and ), or all (both). +

+
+ + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + The property values to be checked. + + + If all of the checked dependencies were not satisfied. + +
+ + + Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding + ignored dependency types. + + The object wrapper the object was created with. + The filtered PropertyInfos + + + + Determine whether the given bean property is excluded from dependency checks. + This implementation excludes properties whose type matches an ignored dependency type + or which are defined by an ignored dependency interface. + + + + the of the object property + whether the object property is excluded + + + + Give an object a chance to react now all its properties are set, + and a chance to know about its owning object factory (this object). + + +

+ This means checking whether the object implements + and / or + , and invoking the + necessary callback(s) if it does. +

+

+ Custom init methods are resolved in a case-insensitive manner. +

+
+ + The new object instance we may need to initialise. + + + The name the object has in the factory. Used for logging output. + + + The definition of the target object instance. + +
+ + + Invoke the specified custom destroy method on the given object. + + +

+ This implementation invokes a no-arg method if found, else checking + for a method with a single boolean argument (passing in "true", + assuming a "force" parameter), else logging an error. +

+

+ Can be overridden in subclasses for custom resolution of destroy + methods with arguments. +

+

+ Custom destroy methods are resolved in a case-insensitive manner. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself. + Should not throw any exceptions. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Destroys all of the objects registered as dependant on the + object (definition) identified by the supplied . + + + The name of the root object (definition) that is itself being destroyed. + + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + Find object instances that match the required . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The of the objects to look up. + + + An of object names and object + instances that match the required , or + if none are found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + Called by DestroyObject, to be able to destroy depending objects first. + + + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Configures object instance by injecting dependencies, satisfying Spring lifecycle + interfaces and applying object post-processors. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + A wrapped object instance that is to be so configured. + + + + + + Applies the PostProcessAfterInitialization callback of all + registered IObjectPostProcessors, giving them a chance to post-process + the object obtained from IFactoryObjects (for example, to auto-proxy them) + + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + If the supplied is not one of the + or + + values. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Cache of filtered PropertyInfos: object Type -> PropertyInfo array + + + + + Dependency interfaces to ignore on dependency check and autowire, as Set of + Class objects. By default, only the IObjectFactoryAware and IObjectNameAware + interfaces are ignored. + + + + + The + implementation to be used to instantiate managed objects. + + + + + An + implementation that provides some convenience support for + derived classes. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Permits the (re)implementation of an arbitrary method on a Spring.NET + IoC container managed object. + + +

+ Encapsulates the notion of the Method-Injection form of Dependency + Injection. +

+

+ Methods that are dependency injected with implementations of this + interface may be (but need not be) , in which + case the container will create a concrete subclass of the + class prior to instantiation. +

+

+ Do not use this mechanism as a means of AOP. See the reference + manual for examples of appropriate usages of this interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Reimplement the supplied . + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the (re)implementation of the method call. + + + + + Creates a new instance of the + + class. + + +

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

+
+ + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + +
+ + + Is ; derived classes must supply an implementation. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + The result of the object lookup. + + + + Helper method for subclasses to retrieve the appropriate + for the + supplied . + + + The to use to retrieve + the appropriate + . + + + The appropriate + . + + + + + Helper method for subclasses to lookup an object from an enclosing + IoC container. + + + The name of the object that is to be looked up. + + + The named object. + + + + + Abstract base class for object definition readers. + + +

+ Provides common properties like the object registry to work on. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Simple interface for object definition readers. + + Juergen Hoeller + Rick Evans + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The against which any class names + will be resolved into instances. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + Gets the resource loader to use for resource locations. + + There is also a method + available for loading object definitions from a resource location. This is + a convenience to avoid explicit ResourceLoader handling. + The resource loader. + + + + The instance for this class (and derived classes). + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + The against which any class names + will be resolved into instances. + + +

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

+
+
+ + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + + The against which any class names + will be resolved into instances. + + + + + Gets or sets the resource loader to use for resource locations. + + The resource loader. + + + + Qualifier for resolving autowire candidates. A bean definition that + includes one or more such qualifiers enables fine-grained matching + against annotations on a field or parameter to be autowired. + + + + + Construct a qualifier to match against an annotation of the + given type. + + type the annotation type + + + + Construct a qualifier to match against an annotation of the + given type name. +

The type name may match the fully-qualified class name of + the annotation or the short class name (without the package).

+
+ the name of the annotation type +
+ + + Construct a qualifier to match against an annotation of the + given type whose value attribute also matches + the specified value. + + the annotation type + the annotation value to match + + + + Construct a qualifier to match against an annotation of the + given type name whose value attribute also matches + the specified value. +

The type name may match the fully-qualified class name of + the annotation or the short class name (without the package).

+
+ the name of the annotation type + the annotation value to match +
+ + + Retrieve the type name. This value will be the same as the + type name provided to the constructor or the fully-qualified + class name if a Class instance was provided to the constructor. + + + + + Utility class that contains various methods useful for the implementation of + autowire-capable object factories. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the AutowireUtils class. + + +

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

+
+
+ + + Gets those s + that are applicable for autowiring the supplied . + + + The + (definition) that is being autowired by constructor. + + + The absolute minimum number of arguments that any returned constructor + must have. If this parameter is equal to zero (0), then all constructors + are valid (regardless of their argument count), including any default + constructor. + + + Those s + that are applicable for autowiring the supplied . + + + + + Determine a weight that represents the class hierarchy difference between types and + arguments. + + +

+ A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase + the result - all direct matches means weight zero (0). A match between the argument type + and a MyInteger instance argument would increase the weight by + 1, due to the superclass () being one (1) steps up in the + class hierarchy being the last one that still matches the required type. +

+

+ Therefore, with an argument of type , a + constructor taking a argument would be + preferred to a constructor taking an argument + which would be preferred to a constructor taking an + argument which would in turn be preferred + to a constructor taking an argument. +

+

+ All argument weights get accumulated. +

+
+ + The argument s to match. + + The arguments to match. + The accumulated weight for all arguments. +
+ + + Algorithm that judges the match between the declared parameter types of a candidate method + and a specific list of arguments that this method is supposed to be invoked with. + + + Determines a weight that represents the class hierarchy difference between types and + arguments. The following a an example based on the Java class hierarchy for Integer. + A direct match, i.e. type Integer -> arg of class Integer, does not increase + the result - all direct matches means weight 0. A match between type Object and arg of + class Integer would increase the weight by 2, due to the superclass 2 steps up in the + hierarchy (i.e. Object) being the last one that still matches the required type Object. + Type Number and class Integer would increase the weight by 1 accordingly, due to the + superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. + Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a + constructor (Number) which would in turn be preferred to a constructor (Object). + All argument weights get accumulated. + + The param types. + The args. + + + + + Determines whether the given object property is excluded from dependency checks. + + The PropertyInfo of the object property. + + true if is excluded from dependency check; otherwise, false. + + + + + Sorts the supplied , preferring + public constructors and "greedy" ones (that have lots of arguments). + + +

+ The result will contain public constructors first, with a decreasing number + of arguments, then non-public constructors, again with a decreasing number + of arguments. +

+
+ + The array to be sorted. + +
+ + + Determines whether the setter property is defined in any of the given interfaces. + + The PropertyInfo of the object property + The ISet of interfaces. + + true if setter property is defined in interface; otherwise, false. + + + + + Creates the autowire candidate resolver. + + A SimpleAutowireCandidateResolver + + + + Returns the list of that are not satisfied by . + + the filtered list. Is never null + + + + Object definition for definitions that inherit settings from their + parent (object definition). + + +

+ Will use the + of the parent object definition if none is specified, but can also + override it. In the latter case, the child's + + must be compatible with the parent, i.e. accept the parent's property values + and constructor argument values (if any). +

+

+ A will + inherit all of the , + , and + from it's parent + object definition, with the option to add new values. If the + , + , + and / or + + properties are specified, they will override the corresponding parent settings. +

+

+ The remaining settings will always be taken from the child definition: + , + , + , + , + and + +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + + class. + + + The name of the parent object. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The class of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The of the object to + instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Validate this object definition. + + +

+ A common cause of validation failures is a missing value for the + + property; by + their very nature require that the + + be set. +

+
+ + In the case of a validation failure. + +
+ + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Helper class for resolving constructors and factory methods. + Performs constructor resolution through argument matching. + + + Operates on a and an . + Used by . + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for the given factory + and instantiation strategy. + + The object factory to work with. + The object factory as IAutowireCapableObjectFactory. + The instantiation strategy for creating objects. + the resolver to resolve property value placeholders if any + + + + "autowire constructor" (with constructor arguments by type) behavior. + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: In this mode, a Spring + object factory is able to host components that expect constructor-based + dependency resolution. + + Name of the object. + The merged object definition for the object. + The chosen chosen candidate constructors (or null if none). + The explicit argument values passed in programmatically via the getBean method, + or null if none (-> use constructor argument values from object definition) + An IObjectWrapper for the new instance + + + + Gets the constructor instantiation info given the object definition. + + Name of the object. + The RootObjectDefinition + The explicitly chosen ctors. + The explicit chose ctor args. + A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or + one based on type matching. + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + Create an array of arguments to invoke a constructor or static factory method, + given the resolved constructor arguments values. + + When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain + information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using + exceptions for flow control as in the original implementation. + + + + Resolves the + of the supplied . + + The name of the object that is being resolved by this factory. + The rod. + The wrapper. + The cargs. + Where the resolved constructor arguments will be placed. + + The minimum number of arguments that any constructor for the supplied + must have. + + +

+ 'Resolve' can be taken to mean that all of the s + constructor arguments is resolved into a concrete object that can be plugged + into one of the s constructors. Runtime object + references to other objects in this (or a parent) factory are resolved, + type conversion is performed, etc. +

+

+ These resolved values are plugged into the supplied + object, because we wouldn't want to touch + the s constructor arguments in case it (or any of + its constructor arguments) is a prototype object definition. +

+

+ This method is also used for handling invocations of static factory methods. +

+
+
+ + + Returns an array of all of those + methods exposed on the + that match the supplied criteria. + + + Methods that have this name (can be in the form of a regular expression). + + + Methods that have exactly this many arguments. + + + Methods that are static / instance. + + + The on which the methods (if any) are to be found. + + + An array of all of those + methods exposed on the + that match the supplied criteria. + + + + + Concrete implementation of the + and + + interfaces. + + +

+ This class is a full-fledged object factory based on object definitions + that is usable straight out of the box. +

+

+ Can be used as an object factory in and of itself, or as a superclass + for custom object factory implementations. Note that readers for + specific object definition formats are typically implemented separately + rather than as object factory subclasses. +

+

+ For an alternative implementation of the + interface, + have a look at the + + class, which manages existing object instances rather than creating new + ones based on object definitions. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + + + + Creates a new instance of the + class. + + The parent object factory. + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory. + + + + Find object instances that match the . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The type of the objects to look up. + + + An of object names and object + instances that match the , or + if none is found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + + +

+ Called by the + + so that dependant objects are able to be disposed of first. +

+
+ + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + +
+ + + Check whether the specified object matches the supplied . + + The name of the object to check. + + The to check for. + + + if the object matches the supplied , + or if the supplied is . + + + + + The instance for this class. + + + + + The mapping of object definition objects, keyed by object name. + + + + + List of object definition names, in registration order. + + + + + Resolver to use for checking if an object definition is an autowire candidate + + + + + IDictionary from dependency type to corresponding autowired value + + + + + Check if this registry contains a object definition with the given + name. + + + The name of the object to look for. + + + if this object factory contains an object + definition with the given name. + + + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + + If one of the singleton objects could not be created. + + + + + + Register a special dependency type with corresponding autowired value. + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the IObjectFactory interface itself. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. Respects any Parent-Child hierarchy the factory is participating in. + + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Check whether the specified bean would need to be eagerly initialized + in order to determine its type. + + a factory-bean reference that the bean definition defines a factory method for + whether eager initialization is necessary + + + + Check whether the given bean is defined as a . + + the name of the object + the corresponding object definition + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Determine the primary autowire candidate in the given set of beans. + + a Map of candidate names and candidate instances + that match the required type + the target dependency to match against + the name of the primary candidate, or null if none found + + + + Return whether the object definition for the given object name has been + marked as a primary object. + + the name of the bean + the corresponding bean instance + whether the given bean qualifies as primary + + + + Determine whether the given candidate name matches the bean name or the aliases + stored in this bean definition. + + + + + Raises the no such object definition exception for an unresolvable dependency + + The type. + The dependency description. + The descriptor. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + Determine whether the specified object definition qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + + Name of the object definition to check. + The merged object definiton to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + + + + Should object definitions registered under the same name as an + existing object definition be allowed? + + +

+ If , then the new object definition will + replace (override) the existing object definition. If + , an exception will be thrown when + an attempt is made to register an object definition under the same + name as an already existing object definition. +

+

+ The default is . +

+
+ + is the registration of an object definition + under the same name as an existing object definition is allowed. + +
+ + + Get or set custom autowire candidate resolver for this IObjectFactory to use + when deciding whether a bean definition should be considered as a + candidate for autowiring. Never null + + + + + Return the number of objects defined in this registry. + + + The number of objects defined in this registry. + + + + + + Default implementation of the + + interface. + + +

+ Does not support per + loading. +

+
+ Aleksandar Seovic +
+ + + Central interface for factories that can create + + instances. + + +

+ Allows for replaceable object definition factories using the Strategy + pattern. +

+
+ Aleksandar Seovic +
+ + + Factory style method for getting concrete + + instances. + + + The FullName of the of the defined object. + + The name of the parent object definition (if any). + + The against which any class names + will be resolved into instances. It can be null to register the + object class just by name. + + + An + + instance. + + + + + Factory style method for getting concrete + + instances. + + /// If no parent is specified, a RootObjectDefinition is created, otherwise a + ChildObjectDefinition. + The of the defined object. + The name of the parent object definition (if any). + The against which any class names + will be resolved into instances. + + An + + instance. + + + + + Default implementation of the interface, deleagting to + 's GenerateObjectName. + + Note that this implementation is only able to handle + subclasses such as + and + + Juergen Hoeller + Mark Pollack (.NET) + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + Convenience implementation of the interface that + delegates to an arbitrary object + method to perform the object construction. + + + + Because this implementation requires a delegate + passed to its ctor, its only possible to configure this object and register + it with the via code rather than via XML. + + + + + + + Initializes a new instance of the class. + + The builder delegate. + if set to true [is singleton]. + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + If this method is being called in the context of an enclosing IoC container and + returns , the IoC container will consider this factory + object as not being fully initialized and throw a corresponding (and most + probably fatal) exception. + + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + 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? + + + + + An + implementation that delegates to an + that is + obtained as the result of a lookup in an associated IoC container. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by delegating to + another + looked up in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the delegated call to the looked up + . + + + + + The various modes of dependency checking. + + Rick Evans (.NET) + + + + DO not do any dependency checking. + + + + + Check object references. + + + + + Just check primitive (string, int, etc) values. + + + + + Check everything. + + + + + Create a new DisposableBeanAdapter for the given bean. + + The bean instance (never null). + Name of the bean. + The merged bean definition. + the List of BeanPostProcessors (potentially IDestructionAwareBeanPostProcessor), if any. + + + + Search for all s in the List. + + The List to search. + the filtered List of IDestructionAwareObjectPostProcessors. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Invokes the custom destroy method. + + The custom destroy method. + Invoke the specified custom destroy method on the given bean. + This implementation invokes a no-arg method if found, else checking + for a method with a single boolean argument (passing in "true", + assuming a "force" parameter), else logging an error. + + + + Responsible for creating instances corresponding to a + . + + Rod Johnson + Rick Evans (.NET) + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Represents an override of a method that looks up an object in the same IoC context. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Represents the override of a method on a managed object by the IoC container. + + +

+ Note that the override mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + +

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

+
+ + The name of the method that is to be overridden. + + + If the supplied is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + +

+ By 'match' one means does this particular + + instance apply to the supplied ? +

+

+ This allows for argument list checking as well as method name checking. +

+
+ The method to be checked. + + if this override matches the supplied + . + +
+ + + The name of the method that is to be overridden. + + + + + Is the method that is ot be injected + () + to be considered as overloaded? + + +

+ If (the default), then argument type matching + will be performed (because one would not want to override the wrong + method). +

+

+ Setting the value of this property to can be used + to optimize runtime performance (ever so slightly). +

+
+
+ + + Creates a new instance of the + class. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ + The name of the method that is to be overridden. + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + If either of the supplied arguments is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + + + An + implementation that simply returns the result of a lookup in an + associated IoC container. + + +

+ This class is Spring.NET's implementation of Dependency Lookup via + Method Injection. +

+

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by returning the + result of an object lookup in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the object lookup. + + + + + An + implementation that supports method injection. + + +

+ Classes that want to take advantage of method injection must meet some + stringent criteria. Every method that is to be method injected + must be defined as either or + . An + will be thrown if these criteria are not met. +

+
+ Rick Evans +
+ + + Simple object instantiation strategy for use in + implementations. + + +

+ Does not support method injection, although it provides hooks for subclasses + to override to add method injection support, for example by overriding methods. +

+
+ Rod Johnson + Rick Evans (.NET) + +
+ + + The shared instance for this class (and derived classes). + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type does not have a zero-arg constructor. + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use a no-arg constructor. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be a + or zero length string if we're autowiring an object that + doesn't belong to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + +
+ + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use the supplied + and attendant . +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + +
+ + + The name of the dynamic assembly that holds dynamically created code + + + + + A cache of generated instances, keyed on + the object name for which the was generated. + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ This method dynamically generates a subclass that supports method + injection for the supplied . It then + instantiates an new instance of said type using the constructor + identified by the supplied , + passing the supplied to said + constructor. It then manually injects (generic) method replacement + and method lookup instances (of + ) into + the new instance: those methods that are 'method-injected' will + then delegate to the approriate + + instance to effect the actual method injection. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The parameter s to use to find the + appropriate constructor to invoke. + + + The aguments that are to be passed to the appropriate constructor + when the object is being instantiated. + + + A new instance of the defined by the + supplied . + +
+ + + A factory that generates subclasses of those + classes that have been configured for the Method-Injection form of + Dependency Injection. + + +

+ This class is designed as for one-shot usage; i.e. it must + be used to generate exactly one method injected subclass and + then discarded (it maintains state in instance fields). +

+
+
+ + + The name of the generated + property (for method replacement). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + The name of the generated + property (for method lookup). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + Creates a new instance of the + class. + + + The in which + the generated is to be defined. + + + The object definition that is the target of the method injection. + + + If either of the supplied arguments is . + + + + + Builds a suitable for Method-Injection. + + + A suitable for Method-Injection. + + + + + Defines overrides for those methods that are configured with an appropriate + . + + + The overarching that is defining + the generated . + + + + + Override the supplied with the logic + encapsulated by the + + defined by the supplied . + + + The builder for the subclass that is being generated. + + + The method on the superclass that is to be overridden. + + + The field defining the + + that the overridden method will delegate to to do the 'actual' + method injection logic. + + + + + Generates the MSIL for actually returning a return value if the + supplied is not + . + + + The definition of the return value; if , it + means that no return value is to required (a void + return type). + + + The to emit + the MSIL to. + + + + + Generates the MSIL for a return value if the supplied + returns a value. + + + The method to be checked. + + + The to emit + the MSIL to. + + + The return value, or if the method does not + return a value (has a void return type). + + + + + Pushes (sets up) the arguments for a call to the + + method of an appropriate + . + + + The parameters to the original method (will be bundled + up into a generic object[] and passed as the third + argument to the + + invocation. + + + The to emit + the MSIL to. + + + + + Simply generates the IL for a write only property for the + . + + + The in which the property is defined. + + + The name of the (to be) generated property. + + + The (instance) field that the property is to 'set'. + + + + + A collection (with set semantics) of method overrides, determining which, if any, + methods on a managed object the Spring.NET IoC container will override at runtime. + + Rod Johnson + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ Deep copy constructoe. +

+
+ + The instance supplying initial overrides for this new instance. + +
+ + + Copy all given method overrides into this object. + + + The overrides to be copied into this object. + + + + + Adds the supplied to the overrides contained + within this instance. + + + The to be + added. + + + + + Adds the supplied to the overloaded method names + contained within this instance. + + + The overloaded method name to be added. + + + + + Returns true if the supplied is present within + the overloaded method names contained within this instance. + + + The overloaded method name to be checked. + + + True if the supplied is present within + the overloaded method names contained within this instance. + + + + + Return the override for the given method, if any. + + + The method to check for overrides for. + + + the override for the given method, if any. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + The collection of method overrides. + + + + + Returns true if this instance contains no overrides. + + + + + Programmatic means of constructing a using the builder pattern. Intended primarily + for use when implementing custom namespace parsers. + + Set methods are used instead of properties, so that chaining of methods can be used to create + 'one-liner'definitions that set multiple properties at one. + Rod Johnson + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class, private + to force use of factory methods. + + + + + Creates a new used to construct a . + + + + + Creates a new used to construct a . + + the of the object that the definition is being created for + + + + Creates a new used to construct a . + + the name of the of the object that the definition is being created for + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + The type name of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Name of the object type. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a child object definition.. + + The object definition factory. + Name of the parent object. + + + + + Adds the property value under the given name. + + The name. + The value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the specified object name under the property specified. + + The name. + Name of the object. + The current ObjectDefinitionBuilder. + + + + Adds an index constructor arg value. The current index is tracked internally and all addtions are + at the present point + + The constructor arg value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the named object as a constructor argument. + + Name of the object. + + + + + Sets the name of the factory method to use for this definition. + + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the factory object to use for this definition. + + The factory object. + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets whether or not this definition describes a singleton object. + + if set to true [singleton]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects or not this definition is abstract. + + if set to true [flag]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects for this definition should be lazily initialized or not. + + if set to true [lazy]. + The current ObjectDefinitionBuilder. + + + + Sets the autowire mode for this definition. + + The autowire mode. + The current ObjectDefinitionBuilder. + + + + Sets the autowire candidate value for this definition. + + The autowire candidate value + + + + + Sets the primary value for this definition. + + If object is primary + + + + + Sets the dependency check mode for this definition. + + The dependency check. + The current ObjectDefinitionBuilder. + + + + Sets the name of the destroy method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the init method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the resource description for this definition. + + The resource description. + The current ObjectDefinitionBuilder. + + + + Adds the specified object name to the list of objects that this definition depends on. + + Name of the object. + The current ObjectDefinitionBuilder. + + + + Gets the current object definition in its raw (unvalidated) form. + + The raw object definition. + + + + Validate and gets the object definition. + + The object definition. + + + + Utility methods that are useful for + + implementations. + + Juergen Hoeller + Rick Evans (.NET) + + + + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Registers the supplied with the + supplied . + + +

+ This is a convenience method that registers the + + of the supplied under the + + property value of said . If the + supplied has any + , + then those aliases will also be registered with the supplied + . +

+
+ + The object definition holder containing the + that + is to be registered. + + + The registry that the supplied + is to be registered with. + + + If either of the supplied arguments is . + + + If the could not be registered + with the . + +
+ + + Generates an object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied . + + The + that requires a generated name. + The + + that the supplied is to be + registered with (needed so that the uniqueness of any generated + name can be guaranteed). + if set to true if the given object + definition will be registed as an inner object or as a top level objener objects + verses top level objects. + + An object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied and + never . + + + If either of the or + arguments is . + + + If a unique name cannot be generated. + + + + + Generates the name of the object for a top-level object definition unique within the given object factory. + + The object definition to generate an object name for. + The registry to check for existing names. + The generated object name + if no unique name can be generated for the given + object definition + + + + Factory method for getting concrete + instances. + + + The name of the event handler method. This may be straight text, a regular + expression, , or empty. + + + The name of the event being wired. This too may be straight text, a regular + expression, , or empty. + + + A concrete + instance. + + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Thrown when the validation of an object definition failed. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + The detail message. + + + + Creates a new instance of the + + class. + + + The detail message. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Helper class for use in object factory implementations, + resolving values contained in object definition objects + into the actual values applied to the target object instance. + + + Used by . + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The object factory. + + + + Given a property value, return a value, resolving any references to other + objects in the factory if necessary. + + +

+ The value could be : + + +

+ An , + which leads to the creation of a corresponding new object instance. + Singleton flags and names of such "inner objects" are always ignored: inner objects + are anonymous prototypes. +

+ + +

+ A , which must + be resolved. +

+
+ +

+ An . This is a + special placeholder collection that may contain + s or + collections that will need to be resolved. +

+
+ +

+ An ordinary object or , in which case it's left alone. +

+
+ +

+
+ + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + +
+ + + TODO + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Resolve the target type of the passed . + + The who's target type is to be resolved + The resolved target type, if any. otherwise. + + + + Resolves an inner object definition. + + + The name of the object that surrounds this inner object definition. + + + The name of the inner object definition... note: this is a synthetic + name assigned by the factory (since it makes no sense for inner object + definitions to have names). + + + The name of the property the value of which is being resolved. + + + The definition of the inner object that is to be resolved. + + + if the owner of the property is a singleton. + + + The resolved object as defined by the inner object definition. + + + + + Checks the given bean name whether it is unique. If not already unique, + a counter is added, increasing the counter until the name is unique. + + Original Name of the inner object. + The Adapted name for the inner object + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + The possible object scope values. + + Aleksandar Seovic + + + + + + + + + Application scope. + + + + + Session scope. + + + + + Request scope. + + + + + + + + + + Default scope (currently + ). + + + + + + Object definition reader for a simple properties format. + + + Provides object definition registration methods for + and + instances. Typically applied to a + . + + Rod Johnson + Juergen Hoeller + Simon White (.NET) + + + + Value of a T/F attribute that represents true. + Anything else represents false. Case seNsItive. + + + + + Separator between object name and property name. + + + + + Prefix for the class property of a root object definition. + + + + + Special string added to distinguish if the object will be + a singleton. + + +

+ Default is true. +

+
+ +

+ owner.(singleton)=true +

+
+
+ + + Special string added to distinguish if the object will be + lazily initialised. + + +

+ Default is false. +

+
+ +

+ owner.(lazy-init)=true +

+
+
+ + + Reserved "property" to indicate the parent of a child object definition. + + + + + Property suffix for references to other objects in the current + : e.g. + owner.dog(ref)=fido. + + +

+ Whether this is a reference to a singleton or a prototype + will depend on the definition of the target object. +

+
+
+ + + Prefix before values referencing other objects. + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the specified properties file. + + + The resource descriptor for the properties file. + + + The match or filter for object definition names, e.g. 'objects.' + + in case of loading or parsing errors + the number of object definitions found + + + + Register object definitions contained in a + , using all property keys (i.e. + not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Similar syntax as for an . + This method is useful to enable standard .NET internationalization support. +

+
+ + The containing object definitions. + + + The match or filter for object definition names, e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions registered. +
+ + + Register object definitions contained in an + , using all property keys + (i.e. not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Registers object definitions contained in an + using all property keys ( i.e. not filtering by prefix ) + + The containing + object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Get all property values, given a prefix (which will be stripped) + and add the object they define to the factory with the given name + + The name of the object to define. + + The containing string pairs. + + The prefix of each entry, which will be stripped. + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + + + + Name of default parent object + + + + + Gets or sets object definition factory to use. + + + + + A implementation to use that checks + the object definitions only (no attributes) + + Mark Fisher + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Determine whether a default value is suggested for the given dependency. + + The descriptor for the target method parameter or field + The value suggested (typically an expression String), + or null if none found + + + + + Static factory that permits the registration of existing singleton instances. + + +

+ Does not have support for prototype objects, aliases, and post startup object + configuration. +

+

+ Serves as a simple example implementation of the + interface, that manages existing object instances as opposed to creating new ones + based on object definitions. +

+

+ The + method is not supported by this class; this class deals exclusively with + existing singleton instances, thus the methods mentioned previously make little sense in this context. +

+
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Map from object name to object instance. + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + This method is not supported by . + + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + is not currently supported. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + True if an object with the given name is defined. + + + + Is this object a singleton? + + +

+ That is, will + or + always return the same object? +

+
+ The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Determine the type of the object with the given name. + + +

+ More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. +

+
+ The name of the object to query. + + The of the object or if + not determinable. + +
+ + + Determines whether the object with the given name matches the specified type. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Not supported. + + The name of the object. + + The registered + . + + + Always, as object definitions are not supported by this + implementation. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Will not consider s, + as the type of their created objects is not known before instantiation. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Since this implementation of the + + interface does not support the notion of ptototype objects, the + parameter is ignored. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). Ignored. + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Tests whether this object factory contains an object definition for the + specified object name. + + The object name to query. + + True if an object defintion is contained within this object factory. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Add a new singleton object. + + + The name to be associated with the object name. + + The singleton object. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + This feature is not currently supported. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Defines a method to release allocated unmanaged resources. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + + + + Abstract implementation providing + a number of convenience methods and a + template method + that subclasses must override to provide the actual parsing logic. + + + Use this implementation when you want + to parse some arbitrarily complex XML into one or more + ObjectDefinitions. If you just want to parse some + XML into a single IObjectDefinition, you may wish to consider + the simpler convenience extensions of this class, namely + and + + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Constant for the ID 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. +

+
+
+ + + Resolves the ID for the supplied . + + + When using generation, a name is generated automatically. + Otherwise, the ID is extracted from the "id" attribute, potentially with a + fallback to a generated id. + + The element that the object definition has been built from. + The object definition to be registered. + The the object encapsulating the current state of the parsing process; + provides access to a + the resolved id + + if no unique name could be generated for the given object definition + + + + + Registers the supplied with the supplied + . + + Subclasses can override this method to control whether or not the supplied + is actually even registered, or to + register even more objects. + + The default implementation registers the supplied + with the supplied only if the IsNested + parameter is false, because one typically does not want inner objects + to be registered as top level objects. + + + + The object definition to be registered. + The registry that the bean is to be registered with. + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + Gets a value indicating whether an ID should be generated instead of read + from the passed in XmlElement. + + Note that this flag is about always generating an ID; the parser + won't even check for an "id" attribute in this case. + + true if should generate id; otherwise, false. + + + + Gets a value indicating whether an ID should be generated instead if the + passed in XmlElement does not specify an "id" attribute explicitly. + + Disabled by default; subclasses can override this to enable ID generation + as fallback: The parser will first check for an "id" attribute in this case, + only falling back to a generated ID if no value was specified. + + true if should generate id if no value was specified; otherwise, false. + + + + + Convenient base class for when there exists a one-to-one mapping + between attribute names on the element that is to be parsed and + the property names on the Type being configured. + + + + + Mark Pollack + + + + Base Type for those implementations that + need to parse and define just a single IObjectDefinition. + + + Extend this parser Type when you want to create a single object definition + from an arbitrarily complex XML element. You may wish to consider extending + the when you want to create a + single Object definition from a relatively simple custom XML element. + The resulting ObjectDefinition will be automatically registered + with the ObjectDefinitionRegistry. Your job simply is to parse the + custom XML element into a single ObjectDefinition + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + + Determine the name for the parent of the currently parsed object, + in case of the current object being defined as a child object. + The default implementation returns null + indicating a root object definition. + + + the name of the parent object for the currently parsed object. + + + + Gets the type of the object corresponding to the supplied XmlElement. + + Note that, for application classes, it is generally preferable to override + GetObjectTypeName instad, in order to avoid a direct + dependence on the object implementation class. The ObjectDefinitionParser + and its IXmlObjectDefinitionParser (namespace parser) can be used within an + IDE add-in then, even if the application classses are not available in the add-ins + AppDomain. + + The element. + The Type of the class that is being defined via parsing the supplied + Element. + + + + Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. + + The element. + The type name of the object that is being defined via parsing the supplied + XmlElement. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation delegates to the DoParse version without + ParameterContext argument. + The element. + The parser context. + The builder used to define the IObjectDefinition. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation does nothing. + The element. + The builder used to define the IObjectDefinition. + + + + Default implementation of the interface. + Resolves namespace URIs to implementation types based on mappings. + + Erich Eichinger + + + + + + Used by to locate + implementations for a particular namespace URI. + + TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now + Erich Eichinger + + + + + + + Lookup a for the given namespace URI. + + the namespace URI + the located namespace handler or null + + + + Resolve the namespace URI and return the corresponding + implementation. + + the namespace URI to get the matching parser for. + the matching parser or null + + + + XML resource reader. + + +

+ Navigates through an XML resource and invokes parsers registered + with the . +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + SPI for parsing an XML document that contains Spring object definitions. + Used by for actually parsing a DOM + document. + + Instantiated per document to parse: Implementations can hold state in + instance variables during the execution of the RegisterObjectDefinitions + method, for example global settings that are defined for all object definitions + in the document. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the DefaultObjectDefinitionDocumentReader class. + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + Parses object definitions starting at the given + using the passed . + + The root element to start parsing from. + The instance to use. + + in case an error happens during parsing and registering object definitions + + + + + Process an alias element. + + + + + Process the object element + + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + + If the resource could not be imported. + + + + + Parses the given alias element, registering the alias with the registry. + + The alias element. + The registry. + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The helper. + + + + + + Allow the XML to be extensible by processing any custom element types last, + after we finished processing the objct definitions. This method is a natural + extension point for any other custom post-processing of the XML. + + The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. + + + The root. + + + + Allow the XML to be extensible by processing any custom element types first, + before we start to process the object definitions. + + This method is a natural + extension point for any other custom pre-processing of the XML. +

The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. +

+
+ The root element of the XML document. +
+ + + Creates an instance for the given and element. + + the to create the + the root to start reading from + a new instance + + + + Gets the reader context. + + The reader context. + + + + Simple class that holds the defaults specified at the <objects> + level in a standard Spring XML object definition document: + default-lazy-init, default-autowire, etc. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Gets or sets the autowire setting for the document that's currently parsed. + + The autowire. + + + + Gets or sets the dependency-check setting for the document that's currently parsed + + The dependency check. + + + + Gets or sets the lazy-init flag for the document that's currently parsed. + + The lazy init. + + + + Gets or sets the merge setting for the document that's currently parsed. + + The merge. + + + + Get or sets the init method for the document that's currently parsed. + + The init method + + + + Gets or sets the destroy method for the document that's currently parsed. + + The destroy methood + + + + Gets or sets autowire candidates for the document that's currently parsed + + The Autowire Candidates + + + + Attribute that should be used to specify the default namespace + and schema location for a custom namespace parser. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Gets or sets the default namespace for the configuration parser. + + + The default namespace for the configuration parser. + + + + + Gets or sets the default schema location for the configuration parser. + + + The default schema location for the configuration parser. + + + If the property is set, the will always resolve to an assembly-resource + and the set will be interpreted relative to this assembly. + + + + + Gets or sets a type from the assembly containing the schema + + + If this property is set, the will always resolve to an assembly-resource + and the will be interpreted relative to this assembly. + + + + + Provides a resolution mechanism for configuration parsers. + + +

+ The uses this registry + class to find the parser handling a specific namespace. +

+
+ Aleksandar Seovic +
+ + + Name of the .Net config section that contains definitions + for custom config parsers. + + + + + Creates a new instance of the NamespaceParserRegistry class. + + + + + Reset the list of registered parsers to "factory"-setting + + use for unit tests only + + + + Registers the type for wellknown namespaces + + true if the parser could be registered, false otherwise + + + + Constructs a "assembly://..." qualified schemaLocation url using the given type + to obtain the assembly name. + + + + + Returns a parser for the given namespace. + + + The namespace for which to lookup the parser implementation. + + + A parser for a given , or + if no parser was found. + + + + + Returns a schema collection containing validation schemas for all registered parsers. + + + A schema collection containing validation schemas for all registered parsers. + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The of the parser that will be activated + when an element in its default namespace is encountered. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The of the parser that will be activated + when the attendant is + encountered. + + + The namespace with which to associate instance of the parser. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If the is not a + that implements the + interface. + + + If is . + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The parser instance. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The namespace with which to associate instance of the parser. + + + The parser instance. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If is , or if + is not specified and parser class + does not have default value defined using . + + + + + Register a schema as well-known + + + + + + + Returns default values for the parser namespace and schema location as + defined by the . + + + A type of the parser. + + + A instance containing + default values for the parser namsepace and schema location + + + + + Resolves xml entities by using the infrastructure. + + + + + Adapts the interface to . + Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 + + + + + Constants defining the structure and values associated with the + Spring.NET XML object definition format. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Value of a boolean attribute that represents + . + + +

+ Anything else represents . +

+
+
+ + + Value of a boolean attribute that represents + . + + + + + Signifies that a default value is to be applied. + + + + + Defines an external XML object definition resource. + + + + + Specifies the relative path to an external XML object definition + resource. + + + + + Defines an alias for an object definition. + + + + + Specifies the alias of an object definition. + + + + + Specifies the default lazy initialization mode. + + + + + Specifies the default dependency checking mode. + + + + + Specifies the default autowire mode. + + + + + Specifies the default autowire candidates. + + + + + Specifies the default collection merge mode. + + + + + Specifies the default init method. + + + + + Specifies the default destroy method. + + + + + Defines a single named object. + + + + + Element containing informative text describing the purpose of the + enclosing element. + + +

+ Always optional. +

+

+ Used primarily for user documentation of XML object definition + documents. +

+
+
+ + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but it is recommended + that the names of one's objects are + specified explicitly. +

+
+
+ + + The name or alias of the parent object definition that a child + object definition inherits from. + + + + + Objects can be identified by an id, to enable reference checking. + + +

+ There are constraints on a valid XML id: if you want to reference + your object in .NET code using a name that's illegal as an XML id, + use the optional "name" attribute + (). + If neither given, the objects name is + used as id. +

+
+
+ + + Can be used to create one or more aliases illegal in an id. + + +

+ Multiple aliases can be separated by any number of spaces, + semicolons, or commas + (). +

+

+ Always optional. +

+
+
+ + + Is this object a "singleton" (one shared instance, which will + be returned by all calls to + with the id), or a + "prototype" (independent instance resulting from each call to + ). + + +

+ Singletons are most commonly used, and are ideal for multi-threaded + service objects. +

+
+ +
+ + + Controls object scope. Only applicable to ASP.NET web applications. + + +

+ Scope can be defined as either application, session or request. It + defines when "singleton" instances are initialized, but has no + effect on prototype definitions. +

+
+
+ + + The names of the objects that this object depends on being + initialized. + + +

+ The object factory will guarantee that these objects + get initialized before this object definition. +

+ + Dependencies are normally expressed through object properties or + constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Optional attribute for the name of the custom initialization method + to invoke after setting object properties. + + +

+ The method must have no arguments. +

+
+
+ + + Optional attribute for the name of the custom destroy method to + invoke on object factory shutdown. + + +

+ Valid destroy methods have either of the following signatures... + + void MethodName() + void MethodName(bool force) + +

+ + Only invoked on singleton objects! + +
+
+ + + A constructor argument : the constructor-arg tag can have an + optional type attribute, to specify the exact type of the + constructor argument + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 single + argument constructors that can both be converted from a + . +

+
+
+ + + The constructor-arg tag can have an optional index attribute, + to specify the exact index in the constructor argument list. + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 arguments of + the same type. +

+
+
+ + + The constructor-arg tag can have an optional named parameter + attribute, to specify a named parameter in the constructor + argument list. + + + + + Is this object "abstract", i.e. not meant to be instantiated itself + but rather just serving as parent for concrete child object + definitions? + + +

+ Default is . Specify + to tell the object factory to not try to instantiate that + particular object in any case. +

+
+
+ + + A property definition : object definitions can have zero or more + properties. + + +

+ Spring.NET supports primitives, references to other objects in the + same or related factories, lists, dictionaries, and name value + collections. +

+
+
+ + + A qualifier definition used for fine grained autowiring + + + + + A reference to another managed object or static + . + + + + + ID refs must specify a name of the target object. + + + + + A reference to the name of another managed object in the same + context. + + + + + A reference to the name of another managed object in the same + context. + + +

+ Local references, using the "local" attribute, have to use object + ids; they can be checked by a parser, thus should be preferred for + references within the same object factory XML file. +

+
+
+ + + Alternative to type attribute for factory-method usage. + + +

+ If this is specified, no type attribute should be used. This should + be set to the name of an object in the current or ancestor + factories that contains the relevant factory method. This allows + the factory itself to be configured using Dependency Injection, and + an instance (rather than static) method to be used. +

+
+
+ + + Optional attribute specifying the name of a factory method to use + to create this object. + + +

+ Use constructor-arg elements to specify arguments to the factory + method, if it takes arguments. Autowiring does not apply to + factory methods. +

+

+ If the "type" attribute is present, the factory method will be a + static method on the type specified by the "type" attribute on + this object definition. Often this will be the same type as that + of the constructed object - for example, when the factory method + is used as an alternative to a constructor. However, it may be on + a different type. In that case, the created object will *not* be + of the type specified in the "type" attribute. This is analogous + to behaviour. +

+

+ If the "factory-object" attribute is present, the "type" attribute + is not used, and the factory method will be an instance method on + the object returned from a + + call with the specified object name. The factory object may be + defined as a singleton or a prototype. +

+

+ The factory method can have any number of arguments. Use indexed + constructor-arg elements in conjunction with the factory-method + attribute. +

+

+ Setter Injection can be used in conjunction with a factory method. + Method Injection cannot, as the factory method returns an instance, + which will be used when the container creates the object. +

+
+
+ + + A list can contain multiple inner object, ref, collection, or + value elements. + + +

+ Lists are untyped, pending generics support, although references + will be strongly typed. +

+

+ A list can also map to an array type. The necessary conversion is + automatically performed by the + . +

+
+
+ + + A set can contain multiple inner object, ref, collection, or value + elements. + + +

+ Sets are untyped, pending generics support, although references + will be strongly typed. +

+
+
+ + + A Spring.NET map is a mapping from a string key to object (a .NET + ). + + +

+ Dictionaries may be empty. +

+
+
+ + + A lookup key (for a dictionary or name / value collection). + + + + + A lookup key (for a dictionary or name / value collection). + + + + + Contains a string representation of a value. + + +

+ This is used by name-value, ctor argument, and property elements. +

+
+
+ + + Contains delimiters that should be used to split delimited string values. + + +

+ This is used by name-value element. +

+
+
+ + + A reference to another objects. + + +

+ Used as a convenience shortcut on property and constructor-arg + elements to refer to other objects. +

+
+
+ + + Contains a string representation of an expression. + + +

+ This is used by ctor argument and property elements. +

+
+
+ + + A map entry can be an inner object, ref, collection, or value. + + +

+ The name of the property is given by the "key" attribute. +

+
+
+ + + Contains a string representation of a property value. + + +

+ The property may be a string, or may be converted to the + required using the + + machinery. This makes it possible for application developers to + write custom + implementations that can convert strings to objects. +

+ + This is recommended for simple objects only. Configure more complex + objects by setting properties to references to other objects. + +
+
+ + + Contains a string representation of an expression. + + + + + Denotes value. + + +

+ Necessary because an empty "value" tag will resolve to an empty + , which will not be resolved to + value unless a special + does so. +

+
+
+ + + 'name-values' elements differ from dictionary elements in that + values must be strings. + + +

+ May be empty. +

+
+
+ + + Element content is the string value of the property. + + +

+ The "key" attribute is the name of the property. +

+
+
+ + + The lazy initialization mode for an individual object definition. + + + + + The dependency checking mode for an individual object definition. + + + + + Defines a subscription to one or more events published by one or + more event sources. + + + + + The name of an event handling method. + + +

+ Defaults to On${event}. + Note : this default will probably change before the first 1.0 + release. +

+
+
+ + + The name of an event. + + + + + The autowiring mode for an individual object definition. + + + + + The autowiring mode for an individual object definition. + + + + + Attribute element to farther deifne the qualifier of an object + + + + + The primary object for autwired injection + + + + + Shortcut alternative to specifying a key element in a + dictionary entry element with <ref object="..."/>. + + + + + Shortcut alternative to specifying a value element in a + dictionary entry element with <ref object="..."/>. + + + + + Specify if the collection values should be merged with the parent. + + + + + Defined meta attributes to be used for Autowire objects + + + + + The string of characters that delimit object names. + + + + + A lookup method causes the IoC container to override a given method and return + the object with the name given in the attendant object attribute. + + +

+ This is a form of Method Injection. +

+

+ It's particularly useful as an alternative to implementing the + interface, + in order to be able to make + + calls for non-singleton instances at runtime. In this case, Method Injection + is a less invasive alternative. +

+
+
+ + + The name of a lookup method. This method must take no arguments. + + + + + The name of the object in the IoC container that the lookup method + must resolve to. + + +

+ Often this object will be a prototype, in which case the lookup method + will return a distinct instance on every invocation. This is useful + for single-threaded objects. +

+
+
+ + + A replaced method causes the IoC container to override a given method + with an (arbitrary) implementation at runtime. + + +

+ This (again) is a form of Method Injection. +

+
+
+ + + Name of the method whose implementation should be replaced by the + IoC container. + + +

+ If this method is not overloaded, there's no need to use arg-type + subelements. +

+

+ If this method is overloaded, arg-type subelements must be + used for all override definitions for the method. +

+
+
+ + + The object name of an implementation of the + interface. + + +

+ This may be a singleton or prototype. If it's a prototype, a new + instance will be used for each method replacement. Singleton usage + is the norm. +

+
+
+ + + Subelement of replaced-method identifying an argument for a + replaced method in the event of method overloading. + + + + + + Specification of the of an overloaded method + argument as a . + + +

+ For convenience, this may be a substring of the FQN. E.g. all the following would match + : +

+

+ + + System.String + + + string + + + str + + +

+
+ +
+ + + Check everything. + + + + + Just check primitive (string, int, etc) values. + + + + + Check object references. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Stateful class used to parse XML object definitions. + + Not all parsing code has been refactored into this class. See + BeanDefinitionParserDelegate in Java for how this class should evolve. + Rob Harrop + Juergen Hoeller + Rod Johnson + Mark Pollack (.NET) + + + + The shared instance for this class (and derived classes). + + + + + Initializes a new instance of the class. + + The reader context. + + + + Initializes a new instance of the class. + + The reader context. + The root element of the definition document to parse + + + + Initialize the default lazy-init, dependency check, and autowire settings. + + The root element + + + + Determines whether the Spring object namespace is equal to the the specified namespace URI. + + The namespace URI. + + true if is the default Spring namespace; otherwise, false. + + + + + Decorates the object definition if required. + + The element. + The holder. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The containing object definition if is a nested element. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Create an instance from the given and . + + + This method may be used as a last resort to post-process an object definition before it gets added to the registry. + + + + + Allows deriving classes to post process the name and aliases for the current element. By default + does nothing and returns the unmodified . + + + The list passed in may be modified by an implementation of this method to reflect special needs. + + the object name obtained by the default algorithm from 'id' and 'name' attributes so far. + the object aliases obtained by the default algorithm from 'name' attribute so far. + the currently processed element. + the containing object definition, may be null + the new object name to be used. + + + + Validate that the specified object name and aliases have not been used already. + + + + + Parses an element in a custom namespace. + + + the parsed object definition or null if not supported by the corresponding parser. + + + + Parses an element in a custom namespace. + + + if a nested element, the containing object definition + the parsed object definition or null if not supported by the corresponding parser. + + + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Determines whether the string represents a 'true' boolean value. + + The value. + + true if is 'true' string value; otherwise, false. + + + + + Convenience method to create a builder for a root object definition. + + Name of the object type. + A builder for a root object definition. + + + + Convenience method to create a builder for a root object definition. + + Type of the object. + a builder for a root object definition + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Report a parser error. + + + + + Gets the defaults definition object, or null if the + default have not yet been initialized. + + The defaults. + + + + Gets the reader context. + + The reader context. + + + + Creates an instance + populated with the object definitions supplied in the configuration + section. + + +

+ Applications will typically want to use an + , and instantiate it + via the use of the + class (which is similar in functionality to this class). This class is + provided for those times when only an + is required. +

+ Creates an instance of the class XmlObjectFactory +
+ +

+ +

+
+ Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a + instance populated with the object definitions supplied in the + configuration section. + + + The configuration settings in a corresponding parent configuration + section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + A instance + populated with the object definitions supplied in the configuration + section. + + + + + Default implementation of the + interface. + + +

+ Parses object definitions according to the standard Spring.NET schema. +

+

+ This schema is typically located at + http://www.springframework.net/xsd/spring-objects.xsd. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The namespace URI for the standard Spring.NET object definition schema. + + + + + The shared instance for this class (and derived classes). + + + + + Invoked by after construction but before any + elements have been parsed. + + This is a NoOp + + + + 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. +

+
+
+ + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + The parser context. + + If the resource could not be imported. + + + + Parses an event listener definition. + + The name associated with the object that the event handler is being defined on. + + The events being populated. + + The element containing the event listener definition. + + + The namespace-aware parser. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The parser context. + if set to true if we are processing an inner + object definition. + + The object (definition) wrapped within an + + instance. + + +

+ Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. +

+

+ If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. +

+
+
+ + + Calculates an id for an object definition. + + +

+ Called when an object definition has not been explicitly defined + with an id. +

+
+ + The element containing the object definition. + + + The list of names defined for the object; may be + or even empty. + + + A calculated object definition id. + +
+ + + Parse a standard object definition. + + The element containing the object definition. + The id of the object definition. + parsing state holder + The object (definition). + + + + Parse method override argument subelements of the given object element. + + + + + Parse element and add parsed element to + + + + + Parse element and add parsed element to + + + + + Parse constructor argument subelements of the given object element. + + + + + Parse event handler subelements of the given object element. + + + + + Parse the meta upplied meta attributes if the given object element + + + + + Parse qualifier sub-elements of the given bean element. + + + + + Parse a qualifier element. + + + + + Parse property value subelements of the given object element. + + + The name of the object (definition) associated with the property element (s) + + + The element containing the top level object definition. + + + The namespace-aware parser. + + + The property (s) associated with the object (definition). + + + + + Parse a constructor-arg element. + + + The name of the object (definition) associated with the ctor arg. + + + The list of constructor args associated with the object (definition). + + + The name of the element containing the ctor arg definition. + + + The namespace-aware parser. + + + + + Parse a property element. + + + The name of the object (definition) associated with the property. + + + The list of properties associated with the object (definition). + + + The name of the element containing the property definition. + + + The namespace-aware parser. + + + + + Get the value of a property element (may be a list). + +

+ Please note that even though this method is named GetPropertyValue, + it is called by both the property and constructor argument element + handlers. +

+
+ The property element. + + The name of the object associated with the property. + + + The namespace-aware parser. + +
+ + + Parse a value, ref or collection subelement of a property element. + + + Subelement of property element; we don't know which yet. + + + The name of the object (definition) associated with the top level property. + + + The namespace-aware parser. + + + + + Gets a list definition. + + + The element describing the list definition. + + + The name of the object (definition) associated with the list definition. + + + The namespace-aware parser. + + The list definition. + + + + Gets a set definition. + + + The element describing the set definition. + + + The name of the object (definition) associated with the set definition. + + + The namespace-aware parser. + + The set definition. + + + + Gets a dictionary definition. + + The element describing the dictionary definition. + The name of the object (definition) associated with the dictionary definition. + The namespace-aware parser. + The dictionary definition. + + + + Selects sub-elements with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child nodes to look for. + + + The child s of the supplied + with the supplied + . + +
+ + + Selects a single sub-element with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child node to look for. + + + The first child of the supplied + with the supplied + . + +
+ + + Gets a name value collection mapping definition. + + + The element describing the name value collection mapping definition. + + + The name of the object (definition) associated with the + name value collection mapping definition. + + the context carrying parsing state information + The name value collection definition. + + + + Returns the text of the supplied , + or the empty string value if said is empty. + + +

+ If the supplied is , + then the empty string value will be returned. +

+
+
+ + + Strips the dependency check value out of the supplied string. + + +

+ If the supplied is an invalid dependency + checking mode, the invalid value will be logged and this method will + return the value. + No exception will be raised. +

+
+ + The string containing the dependency check value. + + The dependency check value. + +
+ + + Strips the autowiring mode out of the supplied string. + + +

+ If the supplied is an invalid autowiring mode, + the invalid value will be logged and this method will return the + value. No exception will be raised. +

+
+ + The string containing the autowiring mode definition. + + The autowiring mode. + +
+ + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Context that gets passed along an object definition parsing process, encapsulating + all relevant configuraiton as well as state. + + + + + Initializes a new instance of the class. + + The parser helper. + + + + Initializes a new instance of the class. + + The parser helper. + The containing object definition. + + + + Gets the reader context. + + The reader context. + + + + Gets the registry. + + The registry. + + + + Gets the parser helper. + + The parser helper. + + + + Gets the containing object definition. + + The containing object definition. + + + + Gets a value indicating whether this instance is nested. + + true if this instance is nested; otherwise, false. + + + + Gets a value indicating whether this instance is default lazy init. + + + true if this instance is default lazy init; otherwise, false. + + + + + Represents the replacement of a method on a managed object by the IoC + container. + + +

+ Note that this mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the method that is to be overridden. + + + The object name of the + instance in the surrounding IoC container. + + + If either of the supplied arguments is or + contains only whitespace character(s). + + + + + Add a fragment of a instance's + such as 'Exception or System.Excep to identify an argument + for a dependency injected method. + + + A (sub) string of a instance's . + + + If the supplied is or + contains only whitespace character(s). + + + + + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The object name of the + instance in the surrounding IoC container. + + + + + Object definition reader for Spring's default XML object definition format. + + +

+ Typically applied to a + instance. +

+

+ This class registers each object definition with the given object factory superclass, + and relies on the latter's implementation of the + interface. +

+

+ It supports singletons, prototypes, and references to either of these kinds of object. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + the to use for creating new s + + + + Load object definitions from the supplied XML . + + + The XML resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Actually load object definitions from the specified XML file. + + The input stream to read from. + The resource for the XML data. + + + + + Validation callback for a validating XML reader. + + The source of the event. + Any data pertinent to the event. + + + + Register the object definitions contained in the given DOM document. + + The DOM document. + + The original resource from where the + was read. + + + The number of object definitions that were registered. + + + In case of parsing errors. + + + + + Creates the to use for actually + reading object definitions from an XML document. + + Default implementation instantiates the specified + or if no reader type is specified. + + + + + Creates the to be passed along + during the object definition reading process. + + The underlying that is currently processed. + A new + + + + Create a instance for handling custom namespaces. + + + TODO (EE): make protected virtual, see remarks on + + + + + The to be used for parsing. + + + + + Sets the IObjectDefinitionDocumentReader implementation to use, responsible for + the actual reading of the XML object definition document.stype of the document reader. + + The type of the document reader. + + + + Specify a to use. If none is specified a default + instance will be created by + + + + + Specify a for creating instances of . + + + + + For retrying the parse process + + + + + Convenience extension of + + that reads object definitions from an XML document or element. + + +

+ Delegates to + + underneath; effectively equivalent to using a + for a + . +

+ + objects doesn't need to be the root element of + the XML document: this class will parse all object definition elements in the + XML stream. + +

+ This class registers each object definition with the + + superclass, and relies on the latter's implementation of the + interface. It supports + singletons, prototypes and references to either of these kinds of object. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Gets object definition reader to use. + + + + + Extension of specific to use with an XmlObjectDefinitionReader. + Provides access to configured in + + + + + The maximum length of any XML fragment displayed in the error message + reporting. + + +

+ Hopefully this will display enough context so that a user + can pinpoint the cause of the error. +

+
+
+ + + Initializes a new instance of the class. + + The resource. + The reader. + + + + Initializes a new instance of the class. + + The resource. + The reader. + The factory to use for creating new instances. + + + + Generates the name of the object. + + The object definition. + the generated object name + + + + Registers the name of the with generated. + + The object definition. + the generated object name + + + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + + +
+ + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the error. + + + The root cause of the parse error (if any - may be ). + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + +
+ + + This method can be overwritten in order to implement validators + capable of displaying a full list of errors found in the definition. + + + The node that triggered the parse error. + + + A message about the exception. + + + + + Gets the reader. + + The reader. + + + + Gets the resource loader. + + The resource loader. + + + + Gets the registry. + + The registry. + + + + Gets or sets the object definition factory. + + The object definition factory. + + + + Get the instance to lookup parsers for custom namespaces. + + + + + Exception thrown if an + is not fully + initialized, for example if it is involved in a circular reference. + + +

+ This is usually indicated by any of the variants of the + + method returning . +

+

+ A circular reference with an + cannot be solved by eagerly caching singleton instances (as is the + case with normal objects. The reason is that every + needs to be fully + initialized before it can return the created object, while only specific + normal objects need to be initialized - that is, if a collaborating object + actually invokes them on initialization instead of just storing the reference. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Thrown when an + encounters an error when attempting to create an object from an object + definition. + + Juergen Hoeller + Rick Evans (.NET) + + + + 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 name of the object that triggered 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. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Describes the creation failure trace of this exception. + + + + + Creates a new instance of the + FactoryObjectNotInitializedException class. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + FactoryObjectCircularReferenceException class. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectCircularReferenceException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + is asked for an object instance name for which it cannot find a definition. + + Rod Johnson + Rick Evans (.NET) + + + + 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. + + + Name of the missing object. + + + A further, detailed message describing the problem. + + + + + Initializes a new instance of the class. + + The required type of the object. + A description of the originating dependency. + A message describing the problem. + + + + Creates a new instance of the + class. + + + The of the missing object. + + + A further, detailed message describing the problem. + + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Return the required of object, if it was a + lookup by that failed. + + + + + Return the name of the missing object, if it was a lookup by name that + failed. + + + + + Thrown in case of a reference to an object that is currently in creation. + + +

+ Typically happens when constructor autowiring matches the currently + constructed object. +

+
+ Juergen Hoeller + Rick Evans +
+ + + The default error message text to be used, if none is specified. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectCurrentlyInCreationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + encounters an error when attempting to parse an object + definition. + + Federico Spinazzi (.NET) + + + + Creates a new instance of the ObjectDefinitionException class. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The value of the xml class attribute thet can be resolved + as a type + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The message about the exception. + + + + + Convenience methods operating on object factories, returning object instances, + names, or counts. + + +

+ The nesting hierarchy of an object factory is taken into account by the various methods + exposed by this class. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Used to dereference an + and distinguish it from managed objects created by the factory. + + +

+ For example, if the managed object identified as foo is a + factory, getting &foo will return the factory, not the + instance returned by the factory. +

+
+
+ + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Count all object definitions in any hierarchy in which this + factory participates. + + +

+ Includes counts of ancestor object factories. +

+

+ Objects that are "overridden" (specified in a descendant factory + with the same name) are counted only once. +

+
+ The object factory. + + The count of objects including those defined in ancestor factories. + +
+ + + Return all object names in the factory, including ancestor factories. + + The object factory. + The array of object names, or an empty array if none. + + + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s + if is set to true, + which means that s will get initialized. +

+
+ + If this isn't also an + , + this method will return the same as it's own + + method. + + + The that objects must match. + + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + The array of object names, or an empty array if none. + +
+ + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+
+ + If this isn't also an , + this method will return the same as it's own method. + + + The that objects must match. + + + The array of object names, or an empty array if none. + +
+ + + Return all objects of the given type or subtypes, also picking up objects + defined in ancestor object factories if the current object factory is an + . + + +

+ The return list will only contain objects of this type. + Useful convenience method when we don't care about object names. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the objects could not be created. + + + The of object instances, or an + empty if none. + +
+ + + Return a single object of the given type or subtypes, also picking up objects defined + in ancestor object factories if the current object factory is an + . + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If more than one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. + This version of ObjectOfType automatically includes prototypes and + instances. +

+
+ The object factory. + The of object to match. + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return the object name, stripping out the factory dereference prefix if necessary. + + The name of the object. + The object name sans any factory dereference prefix. + + + + Given an (object) name, builds a corresponding factory object name such that + the return value can be used as a lookup name for a factory object. + + + The name to be used to build the resulting factory object name. + + + The transformed into its factory object name + equivalent. + + + + + + + Is the supplied a factory dereference? + + +

+ That is, does the supplied begin with + the + ? +

+
+ The name to check. + + if the supplied is a + factory dereference; if not, or the + aupplied is or + consists solely of the + + value. + + +
+ + + Exception that an object implementation is suggested to throw if its own + factory-aware initialization code fails. + thrown by object factory methods + themselves should simply be propagated as-is. + + +

+ Note that non-factory-aware initialization methods like AfterPropertiesSet () + or a custom "init-method" can throw any exception. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectInitializationException class. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectInitializationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to an attempt to lookup a factory object, and + the object identified by the lookup key is not a factory. + + +

+ An object is a factory if it implements (either directly or indirectly + via inheritance) the + interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Thrown when an object doesn't match the required . + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + Name of the object requested. + + + The required of the actual object + instance that was retrieved. + + + The instance actually returned, whose class did not match the + expected . + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The actual of the actual object + instance that was retrieved. + + + + + The required of the actual object + instance that was retrieved. + + + + + The instance actually returned, whose class did not match the + expected . + + + + + The name of the object requested. + + + + + 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 name of the object that was being retrieved from the factory. + + + The object instance that was retrieved. + + + + + 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. + + + + + Exception thrown when an object depends on other objects or simple properties + that were not specified in the object factory definition, although dependency + checking was enabled. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The constructor argument index at which the dependency is + unsatisfied. + + + The of the constructor argument at + which the dependency is unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The name identifying the property on which the dependency is + unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Base class implementation for classes that describe an event handler. + + Rick Evans + + + + Describes an event handler. + + Rick Evans + + + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + The source of the event. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

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

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Returns a stringified representation of this object. + + A stringified representation of this object. + + + + The source of the event (may be unresolved, as in the case + of a + value). + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Convenience base class for implementations. + + + + + Abstracts the state sharing strategy used + by + + Erich Eichinger + + + + Indicate, whether the given instance can be served by this factory + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state can + be served for the given instance or not. + + + + + Returns the shared state for the given instance. + + the instance to obtain shared state for. + the name of this instance + a dictionary containing shared state for or null. + + + + Gets a dictionary acc. to the type of . + If no dictionary is found, create it according to + + the instance to obtain shared state for + the name of the instance. + + A dictionary containing the 's state, + or null if no state can be served by this provider. + + + + + Creates a dictionary to hold the shared state identified by . + + a key to create the dictionary for. + a dictionary according to and . + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Create the key used for obtaining the state dictionary for . + + the instance to create the key for + the name of the instance. + + the key identifying the state dictionary to be used for + or null, if this state manager doesn't serve the given instance. + + + + Implementations may choose to return null from this method to indicate, + that they won't serve state for the given instance. + + + Note:Keys returned by this method are always treated case-sensitive! + + + + + + Create shared state dictionaries case-sensitive or case-insensitive? + + + + + A number indicating the priority of this ( for more). + + + + + Base class for all + implemenations that actually perform event wiring. + + Rick Evans + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

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

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Resolves the method metadata that describes the method that is to be used + as the argument to a delegate constructor. + + + The exposing the method. + + + The of the delegate (e.g. System.EventHandler). + + + The custom binding flags to use when searching for the method. + + The method metadata. + + If the method could not be found. + + + + + Describes an implementation + that autowires events to handler methods. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Wires up the specified handler to the named event on the supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a , + etc). + + + + + The name of the method that is going to handle the event. + + + + + Performs the matching up of handler methods to one or more source events. + + +

+ This class merely marshals the matching of handler methods to the events exposed + by an event source, and then delegates to a concrete + implementation (such as + or + ) to do the heavy lifting of + actually wiring a handler method to an event. +

+

+ Note : the order in which handler's are wired up to events is non-deterministic. +

+
+
+ + + Creates a new instance of the + class. + + + The object exposing the event (s) being wired up. + + + The name of the event that is being wired up. + + + The object exposing the method (s) being wired to the event. + + + The name of the method that is going to handle the event. + + + + + Wires up events on the source to methods exposed on the handler. + + + + + Wires up the supplied event to any handler methods that match the event + signature. + + The event being wired up. + + + + Only replaces the first occurrence of the placeholder. + + The event whose name is going to be used. + + The method name customised for the name of the supplied event. + + + + + The object exposing the event (s) being wired up. + + + + + The object exposing the method (s) being wired to an event source. + + + + + The of the object that is handling any events. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Serves shared state on a by-type basis. + + + + + Creates a new instance matching all types by default. + + + + + Creates a new instance matching only specified list of types. + + the list of types to serve. + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Returns the for the given . + + the instance to obtain the key for. + the name of the instance (ignored by this provider) + instance.GetType() if it matches the list. Null otherwise. + + This method will only be called if returned true previously. + + + + + Limit object types to be served by this state manager. + + + Only objects assignable to one of the types in this list + will be served state by this manager. + + + + + Describes an event handler for an object instance. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Definition for sorting object instances by a property. + + Juergen Hoeller + Simon White (.NET) + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Mutable implementation of the + interface that + supports toggling the ascending value on setting the same property again. + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using + the specified . + + + The to use + as a source for initial property values. + + + + + Creates a new instance of the + class. + + + The name of the property to sort by. + + + Whether upper and lower case in string values should be ignored. + + + Whether or not the sorting should be ascending or descending. + + + + + Creates a new instance of the + class. + + + Whether or not the + + property should be toggled if the same name is set on the + + property. + + + + + Overrides the default method + + + The object to test against this instance for equality. + + + True if the supplied is equal to this instance. + + + + + Overrides the default method. + + The hashcode for this instance. + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Performs a comparison of two objects, using the specified object property via + an . + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + The to use for any + sorting. + + + If the supplied is . + + + + + Compares two objects and returns a value indicating whether one is less + than, equal to or greater than the other. + + The first object to compare. + The second object to compare. + + + + + Get the 's property + value for the given object. + + The object to get the property value for. + The property value. + + + + Sort the given according to the + given sort definition. + + + The to be sorted. + + The parameters to sort by. + + In the case of a missing property name. + + + If the supplied is . + + + + + Gets the to + use for any sorting. + + + The to use for + any sorting. + + + + + Describes an event handler for a static class method. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + The central interface of Spring.NET's low-level object infrastructure. + + +

+ Typically not directly used by application code but rather implicitly + via an . +

+

+ Implementing classes have the ability to get and set property values + (individually or in bulk), get property descriptors and query the + readability and writability of properties. +

+

+ This interface supports nested properties enabling the setting + of properties on subproperties to an unlimited depth. +

+

+ If a property update causes an exception, a + will be thrown. Bulk + updates continue after exceptions are encountered, throwing an exception + wrapping all exceptions encountered during the update. +

+

+ implementations can be used + repeatedly, with their "target" or wrapped object changed. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + Get the value of a property. + + The name of the property to get the value of. May be nested. + + The value of the property. + + if the property isn't readable, or if the getting the value throws + an exception. + + + + + Get the for a particular + property. + + + The property to be retrieved. + + + The for the particular + property. + + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Get all of the instances for + all of the properties of the wrapped object. + + + An array of instances. + + + + + Set a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ The new property value. +
+ + + Set a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new property value. +
+ + Set a number of property values in bulk. + +

+ This is the preferred way to perform a bulk update. +

+

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

+ Does not allow the setting of unknown fields. Equivalent to + + with an argument of false for the second parameter. +

+
+ + The collection of instances to + set on the wrapped object. + +
+ + + Set a number of property values in bulk with full control over behavior. + + +

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

Does not allow the setting of unknown fields. +

+
+ + The to set on the target object + + + Should we ignore unknown values (not found in the object!?) + +
+ + + The object wrapped by the wrapper (cannot be ). + + +

+ Implementations are required to allow the type of the wrapped + object to change. +

+
+ The object wrapped by this wrapper. +
+ + + Convenience method to return the + of the wrapped object. + + The of the wrapped object. + + + + A collection style container for + instances. + + Rod Johnson + Mark Pollack (.NET) + + + + Return the instance with the + given name. + + The name to search for. + the , or null if a + the with the supplied + did not exist in this collection. + + + + + Is there a instance for this + property name? + + The name to search for. + + True if there is a instance for + the supplied . + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + +

+ Subclasses should also override Equals. +

+
+ The old property values. + + An containing any changes, or + an empty instance if there were + no changes. + +
+ + + Return an array of the objects + held in this object. + + An array of the objects held + in this object. + + + + + This interface should be implemented by classes that want to + have access to the shared state. + + +

+ Shared state is very useful if you have data that needs to be shared by all instances + of e.g. the same webform (or other IHttpHandlers). +

+

+ For example, Spring.Web.UI.Page class implements this interface, which allows + each page derived from it to cache localizalization resources and parsed data binding + expressions only once and then reuse the cached values, regardless of how many instances + of the page are created. +

+
+
+ + + Gets or sets the that should be used + to store shared state for this instance. + + + + + Default implementation of the + interface. + + +

+ Allows simple manipulation of properties, and provides constructors to + support deep copy and construction from a number of collection types such as + and + . +

+
+ Rod Johnson + Mark Pollack (.NET) + Rick Evans (.NET) +
+ + + The list of objects. + + + + + Creates a new instance of the + class. + + +

+ The returned instance is initially empty... + s can be added with the various + overloaded , + , + , + and + methods. +

+
+ + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. Guarantees + references are independent, although it can't deep copy objects currently + referenced by individual objects. +

+
+
+ + + Creates a new instance of the + class. + + + The with property values + keyed by property name, which must be a . + + + + + Overloaded version of Add that takes a property name and a property value. + + + The name of the property. + + + The value of the property. + + + + + Add the supplied object, + replacing any existing one for the respective property. + + + The object to add. + + + + + Merges the value of the supplied 'new' with that of + the current if merging is supported and enabled. + + + The new pv. + The current pv. + The possibly merged PropertyValue + + + + Add all property values from the given + . + + + The map of property values, the keys of which must be + s. + + + + + Add all property values from the given + . + + + The list of s to be added. + + + + + Remove the given , if contained. + + + The to remove. + + + + + Removes the named , if contained. + + + The name of the property. + + + + + Modify a object held in this object. Indexed from 0. + + + + + Return the property value given the name. + + + The property name is checked in a case-insensitive fashion. + + + The name of the property. + + + The property value. + + + + + Does the container of properties contain one of this name. + + The name of the property to search for. + + True if the property is contained in this collection, false otherwise. + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + Another property values collection. + + The collection of property values that are different than the supplied one. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + Convert the object to a string representation. + + + A string representation of the object. + + + + + Property to retrieve the array of property values. + + + + + Holder for a key-value style attribute that is part of a bean definition. + Keeps track of the definition source in addition to the key-value pair. + + + + + Create a new AttributeValue instance. + + the name of the attribute (never null) + the value of the attribute (possibly before type conversion) + + + + Return the name of the attribute. + + + + + Return the value of the attribute. + + + + + Set the configuration source Object for this metadata element. +

The exact type of the object will depend on the configuration mechanism used.

+
+
+ + + Default implementation of the + interface that should be sufficient for all normal uses. + + +

+ will convert + and array + values to the corresponding target arrays, if necessary. Custom + s that deal with + s or arrays can be written against a + comma delimited as + arrays are converted in such a format if the array itself is not assignable. +

+
+ Rod Johnson + Juergen Hoeller + Jean-Pierre Pawlak + Mark Pollack (.NET) + Aleksandar Seovic(.NET) +
+ + The wrapped object. + + + + The ILog instance for this class. We'll create a lot of these objects, + so we don't want a new instance every time. + + + + + Creates a new instance of the class. + + +

+ The wrapped target instance will need to be set afterwards. +

+
+ +
+ + + Creates a new instance of the class. + + + The object wrapped by this . + + + If the supplied is . + + + + + Creates a new instance of the class, + instantiating a new instance of the specified and using + it as the . + + +

+ Please note that the passed as the + argument must have a no-argument constructor. + If it does not, an exception will be thrown when this class attempts + to instantiate the supplied using it's + (non-existent) constructor. +

+
+ + The to instantiate and wrap. + + + If the is , or if the + invocation of the s default (no-arg) constructor + fails (due to invalid arguments, insufficient permissions, etc). + +
+ + Gets the value of a property. + + The name of the property to get the value of. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + Gets the value of a property. + + The property expression that should be used to retrieve the property value. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + + Sets a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new value. +
+ + + Sets a property value. + + + The property expression that should be used to set the property value. + + The new value. + + + + Sets a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ + The object containing new property value. + +
+ + Set a number of property values in bulk. + +

+ Does not allow unknown fields. Equivalent to + + with and for + arguments. +

+
+ + The to set on the target + object. + + + If an error is encountered while setting a property. + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Perform a bulk update with full control over behavior. + + +

+ This method may throw a reflection-based exception, if there is a critical + failure such as no matching field... less serious exceptions will be accumulated + and thrown as a single . +

+
+ + The s to set on the target object. + + + Should we ignore unknown values (not found in the object!?). + + + If an error is encountered while setting a property (only thrown if the + parameter is set to ). + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Returns PropertyInfo for the specified property + + The name of the property to search for. + The for the specified property. + If cannot be determined. + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Returns MemberInfo for the specified property or field + + The name of the property or field to search for. + The or for the specified property or field. + If does not resolve to a property or field. + + + + Get the properties of the wrapped object. + + + An array of s. + + + + + This method is expensive! Only call for diagnostics and debugging reasons, + not in production. + + + A string describing the state of this object. + + + + + Attempts to parse property expression first and falls back to full expression + if that fails. Performance optimization. + + Property expression to parse. + Parsed proeprty expression. + + + + The object wrapped by this . + + + If the object cannot be changed; or an attempt is made to set the + value of this property to . + + + + + Convenience method to return the of the wrapped object. + + +

+ Do not use this (convenience) method prior to setting the + property. +

+
+ + The of the wrapped object. + + + If the property + is . + +
+ + + Return the collection of property descriptors. + + + + + Combined exception, composed of individual binding + s. + + +

+ An object of this class is created at the beginning of the binding + process, and errors added to it as necessary. +

+

+ The binding process continues when it encounters application-level + s, applying those changes + that can be applied and storing rejected changes in an instance of this class. +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) +
+ + + Creates a new instance of the PropertyAccessExceptionsException class. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Create new empty PropertyAccessExceptionsException. + We'll add errors to it as we attempt to bind properties. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The IObjectWrapper wrapping the target object at the root of the exception. + + + + The list of PropertyAccessException objects. + + + + Return the + for the supplied , or + if there isn't one. + + + + + Describe the number of exceptions contained in this container class. + + A description of the instance contents. + + + + Return the that generated + this exception. + + + + + Return the object we're binding to. + + + + + If this returns zero (0), no errors were encountered during binding. + + + + + Return an array of the s + stored in this object. + + +

+ Will return the empty array (not ) if there were no errors. +

+
+
+ + + Describe the group of exceptions. + + + + + Holds information and value for an individual property. + + +

+ Using an object here, rather than just storing all properties in a + map keyed by property name, allows for more flexibility, and the + ability to handle indexed properties in a special way if necessary. +

+

+ Note that the value doesn't need to be the final required + : an + implementation must + handle any necessary conversion, as this object doesn't know anything + about the objects it will be applied to. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + + If the supplied is or + contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + Pre-parsed property name. + + If the supplied or + is , or if the name contains only whitespace characters. + + + + + Print a string representation of the property. + + A string representation of the property. + + + + Determines whether the supplied + is equal to the current . + + The other instance. + + if they are equal in content. + + + + + 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 name of the property. + The name of the property. + + + + Parsed property expression. + + + + + Return the value of the property. + + +

+ Note that type conversion will not have occurred here. + It is the responsibility of the + implementation to + perform type conversion. +

+
+ The (possibly unresolved) value of the property. +
+ + + A simple pool implementation + + +

+ Based on the implementation found in Concurrent Programming in Java, + 2nd ed., by Doug Lea. +

+
+ Doug Lea + Federico Spinazzi + Mark Pollack +
+ + + A simple pooling interface for managing and monitoring a pool + of objects. + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + Obtain an instance from the pool. + + +

+ By contract, clients must return the borrowed + instance using + or a related method as defined in an implementation or + sub-interface. +

+
+ An instance from the pool. + + In case the pool is unusable. + + +
+ + + Return an instance to the pool. + + +

+ By contract, the object must have been obtained using + + or a related method as defined in an implementation or sub-interface. +

+
+ The instance to be returned to the pool. + +
+ + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This is an optional operation. AddObject is useful for "pre-loading" a + pool with idle objects. +

+
+ + If the implementation does not support the operation. + +
+ + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently borrowed from the pool. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently idle in the pool. + + +

+ This is an optional operation. +

+

+ This may be considered an approximation of the number of objects + that can be borrowed without creating any new instances. +

+
+ + If the implementation does not support the operation. + +
+ + + Set the factory used to create new instances. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Set of permits + + + + + Creates a new instance of the + class. + + + The factory used to instantiate and manage the lifecycle of pooled objects. + + The initial size of the pool. + + If the supplied is . + + + If the supplied is less than or equal to zero. + + + + + Obtain an instance from the pool. + + + In case the pool is unusable. + + + + + + + Return an instance to the pool. + + The instance to be returned to the pool. + + + + + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Synchronized borrow logic. + + + + + + Synchronized release logic. + + + The object to release to the pool. + + + if the object was not a busy one. + + + + + Instantiates the supplied number of instances and adds + them to the pool. + + + The initial number of objects to build. + + + If the supplied number of is + less than or equal to zero. + + + + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Change the state of the pool to unusable. + + + + + Gets the number of instances currently borrowed from the pool. + + + If the implementation does not support the operation. + + + + + + Gets the number of instances currently idle in the pool. + + + If the implementation does not support the operation. + + + + + + Set the factory used to create new instances. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Defines lifecycle methods for objects that are to be used in an + implementation. + + +

+ The following methods summarize the contract between an + and an + an . +

+ + + + is called whenever a new instance is needed. + + + + is invoked on every instance before it is returned from + the pool. + + + + is invoked on every instance when it is returned to the pool. + + + + is invoked on every instance when it is being dropped from the + pool (see + + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + 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. + + +

+ Invoked on every instance when it is being "dropped" + from the pool (whether due to the return value from a call to the + + method, or for reasons specific to the pool implementation.) +

+
+ 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. + + +

+ Invoked in an implementation-specific fashion to determine if an + instance is still valid to be returned by the pool. + It will only be invoked on an "activated" instance. +

+
+ 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. + + +

+ Invoked on every instance before it is returned from the pool. +

+
+ The instance to be activated. +
+ + + Uninitialize an instance to be returned to the pool. + + +

+ Invoked on every instance when it is returned to the pool. +

+
+ The instance returned to the pool. +
+ + + Base class for all pooling exceptions. + + Federico Spinazzi + + + + 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. + + + + + Implementation of IProxyMethodBuilder that delegates method calls to the base class. + + Bruno Baia + + + + 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 . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Builds a proxy type using composition. + + + + In order for this builder to work, the target must implement + one or more interfaces. + + + Aleksandar Seovic + Bruno Baia + + + + Target instance calls should be delegated to. + + + + + Creates a new instance of the + class. + + + + + Creates a proxy that delegates calls to an instance of the + target object. + + +

+ Only interfaces can be proxied using composition, so the target + must implement one or more interfaces. +

+
+ The generated proxy class. + + If the + does not implement any interfaces. + +
+ + + Create an to create interface implementations + + + + + Allows subclasses to generate additional code + + + + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + Deaclares a field that holds the target object instance. + + + The builder to use for code generation. + + + + + Generates the proxy constructor. + + +

+ This implementation creates instance of the target object for delegation + using constructor arguments. +

+
+ The constructor builder to use. + The IL generator to use. + The constructor to delegate the creation to. +
+ + + Gets or sets a value indicating whether interfaces should be implemented explicitly. + + + if they should be; otherwise, . + + + + + Allows easy access to existing and creation of new dynamic proxies. + + Aleksandar Seovic + Bruno Baia + + + + The name of the assembly that defines proxy types created. + + + + + The attributes of the proxy type to generate. + + + + + Creates an appropriate type builder. + + The proxy type name. + The type to extends if provided. + The type builder to use. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + This attribute can be used to mark interfaces that should not be proxied + + Bruno Baia + + + + Creates a new instance of the + class. + + + + + Implementation of IProxyMethodBuilder that delegates method calls to target object. + + Bruno Baia + + + + 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 . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Base class for dynamic members. + + Aleksandar Seovic + + + + Method attributes constant. + + + + + Sets up target instance for invocation. + + IL generator to use. + Type of target instance. + + + + Sets up invocation argument. + + IL generator to use. + Argument type. + Argument position. + + + + Generates method invocation code. + + IL generator to use. + Flag specifying whether method is static. + Flag specifying whether method is on the value type. + Method to invoke. + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Defines constructors that dynamic constructor class has to implement. + + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Safe wrapper for the dynamic constructor. + + + will attempt to use dynamic + constructor if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached constructor info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe constructor wrapper. + + Constructor to wrap. + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Factory class for dynamic constructors. + + Aleksandar Seovic + + + + Creates dynamic constructor instance for the specified . + + Constructor info to create dynamic constructor for. + Dynamic constructor for the specified . + + + + Defines methods that dynamic field class has to implement. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Safe wrapper for the dynamic field. + + + will attempt to use dynamic + field if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached fieldInfo or creates a new entry, if none is found. + + + + + Creates a new instance of the safe field wrapper. + + Field to wrap. + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Holds cached Getter/Setter delegates for a Field + + + + + Factory class for dynamic fields. + + Aleksandar Seovic + + + + Creates dynamic field instance for the specified . + + Field info to create dynamic field for. + Dynamic field for the specified . + + + + Defines methods that dynamic indexer class has to implement. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer arguments. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer arguments. + + + A new indexer value. + + + + + Defines methods that dynamic method class has to implement. + + + + + Invokes dynamic method on the specified target object. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Safe wrapper for the dynamic method. + + + will attempt to use dynamic + method if possible, but it will fall back to standard + reflection if necessary. + + + + + Creates a new instance of the safe method wrapper. + + Method to wrap. + + + + Invokes dynamic method. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Gets the class, that declares this method + + + + + Factory class for dynamic methods. + + Aleksandar Seovic + + + + Creates dynamic method instance for the specified . + + Method info to create dynamic method for. + Dynamic method for the specified . + + + + Defines methods that dynamic property class has to implement. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Safe wrapper for the dynamic property. + + + will attempt to use dynamic + property if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached property info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe property wrapper. + + Property to wrap. + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Internal PropertyInfo accessor. + + + + + Holds cached Getter/Setter delegates for a Property + + + + + Factory class for dynamic properties. + + Aleksandar Seovic + + + + Creates safe dynamic property instance for the specified . + + +

This factory method will create a dynamic property with a "safe" wrapper.

+

Safe wrapper will attempt to use generated dynamic property if possible, + but it will fall back to standard reflection if necessary.

+
+ Property info to create dynamic property for. + Safe dynamic property for the specified . + +
+ + + Creates dynamic property instance for the specified . + + Property info to create dynamic property for. + Dynamic property for the specified . + + + + Represents a Get method + + the target instance when calling an instance method + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + Represents an Indexer Get method + + the target instance when calling an instance method + + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + + Represents a method + + the target instance when calling an instance method + arguments to be passed to the method + the value return by the method. null when calling a void method + + + + Represents a constructor + + arguments to be passed to the method + the new object instance + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Allows easy access to existing and creation of new dynamic relection members. + + Aleksandar Seovic + + + + The name of the assembly that defines reflection types created. + + + + + The attributes of the reflection type to generate. + + + + + Cache for dynamic property types. + + + + + Cache for dynamic field types. + + + + + Cache for dynamic indexer types. + + + + + Cache for dynamic method types. + + + + + Cache for dynamic constructor types. + + + + + Creates an appropriate type builder. + + + The base name to use for the reflection type name. + + The type builder to use. + + + + Returns dynamic property if one exists. + + Property to look up. + callback function that will be called to create the dynamic property + An for the given property info. + + + + Returns dynamic field if one exists. + + Field to look up. + callback function that will be called to create the dynamic field + An for the given field info. + + + + Returns dynamic indexer if one exists. + + Indexer to look up. + callback function that will be called to create the dynamic indexer + An for the given indexer. + + + + Returns dynamic method if one exists. + + Method to look up. + callback function that will be called to create the dynamic method + An for the given method. + + + + Returns dynamic constructor if one exists. + + Constructor to look up. + callback function that will be called to create the dynamic constructor + An for the given constructor. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG mode, per ConditionalAttribute rules. + + + + + Create a new Get method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field + + + + Create a new Set method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field. + + If the field's returns true, the returned method + will throw an when called. + + + + + Create a new Get method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to read the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new Set method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to write the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new method delegate for the specified method using + + the method to create the delegate for + a delegate that can be used to invoke the method. + + + + Creates a new delegate for the specified constructor. + + the constructor to create the delegate for + delegate that can be used to invoke the constructor. + + + + Creates a instance with the highest possible code access security. + + + If allowed by security policy, associates the method with the s declaring type. + Otherwise associates the dynamic method with . + + + + + Delegates a Method(object target, params object[] args) call to the actual underlying method. + + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Converts to an instance of if necessary to + e.g. avoid e.g. double/int cast exceptions. + + + + This method mimics the behavior of the compiler that + automatically performs casts like int to double in "Math.Sqrt(4)".
+ See about implicit, widening type conversions on MSDN - Type Conversion Tables +
+ + Note: is expected to be a value type! + +
+
+ + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Indicates that an annotated class is a "Controller" (e.g. a MVC Controller). + + + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Thomas Trageser + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + + + + Indicates that an annotated class is a "Repository" (or "DAO"). + + + A class with this attribute is eligible for Spring DataAccessException translation. A class + with the Repository attribute is also clarified as to its role in the overall application + architecture for the purpose of tools, aspects, etc. + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Rod Johnson + Jueren Hoeller + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the repository. + + + + Indicates that an annotated class is a "Service" (e.g. a business service facade). + + + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + + + + Implements by using . + + Erich Eichinger + + + + Specifies the contract a strategy must be implement to store and + retrieve data that is specific to the executing thread. + + + All implementations of this interface must treat keys case-sensitive. + + Erich Eichinger + + + + Retrieves an object with the specified . + + The name of the item. + + The object in the current thread's context associated with the + specified or null if no object has been stored previously + + + + + Stores a given object and associates it with the specified . + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + + If the object with the specified is not found, the method does nothing. + + The name of the object to remove. + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + + Acquire/Release protocol, base of many concurrency utilities. + + + +

objects isolate waiting and notification for particular logical + states, resource availability, events, and the like that are shared + across multiple threads.

+ +

Use of s sometimes (but by no means always) adds + flexibility and efficiency compared to the use of plain + .Net monitor methods and locking, and are sometimes (but by no means + always) simpler to program with.

+ +

Used for implementation of a

+
+ + Doug Lea + Federico Spinazzi (.Net) +
+ + Wait (possibly forever) until successful passage. + Fail only upon interuption. Interruptions always result in + `clean' failures. On failure, you can be sure that it has not + been acquired, and that no + corresponding release should be performed. Conversely, + a normal return guarantees that the acquire was successful. + + + + + Potentially enable others to pass. +

+ Because release does not raise exceptions, + it can be used in `finally' clauses without requiring extra + embedded try/catch blocks. But keep in mind that + as with any java method, implementations may + still throw unchecked exceptions such as Error or NullPointerException + when faced with uncontinuable errors. However, these should normally + only be caught by higher-level error handlers. +

+
+
+ + + Wait at most msecs to pass; report whether passed. +

+ The method has best-effort semantics: + The msecs bound cannot + be guaranteed to be a precise upper bound on wait time in Java. + Implementations generally can only attempt to return as soon as possible + after the specified bound. Also, timers in Java do not stop during garbage + collection, so timeouts can occur just because a GC intervened. + So, msecs arguments should be used in + a coarse-grained manner. Further, + implementations cannot always guarantee that this method + will return at all without blocking indefinitely when used in + unintended ways. For example, deadlocks may be encountered + when called in an unintended context. +

+
+ the number of milleseconds to wait + An argument less than or equal to zero means not to wait at all. + However, this may still require + access to a synchronization lock, which can impose unbounded + delay if there is a lot of contention among threads. + + true if acquired +
+ + A latch is a boolean condition that is set at most once, ever. + Once a single release is issued, all acquires will pass. +

+ Sample usage. Here are a set of classes that use + a latch as a start signal for a group of worker threads that + are created and started beforehand, and then later enabled. +

+ + class Worker implements IRunnable { + private readonly Latch startSignal; + Worker(Latch l) + { + startSignal = l; + } + + public void Run() { + startSignal.acquire(); + DoWork(); + } + + void DoWork() { ... } + } + + class Driver { // ... + void Main() { + Latch go = new Latch(); + for (int i = 0; i < N; ++i) // make threads + new Thread(new ThreadStart(new Worker(go)).Start(); + DoSomethingElse(); // don't let run yet + go.Release(); // let all threads proceed + } + } + +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + can acquire ? + + + + + Method mainly used by clients who are trying to get the latch + + + + Wait at most msecs millisconds for a permit + + + + Enable all current and future acquires to pass + + + + + An abstraction to safely store "ThreadStatic" data. + + + By default, is used to store thread-specific data. + You may switch the storage strategy by calling .

+ NOTE: Access to the underlying storage is not synchronized for performance reasons. + You should call only once at application startup! + + Erich Eichinger + + +

+ Holds the current strategy. + + + Access to this variable is not synchronized on purpose for performance reasons. + Setting a different strategy should happen only once + at application startup. + +
+ + + Set the new strategy. + + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + +

Base class for counting semaphores based on Semaphore implementation + from Doug Lea.

+
+ + +

Conceptually, a semaphore + maintains a set of permits. Each acquire() blocks if + necessary until a permit is available, and then takes it.

+ +

Each release adds a permit. However, no actual permit objects are used; + the Semaphore just keeps a count of the number available + and acts accordingly.

+ +

A semaphore initialized to 1 can serve as a mutual exclusion lock.

+ + Used for implementation of a +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + current number of available permits + + + + +

Create a Semaphore with the given initial number of permits.

+

Using a seed of 1 makes the semaphore act as a mutual + exclusion lock.

+ +

Negative seeds are also allowed, + in which case no acquires will proceed until the number of + releases has pushed the number of permits past 0.

+
+
+ + + Release a permit + + + + + Acquire a permit + + + + + Wait at most msecs millisconds for a permit + + number of ms to wait + true if aquired + + + Release N permits. release(n) is + equivalent in effect to: +
+            for (int i = 0; i < n; ++i) release();
+            
+ But may be more efficient in some semaphore implementations. +
+ if n is negative. + + +
+ + Return the current number of available permits. + Returns an accurate, but possibly unstable value, + that may change immediately after returning. + + + + + Utility class to use an with the + C# using () {} idiom + + + + + Creates a new trying to the given + + + the to be held + + + + Creates a new trying to the given + + + the to be held + millisecond to try to acquire the lock + + + + Releases the held + + + + + initializes and acquire access to the + + + + + + Implements by using a hashtable. + + Erich Eichinger + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + Thrown by synchronization classes that report + timeouts via exceptions. The exception is treated + as a form (subclass) of InterruptedException. This both + simplifies handling, and conceptually reflects the fact that + timed-out operations are artificially interrupted by timers. + + + + + The approximate time that the operation lasted before + this timeout exception was thrown. + + + + + + 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. + + + 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. + + + + + Override of GetObjectData to allow for private serialization + + serialization info + streaming context + + + Constructs a TimeoutException with given duration value. + + + + + Constructs a TimeoutException with the + specified duration value and detail message. + + + + + Gets the approximate time that the operation lasted before + this timeout exception was thrown. + + + + A TimeoutSync is an adaptor class that transforms all + calls to acquire to instead invoke attempt with a predetermined + timeout value. + + + + + + the adapted sync + + + + + timeout value + + + + Create a TimeoutSync using the given Sync object, and + using the given timeout value for all calls to acquire. + + + + + Try to acquire the sync before the timeout + + In case a time out occurred + + + + + + + + + + + + + + Support to account for differences between java nad .NET: +
    +
+
+
+ + + .NET threads have not a method to check if they have been interrupted. + Moreover, differently from java threads, when entering locked + blocks, Monitor, Sleep, SpinWait and so on, a + will be raised by the runtime. +

Spring.Threading classes usually call this method before entering a lock block, to mirror java code +

Usually this is non issue because the same exception will be raised entering the monitor + associated with the lock () +

+
+ if the thread has been interrupted +
+ + + Normalize the given so that + is is comparable with . + + Date. + + + + + + + + + the difference between millisecodns of the first and second date + + + + Returns the number of nanoseconds for the current value of + + Current number of nanoseconds + + + + Returns the number of nano seconds represented by the + + to use + Number of nano seconds for + + + + Returns a representing the number of nanoseconds passed in via . + + Number of nanoseconds. + representing the number of nanoseconds passed in. + + + + Placeholder for java.lang.System.currentTimeMillis + + The current machine time in milliseconds + + + + Has been interrupted this thread + + + + + Miscellaneous generic collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Various utility methods relating to the manipulation of arrays. + + Aleksandar Seovic + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Use this sort method instead of to overcome + bugs in Mono. + + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Tests equality of two single-dimensional arrays by checking each element + for equality. + + The first array to be checked. + The second array to be checked. + True if arrays are the same, false otherwise. + + + + Returns hash code for an array that is generated based on the elements. + + + Hash code returned by this method is guaranteed to be the same for + arrays with equal elements. + + + Array to calculate hash code for. + + + A hash code for the specified array. + + + + + Returns string representation of an array. + + + Array to return as a string. + + + String representation of the specified . + + + + + Concatenates 2 arrays of compatible element types + + + If either of the arguments is null, the other array is returned as the result. + The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. + + + + + Assertion utility methods that simplify things such as argument checks. + + +

+ Not intended to be used directly by applications. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Checks, whether may be invoked on . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the method to test for + + if is null + + + if it is not possible to invoke on + + + + + checks, whether supports the methods of . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the type to test for + + if is null + + + if it is not possible to invoke methods of + type on + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + If the supplied is . + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is . + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + An arbitrary message that will be passed to any thrown . + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is , contains no elements or only null elements. + + The array or collection to check. + The argument name. + + If the supplied is , + contains no elements or only null elements. + + + + + Checks whether the specified can be cast + into the . + + + The argument to check. + + + The name of the argument to check. + + + The required type for the argument. + + + An arbitrary message that will be passed to any thrown + . + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + The exception message to use if the assertion fails. + + if expression is false + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + + if expression is false + + + + + Assert a bool expression, throwing InvalidOperationException + if the expression is false. + + a boolean expression. + The exception message to use if the assertion fails + if expression is false + + + + Creates a new instance of the class. + + +

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

+
+
+ + + General utility methods for working with annotations + + + + + Find a single Attribute of the type 'attributeType' from the supplied class, + traversing it interfaces and super classes if no attribute can be found on the + class iteslf. + + + This method explicitly handles class-level attributes which are not declared as + inherited as well as attributes on interfaces. + + The class to look for attributes on . + Type of the attribibute to look for. + the attribute of the given type found, or null + + + + Get all attribute properties with values for a specific attribute type + + attribute to check against + collection of all properties with values + + + + Get the default name value of an attribute and a specific property + + attribute from where to get the default value + property to get the default value + + + + + Miscellaneous collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Adds the specified to the specified . + + The collection to add the element to. + The object to add to the collection. + + + + Adds the specified to the specified . + + The enumerable to add the element to. + The object to add to the collection. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Converts an instance to an instance. + + The instance to be converted. + An instance in which its elements are the elements of the instance. + if the is null. + + + + Copies the elements of the to a + new array of the specified element type. + + The instance to be converted. + The element of the destination array to create and copy elements to + An array of the specified element type containing copies of the elements of the . + + + + Returns the first element contained in both, and . + + The implementation assumes that <<< + the source enumerable. may be null + the list of candidates to match against elements. may be null + the first element found in both enumerables or null + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a value of the given type found, or null if none. + If more than one value of the given type is found + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a collection of matching values of the given type found, empty if none found, or null if the input collection was null. + + + + Find a value of one of the given types in the given Collection, + searching the Collection for a value of the first type, then + searching for a value of the second type, etc. + + The collection to search. + The types to look for, in prioritized order. + a value of the given types found, or null if none + If more than one value of the given type is found + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified dictionary is null empty. + + The dictionary to check. + + true if the specified dictionary is empty or null; otherwise, false. + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A callback method used for comparing to items. + + + + the first object to compare + the second object to compare + Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. + + + + + + Utility class containing helper methods for object comparison. + + Aleksandar Seovic + + + Compares two objects. + First object. + Second object. + + 0, if objects are equal; + less than zero, if the first object is smaller than the second one; + greater than zero, if the first object is greater than the second one. + + + + Utility class for .NET configuration files management. + + Aleksandar Seovic + + + + Avoid BeforeFieldInit pitfall + + + + + Parses the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. + Object created by a corresponding . +
+ + + Refresh the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. +
+ + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Configuration exception. + + + + Creates the configuration exception. + + Configuration exception. + + + + Determines whether the specified exception is configuration exception. + + The exception to check. + + true if the specified exception is configuration exception; otherwise, false. + + + + + Returns the line number of the specified node. + + Node to get the line number for. + The line number of the specified node. + + + + Returns the name of the file specified node is defined in. + + Node to get the file name for. + The name of the file specified node is defined in. + + + + Sets the current to be used by . + + + íf implements , this method invokes + on the new configSystem to chain them.
+ Note, that this method requires reflection on internals of +
+ the configuration system to set + bypasses the check if the current system has already been initialized + the previous config system, if any +
+ + + Resets the global configuration system instance. Use for unit testing only! + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Gets a string specifying the file/resource name related to the configuration details. + + + + + Gets an integer specifying the line number related to the configuration details. + + + + + Gets an integer specifying the line position related to the configuration details. + + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + An implementation, who's elements retain information + about their location in the original XML text document the were read from. + + + When loading a document, the used must implement . + Typical XmlReader implementations like support this interface. + + Erich Eichinger + + + + Overridden to create a retaining the current + text position information. + + + + + Overridden to create a retaining the current + text position information. + + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store null as their property. + + The XML source + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store as their property. + + + The new XmlNode or null if no more nodes exist. + + the name of the resource + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store null as their property. + + + The new XmlNode or null if no more nodes exist. + + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Get info about the current text position during loading a document. + Outside loading a document, the properties of + will always be null. + + + + + Holds the current text position during loading a document + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + Collects information on the constructor to use to create the instance and the argument instances to pass into the + constructor. + + + + + Initializes a new instance of the class. + + The constructor info. + The arg instances. + + + + Gets the constructor info. + + The constructor info. + + + + Gets the arg instances. + + The arg instances. + + + + Discovers the attributes of a + and provides access to the + s metadata. + + Rick Evans + + + + The method name associated with a delegate invocation. + + + + + Creates a new instance of the + class. + + + The event used to extract the delegate + from. + + + if the supplied is + . + + + + + Creates a new instance of the + class. + + + The delegate . + + + If the supplied is not a subclass of the + class, or is . + + + + + Checks to see if the method encapsulated by the supplied method + metadata is compatible with the method signature associated with + this delegate type. + + The method to be checked. + + if the method signature is compatible with + the signature of this delegate; if not, or + if the supplied parameter is + . + + + + + Gets the s of the parameters of the + method signature associated with this delegate type. + + +

+ This method will never return ; the returned + array may be empty, but it most certainly + will not be . +

+
+ + A array of the parameter + s; or the + array if the method signature has no parameters. + +
+ + + Gets the return of the + method signature associated with this delegate type. + + The return . + + + + Gets the metadata about the method signature associated + with this delegate type. + + + The metadata about the method signature associated + with this delegate type. + + + + + Determines whether the supplied + is a type. + + + The to be checked. + + + if the supplied + is a ; + if not or the supplied + is . + + + + + Checks if the signature of the supplied + is compatible with the signature expected by the supplied + . + + The event to be checked against. + + The method signature to check for compatibility. + + + if the signature of the supplied + is compatible with the signature + expected by the supplied ; + if not or either of the supplied + parameters is . + + + + + + The of the delegate. + + + + + Use this class for obtaining instances for dynamic code generation. + + +

+ The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. +

+ + Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. + +
+ +

The following excerpt from demonstrates usage:

+ + public class DynamicProxyManager + { + public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; + + public static TypeBuilder CreateTypeBuilder(string name, Type baseType) + { + // Generates type name + string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); + ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); + return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); + } + } + +
+ Erich Eichinger + + + +
+ + + prevent instantiation + + + + + Returns the for the dynamic module within the specified assembly. + + + If the assembly does not exist yet, it will be created.
+ This factory caches any dynamic assembly it creates - calling GetModule() twice with + the same name will *not* create 2 distinct modules! +
+ The assembly-name of the module to be returned + the that can be used to define new types within the specified assembly +
+ + + Persists the specified dynamic assembly to the file-system + + the name of the dynamic assembly to persist + + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + Removes all registered s. + + + + + A utility class for raising events in a generic and consistent fashion. + + Rick Evans + + + + Create a new EventRaiser instance + + + + + Raises the event encapsulated by the supplied + , passing the supplied + to the event. + + The event to be raised. + The arguments to the event. + a map of sink/exception entries that occurred during event raising + + + + Invokes the supplied , passing the supplied + to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Raises events defensively. + + +

+ Raising events defensively means that as the raised event is passed to each handler, + any thrown by a handler will be caught and silently + ignored. +

+
+ Rick Evans +
+ + + Defensively invokes the supplied , passing the + supplied to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Implement this interface to create your own, delegating + and set them using + + + + + + + + + + + A strategy for handling errors. This is especially useful for handling + errors that occur during asynchronous execution as in such cases it may not be + possible to throw the error to the original caller. + + Mark Fisher + Mark Pollack (.NET) + + + + Handles the error. + + The exception. + + + + Utility methods for IO handling + + + + + Copies one stream into another. + (Don't forget to call on the destination stream!) + + + Does not close the input stream! + + + + + Reads a stream into a byte array. + + + Does not close the input stream! + + + + + Various utility methods relating to numbers. + + +

+ Mainly for internal use within the framework. +

+
+ Aleksandar Seovic +
+ + + Determines whether the supplied is an integer. + + The object to check. + + if the supplied is an integer. + + + + + Determines whether the supplied is a decimal number. + + The object to check. + + if the supplied is a decimal number. + + + + + Determines whether the supplied is of numeric type. + + The object to check. + + true if the specified object is of numeric type; otherwise, false. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to a number. + + The object to check. + + true if the specified object is decimal number; otherwise, false. + + + + + Is the supplied equal to zero (0)? + + The number to check. + + id the supplied is equal to zero (0). + + + + + Negates the supplied . + + The number to negate. + The supplied negated. + + If the supplied is not a supported numeric type. + + + + + Returns the bitwise not (~) of the supplied . + + The number. + The value of ~. + + If the supplied is not a supported numeric type. + + + + + Bitwise ANDs (&) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise ORs (|) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise XORs (^) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Adds the specified numbers. + + The first number. + The second number. + + + + Subtracts the specified numbers. + + The first number. + The second number. + + + + Multiplies the specified numbers. + + The first number. + The second number. + + + + Divides the specified numbers. + + The first number. + The second number. + + + + Calculates remainder for the specified numbers. + + The first number (dividend). + The second number (divisor). + + + + Raises first number to the power of the second one. + + The first number. + The second number. + + + + Coerces the types so they can be compared. + + The right. + The left. + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Helper methods with regard to objects, types, properties, etc. + + +

+ Not intended to be used directly by applications. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The instance for this class. + + + + + An empty object array. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Instantiates the type using the assembly specified to load the type. + + This is a convenience in the case of needing to instantiate a type but not + wanting to specify in the string the version, culture and public key token. + The assembly. + Name of the type. + + + If the or is + + + If cannot load the type from the assembly or the call to InstantiateType(Type) fails. + + + + + Convenience method to instantiate a using + its no-arg constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The to instantiate* + + A new instance of the . + + If the is + + + If the is an abstract class, an interface, + an open generic type or does not have a public no-argument constructor. + +
+ + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. + + + + + Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains + open generic type parameters. + + The type. + + + + Convenience method to instantiate a using + the given constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The constructor to use for the instantiation. + + + The arguments to be passed to the constructor. + + A new instance. + + If the is + + + If the 's declaring type is an abstract class, + an interface, an open generic type or does not have a public no-argument constructor. + +
+ + + Checks whether the supplied is not a transparent proxy and is + assignable to the supplied . + + +

+ Neccessary when dealing with server-activated remote objects, because the + object is of the type TransparentProxy and regular is testing for assignable + types does not work. +

+

+ Transparent proxy instances always return when tested + with the 'is' operator (C#). This method only checks if the object + is assignable to the type if it is not a transparent proxy. +

+
+ The target to be checked. + The value that should be assigned to the type. + + if the supplied is not a + transparent proxy and is assignable to the supplied . + +
+ + + Determine if the given is assignable from the + given value, assuming setting by reflection and taking care of transparent proxies. + + +

+ Considers primitive wrapper classes as assignable to the + corresponding primitive types. +

+

+ For example used in an object factory's constructor resolution. +

+
+ The target . + The value that should be assigned to the type. + True if the type is assignable from the value. +
+ + + Check if the given represents a + "simple" property, + i.e. a primitive, a , a + , or a corresponding array. + + +

+ Used to determine properties to check for a "simple" dependency-check. +

+
+ + The to check. + +
+ + + Check if the given class represents a primitive array, + i.e. boolean, byte, char, short, int, long, float, or double. + + + + + Determines whether the specified array is null or empty. + + The array to check. + + true if the specified array is null empty; otherwise, false. + + + + + Determine if the given objects are equal, returning + if both are respectively + if only one is . + + The first object to compare. + The second object to compare. + + if the given objects are equal. + + + + + Return as hash code for the given object; typically the value of + {@link Object#hashCode()}. If the object is an array, + this method will delegate to any of the nullSafeHashCode + methods for arrays in this class. If the object is null, + this method returns 0. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + If the supplied is . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + If the supplied is . + + + + + Gets the qualified name of the given method, consisting of + fully qualified interface/class name + "." method name. + + The method. + qualified name of the method. + + + + Return a String representation of an object's overall identity. + + The object (may be null). + The object's identity as String representation, + or an empty String if the object was null + + + + + Gets a hex String form of an object's identity hash code. + + The obj. + The object's identity code in hex notation + + + + Support matching of file system paths in a manner similar to that of the + NAnt FileSet. + + +

+ Any (back)slashes are converted to forward slashes. +

+
+ + + // true + PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); + PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); + PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); + // false + PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); + + + Federico Spinazzi +
+ + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + should the match consider the case + + if the path is matched by the pattern; + otherwise . + + + + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + + if the path is matched by the pattern; + otherwise . + + + + + Replaces back(slashes) with forward slashes. + + + The path or the pattern to modify. + + A forward-slashed string. + + + + Helper method to convert a NAnt-like pattern into the + appropriate pattern for a regular expression. + + The NAnt-like pattern. + A regex-compatible pattern. + + + + Creates a new instance of the class. + + +

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

+
+
+ + Utility methods for simple pattern matching, in particular for + Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. + + Juergen Hoeller + Mark Pollack + + + Match a String against the given pattern, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the pattern to match against + + the String to match + + whether the String matches the given pattern + + + + Match a String against the given patterns, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the patterns to match against + + the String to match + + whether the String matches any of the given patterns + + + + + An implementation of the Java Properties class. + + + For the complete syntax see java.util.Properties JavaDoc. + This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. + + + key1 = value + key2: + key3 + + will result in the name/value pairs: + + key1:="value" + key2:=string.Empty + key3:=<null> + + note, that to specify a null value, the key must not be followed by any character except newline. + + + Simon White + + + + Creates an empty property list with no default values. + + + + + Creates a property list with the specified initial properties. + + The initial properties. + + + + Reads a property list (key and element pairs) from the input stream. + + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + The text reader to load from. + + + + Reads a property list (key and element pairs) from the input stream. + + the dictionary to put it in + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + the dictionary to put it in + The text reader to load from. + + + + Strips whitespace from the front of the specified string. + + The string. + The string with all leading whitespace removed. + + + + Splits the specified string into a key / value pair. + + The line to split. + An array containing the key / value pair. + + + + Searches for the property with the specified key in this property list. + + The key. + The property, or null if the key was not found. + + + + Searches for the property with the specified key in this property list. + + The key. + + The default value to be returned if the key is not found. + + The property, or the default value. + + + + Writes this property list out to the specified stream. + + The stream to write to. + + + + Sets the specified property key / value pair. + + The key. + The value. + + + + Writes the properties in this instance out to the supplied stream. + + The stream to write to. + Arbitrary header information. + + + + Removes the key / value pair identified by the supplied key. + + + The key identifying the key / value pair to be removed. + + + + + Adds the specified key / object pair to this collection. + + The key. + The value. + + + + Adds the specified key / object pair to this collection. + + + + + Various reflection related methods that are missing from the standard library. + + Rod Johnson + Juergen Hoeller + Aleksandar Seovic (.NET) + Stan Dvoychenko (.NET) + Bruno Baia (.NET) + + + + Convenience value that will + match all private and public, static and instance members on a class + in a case inSenSItivE fashion. + + + + + Avoid BeforeFieldInit problem + + + + + Checks, if the specified type is a nullable + + + + + Returns signature for the specified , method name and argument + s. + + The the method is in. + The method name. + + The argument s. + + The method signature. + + + + Returns method for the specified , method + name and argument + s. + + + Searches with BindingFlags + When dealing with interface methods, you probable want to 'normalize' method references by calling + . + + + + The target to find the method on. + + The method to find. + + The argument s. May be + if the method has no arguments. + + The target method. + + + + + Returns method for the specified , method + name and argument + s. + + + Searches with BindingFlags + When dealing with interface methods, you probable want to 'normalize' method references by calling + . + + + + The target to find the method on. + + The method to find. + + The argument s. May be + if the method has no arguments. + + Number of Generic Arguments in the method + The target method. + + + + + Resolves a given to the representing the actual implementation. + + + see article How To Get an Explicit Interface Implementation Method. + + a + the type to lookup + the representing the actual implementation method of the specified + + + + Returns an array of parameter s for the specified method + or constructor. + + The method (or constructor). + An array containing the parameter s. + + If is . + + + + + Returns an array of parameter s for the + specified parameter info array. + + The parameter info array. + An array containing parameter s. + + If is or any of the + elements is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The method. + An array containing the parameter names. + + If is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The parameter info array. + An array containing parameter names. + + If is or any of the + elements is . + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the type of method (used for exception reporting only) + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of constructors, selects the constructor having an exact match on the given ' types. + + the list of constructors to choose from + the arguments to the method + the constructor matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + Packages arguments into argument list containing parameter array as a last argument. + + Argument vaklues to package. + Total number of oarameters. + Type of the param array element. + Packaged arguments. + + + + Convenience method to convert an interface + to a array that contains + all the interfaces inherited and the specified interface. + + The interface to convert. + An array of interface s. + + If the specified is not an interface. + + + If is . + + + + + Is the supplied the default indexer for the + supplied ? + + + The name of the property on the supplied to be checked. + + + The to be checked. + + + if the supplied is the + default indexer for the supplied . + + + If the supplied is . + + + + + Is the supplied declared on one of these interfaces? + + The method to check. + The array of interfaces we want to check. + + if the method is declared on one of these interfaces. + + + If any of the s specified is not an interface. + + + If or any of the specified interfaces is + . + + + + + Returns the default value for the specified + + +

+ Follows the standard .NET conventions for default values where + relevant; for example, all numeric types default to the value + 0. +

+
+ + The to return default value for. + + + The default value for the specified . + + + If the supplied is an enumerated type that + has no values. + +
+ + + Returns an array consisting of the default values for the supplied + . + + + The array of s to return default values for. + + + An array consisting of the default values for the supplied + . + + + If any of the elements in the supplied + array is an enumerated type that has no values. + + + + + + Checks that the parameter s of the + supplied match the parameter + s of the supplied + . + + The method to be checked. + + The array of parameter s to check against. + + + if the parameter s + match. + + + + + Returns an array containing the s of the + objects in the supplied array. + + + The objects array for which the corresponding s + are needed. + + + An array containing the s of the objects + in the supplied array; this array will be empty (but not + if the supplied + is null or has no elements. + + +

+ [C#]
+ Given an array containing the following objects, + [83, "Foo", new object ()], the + array returned from this method call would consist of the following + elements... + [Int32, String, Object]. +

+
+
+ + + Given the return its representation as + it would appear in the source code files. + + + Largely intended to handle generic types where .ToString() will typically return: + "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" + and this method will instead return: + "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" + + The type. + Friendly string representing the Type + + + + Does the given and/or it's superclasses + have at least one or more methods with the given name (with any + argument types)? + + +

+ Includes non-public methods in the methods searched. +

+
+ + The to be checked. + + + The name of the method to be searched for. Case inSenSItivE. + + + if the given or / and it's + superclasses have at least one or more methods (with any argument types); + if not, or either of the parameters is . + +
+ + + Within , counts the number of overloads for the method with the given (case-insensitive!) + + The type to be searched + the name of the method for which overloads shall be counted + The number of overloads for method within type + + + + Creates a . + + +

+ Note that if a non- + is supplied, any read write properties exposed by the + will be used to overwrite values that may have been passed in via the + . That is, the will be used + to initialize the custom attribute, and then any read-write properties on the + will be plugged in. +

+
+ + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + If the parameter is . + + + If the parameter is not a + that derives from the class. + + +
+ + + Creates a . + + + The desired . + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + + + Creates a . + + + The source attribute to copy properties from. + + A custom attribute builder. + + If the supplied is + . + + + + + Creates a . + + + The desired . + + A custom attribute builder. + + + + Creates a . + + + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + A custom attribute builder. + + + + Creates a . + + + The to create + the custom attribute builder from. + + A custom attribute builder. + + + + Calculates and returns the list of attributes that apply to the + specified type or method. + + The type or method to find attributes for. + + A list of custom attributes (CustomAttributeData or Attribute instances) + that should be applied to type or method. + + + + + Tries to find matching methods in the specified + for each method in the supplied list. + + + The to look for matching methods in. + + The methods to match. + + A flag that specifies whether to throw an exception if a matching + method is not found. + + A list of the matched methods. + + If either of the or + parameters are . + + + + + Returns the of the supplied + . + + +

+ If the is a + instance, the return value of this method call with be the + parameter cast to a + . If the is + anything other than a , the return value + will be the result of invoking the 's + method. +

+
+ + A or instance. + + + The argument if it is a + or the result of invoking + on the argument if it + is an . + + + If the is . + +
+ + + Unwraps the supplied + and returns the inner exception preserving the stack trace. + + + The to unwrap. + + The unwrapped exception. + + + + Is the supplied can be accessed outside the assembly ? + + The type to check. + + if the type can be accessed outside the assembly; + Otherwise . + + + + + Determines whether the specified type is nullable. + + The type. + + true if the specified type is ullable]; otherwise, false. + + + + + Is the supplied can be accessed + from the supplied friendly assembly ? + + The type to check. + The friendly assembly name. + + if the type can be accessed + from the supplied friendly assembly; Otherwise . + + + + + Gets all of the interfaces implemented by + the specified . + + + The object to get the interfaces of. + + + All of the interfaces implemented by the + . + + + + + Returns the explicit that is the root cause of an exception. + + + If the InnerException property of the current exception is a null reference + or a , returns the current exception. + + The last exception thrown. + + The first explicit exception thrown in a chain of exceptions. + + + + + Copies all fields from one object to another. + + + The types of both objects must be related. This means, that either of the following is true: + + fromObject.GetType() == toObject.GetType() + fromObject.GetType() is derived from toObject.GetType() + toObject.GetType() is derived from fromObject.GetType() + + + The source object + The object, who's fields will be populated with values from the source object + If the object's types are not related + + + + Convenience method that uses reflection to return the value of a non-public field of a given object. + + Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. + The instance of the object from which to retrieve the field value. + Name of the field on the object from which to retrieve the value. + + + + + Convenience method that uses reflection to set the value of a non-public field of a given object. + + Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. + The instance of the object from which to set the field value. + Name of the field on the object to which to set the value. + The field value to set. + + + + Creates a . + + Bruno Baia + + + + Creates a new instance of the + class. + + The custom attribute type. + + + + Creates a new instance of the + class. + + The custom attribute type. + The custom attribute constructor arguments. + + + + Adds the specified values to the constructor argument list + used to create the custom attribute. + + An array of argument values. + + + + Adds a property value to the custom attribute. + + The property name. + The property value. + + + + Creates the . + + The created . + + + + Utility class to be used from within this assembly for executing security critical code + NEVER EVER MAKE THIS PUBLIC! + + Erich Eichinger + + + + Miscellaneous utility methods. + + +

+ Mainly for internal use within the framework. +

+
+ Rod Johnson + Juergen Hoeller + Keith Donald + Aleksandar Seovic (.NET) + Mark Pollack (.NET) + Rick Evans (.NET) + Erich Eichinger (.NET) +
+ + + The string that signals the start of an Ant-style expression. + + + + + The string that signals the end of an Ant-style expression. + + + + + An empty array of instances. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + An array of the tokens. +
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + + + Pairs of quote characters. within a pair of quotes are ignored + + An array of the tokens. +
+ + + Convert a CSV list into an array of s. + + + Values may also be quoted using doublequotes. + + A CSV list. + + An array of s, or the empty array + if is . + + + + + Take a which is a delimited list + and convert it to a array. + + +

+ If the supplied is a + or zero-length string, then a single element + array composed of the supplied + will be + eturned. If the supplied + is , then an empty, + zero-length array will be returned. +

+
+ + The to be parsed. + + + The delimeter (this will not be returned). Note that only the first + character of the supplied is used. + + + An array of the tokens in the list. + +
+ + + Convenience method to return an + as a delimited + (e.g. CSV) . + + + The to parse. + + + The delimiter to use (probably a ','). + + The delimited string representation. + + + + Convenience method to return an + as a CSV + . + + + The to display. + + The delimited string representation. + + + + Convenience method to return an array as a CSV + . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + + + Convenience method to return a + array as a delimited (e.g. CSV) . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + The delimiter to use (probably a ','). + + + + Checks if a string has length. + + The string to check, may be . + + + if the string has length and is not + . + + + + StringUtils.HasLength(null) = false + StringUtils.HasLength("") = false + StringUtils.HasLength(" ") = true + StringUtils.HasLength("Hello") = true + + + + + + Checks if a has text. + + +

+ More specifically, returns if the string is + not , it's is > + zero (0), and it has at least one non-whitespace character. +

+
+ + The string to check, may be . + + + if the is not + , + > zero (0), and does not consist + solely of whitespace. + + + + StringUtils.HasText(null) = false + StringUtils.HasText("") = false + StringUtils.HasText(" ") = false + StringUtils.HasText("12345") = true + StringUtils.HasText(" 12345 ") = true + + +
+ + + Checks if a is + or an empty string. + + +

+ More specifically, returns if the string is + , it's is equal + to zero (0), or it is composed entirely of whitespace + characters. +

+
+ + The string to check, may (obviously) be . + + + if the is + , has a length equal to zero (0), or + is composed entirely of whitespace characters. + + + + StringUtils.IsNullOrEmpty(null) = true + StringUtils.IsNullOrEmpty("") = true + StringUtils.IsNullOrEmpty(" ") = true + StringUtils.IsNullOrEmpty("12345") = false + StringUtils.IsNullOrEmpty(" 12345 ") = false + + +
+ + + Returns , if it contains non-whitespaces. null otherwise. + + + + + Strips first and last character off the string. + + The string to strip. + The stripped string. + + + + Returns a list of Ant-style expressions from the specified text. + + The text to inspect. + + A list of expressions that exist in the specified text. + + + If any of the expressions in the supplied + is empty (${}). + + + + + Replaces Ant-style expression placeholder with expression value. + + +

+ +

+
+ The string to set the value in. + The name of the expression to set. + The expression value. + + A new string with the expression value set; the + value if the supplied + is , has a length + equal to zero (0), or is composed entirely of whitespace + characters. + +
+ + + Surrounds (prepends and appends) the string value of the supplied + to the supplied . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The prefix and suffix that respectively will be prepended and + appended to the target . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + The surrounded string. +
+ + + Surrounds (prepends and appends) the string values of the supplied + and to the supplied + . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The value that will be prepended to the . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + + The value that will be appended to the . If this value + is not a value, it's attendant + value will be used. + + The surrounded string. +
+ + + Converts escaped characters (for example "\t") within a string + to their real character. + + The string to convert. + The converted string. + + + + Utility class containing miscellaneous system-level functionality. + + Aleksandar Seovic + + + + Registers assembly resolver that iterates over the + assemblies loaded into the current + in order to find an assembly that cannot be resolved. + + + This method has to be called if you need to serialize dynamically + generated types in transient assemblies, such as Spring AOP proxies, + because standard .NET serialization engine always tries to load + assembly from the disk. + + + + + Returns true if running on Mono + + Tests for the presence of the type Mono.Runtime + + + + Returns true if running on CLR 4.0 under InProc SxS mode + + + + + Gets the thread id for the current thread. Use thread name is available, + otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and + CurrentThread.ManagedThreadId otherwise. + + The thread id. + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Creates a new TextPositionInfo instance. + + + + + Creates a new TextPositionInfo instance, copying values from another instance. + + + + + The filename related to this text position + + + + + The line number related to this text position + + + + + The line position related to this text position + + + + + UniqueKey allows for generating keys unique to a type or particular instance and a partial name, + that can e.g. be used as keys in . + + + // shows usage type-scoped keys + UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); + UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); + + HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; + Assert.AreEqual( "some value unique for class A having key 'myKey'", value); + + HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; + Assert.AreEqual( "some value unique for class B having key 'myKey'", value); + + + + + Initialize a new instance of from its string representation. + See and See for details. + + The string representation of the new instance. + + + + Compares this instance to another. + + + + + Compares this instance to another. + + + + + Returns the hash code for this key. + + + + + + Returns a string representation of this key. + + + + + Creates a new key instance unique to the given instance. + + The instance the key shall be unique to + The partial key to be made unique + + + If is of type + + + + Creates a new key instance unique to the given type. + + The type the key shall be unique to + The partial key to be made unique + + + + Returns a key unique for the given instance. + + The instance the key shall be unique to + The partial key to be made unique + A key formatted as typename[instance-id].partialkey + + + + Returns a key unique for the given type. + + The type the key shall be unique to + The partial key to be made unique + A key formatted as typename.partialkey + + + + XML utility methods. + + Aleksandar Seovic + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + to be used for resolving external references + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + + A non-validating implementation. + + + + + Implementation of that adds error message + to the validation errors container. + + Aleksandar Seovic + + + + Abstract base class that should be extended by all + validation actions. + + +

+ This class implements template Execute method + and defines OnValid and OnInvalid methods that + can be overriden + by specific validation actions. +

+
+ Aleksandar Seovic +
+ + + An action that should be executed after validator is evaluated. + + +

+ This interface allows us to define the actions that should be executed + after validation in a generic fashion. +

+

+ For example, addition of error messages to validation errors collection + is performed by one specific implementation of this interface, . +

+
+ Aleksandar Seovic +
+ + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Initializes a new instance of the class. + + + + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is not valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Evaluates 'when' expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + Error message resource identifier. + Names of the error providers this message should be added to. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Resolves the error message. + + Validation context to resolve message parameters against. + Additional context parameters. + Resolved error message + + + + Resolves the message parameters. + + List of parameters to resolve. + Validation context to resolve parameters against. + Additional context parameters. + Resolved message parameters. + + + + Sets the expressions that should be resolved to error message parameters. + + The expressions that should be resolved to error message parameters. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression that defines the exception to throw when the validator is not valid. + + + + Initializes a new instance of the class with an expression + that defines the exception to throw. + + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the exception to throw + + The throws. + + + + Implementation of that allows you + to define Spring.NET expressions that should be evaluated after + validation. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression to execute when validator is valid. + + The expression to execute when validator is valid. + + + + Gets or sets the expression to execute when validator is not valid. + + The expression to execute when validator is not valid. + + + + Implementation of the custom configuration parser for validator definitions. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parses the validator definition. + + Validator's identifier. + The element to parse. + The parser helper. + Validator object definition. + + + + Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with + the parsed value. + + + + + Parses and potentially registers a validator. + + + Only validators that have id attribute specified are registered + as separate object definitions within application context. + + Validator XML element. + The parser helper. + Validator object definition. + + + + Gets the name of the object type for the specified element. + + The element. + The name of the object type. + + + + Creates an error message action based on the specified message element. + + The message element. + The parser helper. + The error message action definition. + + + + Creates a generic action based on the specified element. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Creates object definition for the validator reference. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Evaluates validator test using condition evaluator. + + Aleksandar Seovic + + + + Base class that defines common properties for all single validators. + + +

+ Custom single validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class that defines common properties for all validators. + + +

+ Custom validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + An object that can validate application-specific objects. + + +

+ The primary motivation for this interface is to enable validation to be + decoupled from the (user) interface and placed in business objects. +

+

+ Application developers writing their own custom + implementations will + typically not implement this interface directly. In most cases, custom + validators woud be better served deriving from the + class, with the + custom validation ligic being implemented in an override of the + + + template method. +

+
+ Aleksandar Seovic + +
+ + + Validates the specified object. + + The object to validate. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Evaluates when expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Processes the error messages. + + Whether validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Gets or sets the validation actions. + + The actions that should be executed after validation. + + + + Creates a new instance of the validator without any + and criteria + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates test object. + + Object to validate. + True if specified object is valid, False otherwise. + + + + Evaluates test expression. + + Root context to use for expression evaluation. + Additional context parameters. + Result of the test expression evaluation, or validation context if test is null. + + + + Gets or sets the test expression. + + The test expression. + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Evaluates the test using condition evaluator. + + +

+ Test can be any logical expression that is supported by the Spring.NET logical + expression evaluation engine, and can use any variables that can be resolved + by the variable resolver used by the validation engine. +

+
+ The object to validate. + + if the supplied is valid. + +
+ + + Perform credit card validations. + + + By default, all supported card types are allowed. You can specify + which credit card type validator should be used by setting + the value of property to a concrete + instance. + + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid credit card number. + + The object to validate. + + if the supplied is valid + credit card number. + + + + + Checks if the is a valid credit card number. + + + The card number to validate. + + + true if the card number is valid. + + + + + Validates card number with the specified validator. + + + Credit card number to validate. + + + true if credit card number is a valid number of credit card type specified. + + + + + Checks for a valid credit card number. + + + Credit Card Number. + + + true if the card number passes the LuhnCheck. + + + + + Credit card type validator to use. + + + Can be concrete implementations of + interface. The following are available implementations: + , , , + . + + + + + CreditCardType interface defines how validation is performed + for one type/brand of credit card. + + + + + Returns true if the card number matches this type of + credit card. + + + The card number, never null. + + + true if the number matches. + + + + + Visa credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a visa number. + + + + + American Express credit card type validation support. + + + + + Indicates, wheter the given credit card number matches an amex number. + + + + + Discover credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a discover number. + + + + + Mastercard credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a mastercard number. + + + + + Perform email validations. + + +

+ This implementation is not guaranteed to catch all possible errors in an + email address. For example, an address like nobody@noplace.nowhere will + pass validator, even though there is no TLD "nowhere". + + Goran Milosavljevic + + +

+ Creates a new instance of the EmailValidator class. + +
+ + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid e-mail address. + + The object to validate. + + if the supplied is valid + e-mail address. + + + + + Regular expression used for validation of object passed to this . + + + + + Validates that the object is valid ISBN-10 or ISBN-13 value. + + Goran Milosavljevic + + + + Creates a new instance of the ISBNValidator class. + + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the ISBN-10 or + ISBN-13 validation rules. + + The object to validate. + + if the supplied is valid ISBN. + + + + + Validates against ISBN-10 or ISBN-13 validation + rules. + + + ISBN string to validate. + + + true if is a valid ISBN-10 or ISBN-13 code. + + + + + ISBN-10 consists of 4 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 1-5 characters, second 1-7, third 1-6, + and fourth is 1 digit or an X. + + + + + ISBN-13 consists of 5 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 978 or 979, the second group is + 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. + + + + + Validates that object matches specified regular expression. + + +

+ The test expression must evaluate to a ; + otherwise, an exception is thrown. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Validates an object. + + Object to validate. + + if the supplied + object is valid. + + + If the supplied is not a + + + + + + The regular expression text to match against. + + The regular expression text. + + + + Gets or sets a value indicating whether to do a partial match instead of a full match. + Default is false. + + + + + The for the regular expression evaluation. + + The regular expression evaluation options. + + + + + Validates that required value is not empty. + + +

+ This validator uses following rules to determine if target value is valid: + + + + + + + + + + + + + + + + + + + + + + + + + +
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
+

+

+ You cannot use this validator to validate any value types other than the ones + specified in the table above. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a variable expression that will be evaluated and the object + obtained as a result of this evaluation will be tested using the rules described + in the class overview of the + class. + + The object to validate. + + if the supplied is valid. + + + + + Validates that the value is valid URL. + + Goran Milosavljevic + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the URL validation rules. + + The object to validate. + + if the supplied is valid. + + + + + Regular expression used for validation of object passed to this . + + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one or more of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

Note, that defaults to true for this validator type!

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class for composite validators + + + + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Gets or sets the child validators. + + The validators. + + + + When set true, shortcircuits evaluation. + + + Setting this property true causes the evaluation process to prematurely abort + if the end result is known. Any remaining child validators will not be considered then. + Setting this value false causes implementations to evaluate all child validators, regardless + of the potentially already known result. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + implementation that supports validating collections. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid for all of the objects in the specified collection. +

+

+ You can specify if you want to validate all of the collection elements regardless of the errors by + setting the property to false. +

+

Note, that defaults to true for this validator type!

+

+ If you set the IncludeElementErrors property to true, + ValidationErrors collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. +

+
+ Damjan Tomic + Aleksandar Seovic +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The bool that determines if all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Validates the specified collection of objects. + If the IncludeElementErrors property was set to true, + collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. + + The collection to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Gets or sets the value that indicates whether to validate all elements of the collection + regardless of the errors. + + This is just an alias for property + + + + Gets or sets the value that indicates whether to capture all the errors of the specific + elements of the collection + + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one and only one of the validators in the Validators collection are valid +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

+ By default, this validator group uses == true semantics. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + An interface that validation errors containers have to implement. + + Aleksandar Seovic + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied error . + + +

+ If there are no errors for the supplied , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all error providers. + + + + + Allows developers to specify which validator should be used + to validate method argument. + + Damjan Tomic + Aleksandar Seovic + + + + Creates an attribute instance. + + + The name of the validator to use (must be defined within + Spring application context). + + + + + Gets the name of the validator to use. + + The name of the validator to use. + + + + A container for validation errors. + + +

+ This class groups validation errors by validator names and allows + access to both the complete errors collection and to the errors for a + certain validator. +

+
+ Aleksandar Seovic + Goran Milosavljevic +
+ + + Default constructor. + + + + + This property is reserved, apply the + + to the class instead. + + + An that describes the + XML representation of the object that is produced by + the + method and consumed by the + + method. + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all providers. + + + + + Thrown by the validation advice if the method parameters validation fails. + + Aleksandar Seovic + + + + Creates a new instance of the ValidationException class. + + + + + Creates a new instance of the ValidationException class with + specified validation errors. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the ValidationException class with the + specified message and validation errors. + + + A message about the exception. + + + Validation errors. + + + + + Creates a new instance of the ValidationException 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 ValidationException class with the + specified message, root cause and validation errors. + + + A message about the exception. + + + The root exception that is being wrapped. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Implements object serialization. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Gets validation errors. + + Validation errors. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Represents a reference to an externally defined validator object + + +

+ This class allows validation groups to reference validators that + are defined outside of the group itself. +

+

+ It also allows users to narrow the context for the referenced validator + by specifying value for the Context property. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + The expression that determines if this validator should be evaluated. + + + + + Creates a new instance of the class. + + + The expression that determines if this validator should be evaluated. + + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Gets or sets the name of the referenced validator. + + The name of the referenced validator. + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + 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. + +
+ + diff --git a/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.dll b/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.dll new file mode 100644 index 0000000..974f608 Binary files /dev/null and b/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.dll differ diff --git a/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.pdb b/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.pdb new file mode 100644 index 0000000..975a77e Binary files /dev/null and b/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.pdb differ diff --git a/packages/Spring.Core.1.3.2/lib/net30/Spring.Core.xml b/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.xml similarity index 91% rename from packages/Spring.Core.1.3.2/lib/net30/Spring.Core.xml rename to packages/Spring.Core.2.0.1/lib/net40/Spring.Core.xml index a7bd651..fd8f020 100644 --- a/packages/Spring.Core.1.3.2/lib/net30/Spring.Core.xml +++ b/packages/Spring.Core.2.0.1/lib/net40/Spring.Core.xml @@ -1,49291 +1,52934 @@ - - - - Spring.Core - - - - - An abstract implementation that can - be used as base class for concrete implementations. - - Aleksandar Seovic - Erich Eichinger - - - - Defines a contract that all cache implementations have to fulfill. - - Aleksandar Seovic - Erich Eichinger - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method have no expiration time - and default cache priority. - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method use the default - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - If equals , - or is true, this cache - instance's value will be applied. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Actually does the cache implementation specific insert operation into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Gets/Set the Default time-to-live (TTL) for items inserted into this cache. - Used by - - - - - Gets/Sets a value, whether the this cache instance's - shall be applied to all items, regardless of their individual TTL - when is called. - - - - - Gets the number of items in the cache. - - - May be overridden by subclasses for cache-specific efficient implementation. - - - - - Gets a collection of all cache item keys. - - - - - Abstract base class containing shared properties for all cache attributes. - - Aleksandar Seovic - - - - The instance used to parse values. - - - - - - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - The cache key cannot evaluate be null or an empty string. - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the cache key for the item. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - Gets an expression instance that should be evaluated in order - to determine the cache key for the item. - - - An expression instance that should be evaluated in order to determine - the cache key for the item. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether the item should be cached. - - - An expression string that should be evaluated in order to determine - whether the item should be cached. - - - - - Gets an expression instance that should be evaluated in order - to determine whether the item should be cached. - - - An expression instance that should be evaluated in order to determine - whether the item should be cached. - - - - - The amount of time an object should remain in the cache. - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache - formatted to be recognizable by . - - - - - The amount of time an object should remain in the cache (in seconds). - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache (in seconds). - - - - - This attribute should be used to mark methods whose argument(s) - need to be cached. - - -

- This attribute allows application developers to specify that an argument - of the method should be cached, but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheParameterAdvice to - all of the members that have this attribute defined. -

-

- You can specify this attribute multiple times on the same method in order to - cache several method parameters. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark methods whose result - needs to be cached. - - -

- This attribute allows application developers to mark that a result - of the method invocation should be cached, but it will not do any - caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used with methods that return an - in order to cache each item separately. - - -

- This attribute allows application developers to specify that each item - from the collection returned by the method should be cached, - but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark method that should - invalidate one or more cache items when invoked. - - -

- This attribute allows application developers to specify that some - cache items should be evicted from cache when the method is invoked, - but it will not do any eviction by itself. -

-

- In order to actually evict cache items, an application developer - must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression string that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether items should be evicted. - - - An expression string that should be evaluated in order to determine - whether items should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine whether items should be evicted. - - - An expression instance that should be evaluated in order to determine - whether items should be evicted. - - - - - A simple implementation backed by a dictionary that - never expires cache items. - - Aleksandar Seovic - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL) in milliseconds. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - -

DictionarySet is an abstract class that supports the creation of new Set - types where the underlying data store is an IDictionary instance.

- -

You can use any object that implements the IDictionary interface to hold set data. - You can define your own, or you can use one of the objects provided in the Framework. - The type of IDictionary you choose will affect both the performance and the behavior - of the Set using it.

- -

To make a Set typed based on your own IDictionary, simply derive a - new class with a constructor that takes no parameters. Some Set implmentations - cannot be defined with a default constructor. If this is the case for your class, - you will need to override Clone() as well.

- -

It is also standard practice that at least one of your constructors takes an ICollection or - an ISet as an argument.

-
-
- -

A collection that contains no duplicate elements. This class models the mathematical - Set abstraction, and is the base class for all other Set implementations. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - Operator - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - | - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - & - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - ^ - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - - - -
-
- - -

A collection that contains no duplicate elements. This interface models the mathematical - Set abstraction. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns if this set contains no elements. - - - - - A collection that contains no duplicate elements. - - -

- This interface models the mathematical - abstraction. The order of - elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various - methods, and thus is not - guaranteed. -

-

- overrides the - method to test for "equivalency": - whether the two sets contain the same elements. The "==" and "!=" - operators are not overridden by design, since it is often desirable to - compare object references for equality. -

-

- Also, the method is not - implemented on any of the set implementations, since none of them are - truly immutable. This is by design, and it is the way almost all - collections in the .NET framework function. So as a general rule, don't - store collection objects inside - instances. You would typically want to use a keyed - instead. -

-

- None of the implementations in - this library are guaranteed to be thread-safe in any way unless wrapped - in a . -

-

- The following table summarizes the binary operators that are supported - by the class. -

- - - Operation - Description - Method - - - Union (OR) - - Element included in result if it exists in either A OR - B. - - Union() - - - Intersection (AND) - - Element included in result if it exists in both A AND - B. - - InterSect() - - - Exclusive Or (XOR) - - Element included in result if it exists in one, but not both, - of A and B. - - ExclusiveOr() - - - Minus (n/a) - - Take all the elements in A. Now, if any of them exist in - B, remove them. Note that unlike the other operators, - A - B is not the same as B - A. - - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - -

- That is, the element is included if it is in either - or this set. Neither this set nor the input - set are modified during the operation. The return value is a - clone of this set with the extra elements added in. -

-
- A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included if it exists in both sets. The - Intersect() operation does not modify the input sets. It - returns a clone of this set with the appropriate elements - removed. -

-
- A set of elements. - - The intersection of this set with . - -
- - - Performs a "minus" of this set from the - set. - - -

- This returns a set of all the elements in set - , removing the elements that are also in - this set. The original sets are not modified during this operation. - The result set is a clone of this - containing the elements from - the operation. -

-
- A set of elements. - - A set containing the elements from this set with the elements in - removed. - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of this set containing the elements - from the exclusive-or operation. -

-
- A set of elements. - - A set containing the result of - ^ this. - -
- - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains no elements. - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns a clone of the Set instance. This will work for derived Set - classes if the derived class implements a constructor that takes no arguments. - - A clone of this object. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the Set is synchronized across threads. Note that - enumeration is inherently not thread-safe. Use the SyncRoot to lock the - object during enumeration. - - - - - An object that can be used to synchronize this collection to make it thread-safe. - When implementing this, if your object uses a base object, like an IDictionary, - or anything that has a SyncRoot, return that object instead of "this". - - - - - Indicates whether the given instance is read-only or not - - - if the ISet is read-only; otherwise, . - In the default implementation of Set, this property always returns false. - - - - - Provides the storage for elements in the Set, stored as the key-set - of the IDictionary object. Set this object in the constructor - if you create your own Set class. - - - - - Adds the specified element to this set if it is not already present. - - The to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. Needed for - non-generic ISet methods implementation - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - The placeholder object used as the value for the IDictionary instance. - - - There is a single instance of this object globally, used for all Sets. - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - None of the objects based on DictionarySet are synchronized. Use the - SyncRoot property instead. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates wether the Set is read-only or not - - - - - Implements a Set based on a Dictionary (which is equivalent of - non-genric HashTable) This will give the best lookup, add, and remove - performance for very large data-sets, but iteration will occur in no particular order. - - - - - Creates a new set instance based on a Dictinary. - - - - - Creates a new set instance based on a Dictinary and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - -

Implements an immutable (read-only) Set wrapper.

-

Although this is advertised as immutable, it really isn't. Anyone with access to the - basisSet can still change the data-set. So GetHashCode() is not implemented - for this Set, as is the case for all Set implementations in this library. - This design decision was based on the efficiency of not having to Clone() the - basisSet every time you wrap a mutable Set.

-
-
- - - Constructs an immutable (read-only) Set wrapper. - - The Set that is wrapped. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - nothing - is always thrown - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - nothing - is always thrown - - - - Removes all objects from the set. - - is always thrown - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - nothing - is always thrown - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - nothing - is always thrown - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - nothing - is always thrown - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns an object that can be used to synchronize use of the Set across threads. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates that the given instance is read-only - - - - - Implements an ordered Set based on a dictionary. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - A collection of elements that defines the initial set contents. - - - - Represents a read only wrapper around a generic IDictionary. The design pattern - mirrors ReadOnlyCollection, and follows the apparent pattern that write operations - do not throw an exception, but simply make no change to the underlying collection. - - Originally put into the public domain. - http://www.simple-talk.com/community/forums/thread/2263.aspx - - - - Original from Public Domain - Mark Pollack (.NET) - - - - Inner storage for ReadOnlyDictionary - - - - - Easy access to non-generic dictionary API - - - - - Initializes a new instance of the class. - - The dictionary to wrap. - - - - Add does not change a read only Dictionary - - The object to use as the key of the element to add. - The object to use as the value of the element to add. - The is read-only. - - - - Determines whether the contains an element with the specified key. - - The key to locate in the . - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Remove does not change a read only Dictionary, will throw an exception. - - The is read-only. - - - - Tries the get value. - - The key. - The value. - - - - - Add does not change a read only Dictionary - - The object to add to the . - The is read-only. - - - - Clear does not change a read only Dictionary. - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if item is found in the ; otherwise, false. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - arrayIndex is less than 0. - array is null. - array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. - - - - Remove does not change a read only Dictionary. Throws an exception - - The object to remove from the . - - true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . - - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Add does not change a read only Dictionary. Throws an exception. - - The to use as the key of the element to add. - The to use as the value of the element to add. - The is read-only.-or- The has a fixed size. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Remove does not change a read only Dictionary. Throws an exception. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. - - - - Runs when the entire object graph has been deserialized. - - The object that initiated the callback. The functionality for this parameter is not currently implemented. - - - - Populates a with the data needed to serialize the target object. - - The to populate with data. - The destination (see ) for this serialization. - The caller does not have the required permission. - - - - Gets a read only containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the value with the specified key. - Set will throw an exception - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether the is read-only. - - - true if the is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets an containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the with the specified key. Set throws an exception. - - - The is read-only. - if try to set value - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Implements a Set based on a sorted tree. This gives good performance for operations on very - large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration - occurs in order. Elements that you put into this type of collection must implement IComparable, - and they must actually be comparable. You can't mix string and int values, for example. - - - - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree. - - The to use for sorting. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - The to use for sorting. - - - -

Implements a thread-safe Set wrapper. The implementation is extremely conservative, - serializing critical sections to prevent possible deadlocks, and locking on everything. - The one exception is for enumeration, which is inherently not thread-safe. For this, you - have to lock the SyncRoot object for the duration of the enumeration.

-
-
- - - Constructs a thread-safe Set wrapper. - - The Set object that this object will wrap. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot - to synchronize the entire enumeration process. - - - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns , indicating that this object is thread-safe. The exception to this - is enumeration, which is inherently not thread-safe. Use the SyncRoot object to - lock this object for the entire duration of the enumeration. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates whether given instace is read-only or not - - - - - This class provides skeletal implementations of some - operations. - - -

- The implementations in this class are appropriate when the base - implementation does not allow elements. The methods - , - , and - are based on - the , - , and - methods - respectively but throw exceptions instead of indicating failure via - or returns. -

- An implementation that extends this class must - minimally define a method - which does - not permit the insertion of elements, along with methods - , and - . Typically, - additional methods will be overridden as well. If these requirements - cannot be met, consider instead subclassing - }. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - A collection designed for holding elements prior to processing. - - -

- Besides basic operations, - queues provide additional insertion, extraction, and inspection - operations. -

-

- Each of these methods exists in two forms: one throws - an exception if the operation fails, the other returns a special - value (either or , depending on the - operation). The latter form of the insert operation is designed - specifically for use with capacity-restricted - implementations; in most implementations, insert operations cannot - fail. -

-

- Queues typically, but do not necessarily, order elements in a - FIFO (first-in-first-out) manner. Among the exceptions are - priority queues, which order elements according to a supplied - comparator, or the elements' natural ordering, and LIFO queues (or - stacks) which order the elements LIFO (last-in-first-out). - Whatever the ordering used, the head of the queue is that - element which would be removed by a call to - or - . In a FIFO queue, all new - elements are inserted at the tail of the queue. Other kinds of queues may - use different placement rules. Every implementation - must specify its ordering properties. -

-

- The method inserts an - element if possible, otherwise returning . This differs from the - method, which can fail to - add an element only by throwing an exception. The - method is designed for - use when failure is a normal, rather than exceptional occurrence, for example, - in fixed-capacity (or "bounded" queues. -

-

- The - methods remove and - return the head of the queue. Exactly which element is removed from the - queue is a function of the queue's ordering policy, which differs from - implementation to implementation. The - and - methods differ only in their - behavior when the queue is empty: the - method throws an exception, - while the method returns - . -

-

- The and - methods return, but do - not remove, the head of the queue. -

-

- The interface does not define the blocking queue - methods, which are common in concurrent programming. -

-

- implementations generally do not allow insertion - of elements, although some implementations, such as - a linked list, do not prohibit the insertion of . - Even in the implementations that permit it, should - not be inserted into a , as is also - used as a special return value by the - method to - indicate that the queue contains no elements. -

-

- implementations generally do not define - element-based versions of methods - and , but instead inherit the - identity based versions from the class object, because element-based equality - is not always well-defined for queues with the same elements but different - ordering properties. -

-

- Based on the back port of JCP JSR-166. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the class of the supplied prevents it - from being added to this queue. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue - - if this queue is empty -
- - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue. - - If this queue is empty. -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Returns if there are no elements in the , otherwise. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Inserts the specified element into this queue if it is possible - to do so immediately without violating capacity restrictions. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that - it throws an exception if this queue is empty. -

-
- - The head of this queue - - - If this queue is empty. - -
- - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-

- ALso note that this implementation returns the result of - unless the queue - is empty. -

-
- The head of this queue. - - If this queue is empty. - -
- - - Removes all of the elements from this queue. - - -

- The queue will be empty after this call returns. -

-

- This implementation repeatedly invokes - until it - returns . -

-
-
- - - Adds all of the elements in the supplied - to this queue. - - -

- Attempts to - - of a queue to itself result in . - Further, the behavior of this operation is undefined if the specified - collection is modified while the operation is in progress. -

-

- This implementation iterates over the specified collection, - and adds each element returned by the iterator to this queue, in turn. - An exception encountered while trying to add an element (including, - in particular, a element) may result in only some - of the elements having been successfully added when the associated - exception is thrown. -

-
- - The collection containing the elements to be added to this queue. - - - if this queue changed as a result of the call. - - - If the supplied or any one of its elements are . - - - If the collection is the current or - the collection size is greater than the queue capacity. - -
- - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns if there are no elements in the , otherwise. - - - - - Returns the current capacity of this queue. - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. - - Erich Eichinger - - - - Creates a case-insensitive hashtable using . - - - - - Creates a case-insensitive hashtable using the given . - - the to calculate the hashcode - - - - Creates a case-insensitive hashtable using the given , initially - populated with entries from another dictionary. - - the dictionary to copy entries from - the to calculate the hashcode - - - - Initializes a new, empty instance of the class that is serializable using the specified and objects. - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the object. - info is null. - - - - Implements the interface and returns the data needed to serialize the . - - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the . - info is null. - - - - Calculate the hashcode of the given string key, using the configured culture. - - - - - - - Compares two keys - - - - - Creates a shallow copy of the current instance. - - - - - is an - class that supports the creation of new - types where the underlying data - store is an instance. - - -

- You can use any object that implements the - interface to hold set - data. You can define your own, or you can use one of the objects - provided in the framework. The type of - you - choose will affect both the performance and the behavior of the - using it. -

-

- This object overrides the method, - but not the method, because - the class is mutable. - Therefore, it is not safe to use as a key value in a dictionary. -

-

- To make a typed based on your - own , simply derive a new - class with a constructor that takes no parameters. Some - implmentations cannot be defined - with a default constructor. If this is the case for your class, you - will need to override clone as well. -

-

- It is also standard practice that at least one of your constructors - takes an or an - as an argument. -

-
- -
- - - A collection that contains no duplicate elements. - - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs a "union" of two sets, where all the elements in both are - present. - - -

- That is, the element is included if it is in either - or . The return - value is a clone of one of the sets ( - if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. -

-
- A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - -
- - - Performs a "union" of two sets, where all the elements in both are - present. - - A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included only if it exists in both - and . Neither input - object is modified by the operation. The result object is a - clone of one of the input objects ( - if it is not ) containing the elements from - the intersect operation. -

-
- A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs a "minus" of set from set - . - - -

- This returns a set of all the elements in set - , removing the elements that are also in - set . The original sets are not modified - during this operation. The result set is a clone of set - containing the elements from the operation. -

-
- A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - -
- - - Performs a "minus" of set from set - . - - A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of one of the sets ( - if it is not ) - containing the elements from the exclusive-or operation. -

-
- A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Returns a clone of the - instance. - - -

- This will work for derived - classes if the derived class implements a constructor that takes no - arguments. -

-
- A clone of this object. -
- - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - This method will test the - against another for - "equality". - - -

- In this case, "equality" means that the two sets contain the same - elements. The "==" and "!=" operators are not overridden by design. - If you wish to check for "equivalent" - instances, use - Equals(). If you wish to check to see if two references are - actually the same object, use "==" and "!=". -

-
- - A object to compare to. - - - if the two sets contain the same elements. - -
- - - Gets the hashcode for the object. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - -

- When implementing this, if your object uses a base object, like an - , or anything that has - a SyncRoot, return that object instead of "this". -

-
- - An object that can be used to synchronize this collection to make - it thread-safe. - -
- - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Provides the storage for elements in the - , stored as the key-set - of the object. - - -

- Set this object in the constructor if you create your own - class. -

-
-
- - - The placeholder object used as the value for the - instance. - - - There is a single instance of this object globally, used for all - s. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Implements an based on a - hash table. - - -

- This will give the best lookup, add, and remove performance for very - large data-sets, but iteration will occur in no particular order. -

-
- -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class, and - initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an that automatically - changes from a list based implementation to a hashtable based - implementation when the size reaches a certain threshold. - - -

- This is good if you are unsure about whether you data-set will be tiny - or huge. -

- - Because this uses a dual implementation, iteration order is not - guaranteed! - -
- -
- - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size, and initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an immutable (read-only) - wrapper. - - -

- Although this class is advertised as immutable, it really isn't. - Anyone with access to the wrapped - can still change the data. So - is not implemented for this , as - is the case for all - implementations in this library. This design decision was based on the - efficiency of not having to clone the wrapped - every time you wrap a mutable - . -

-
-
- - - Constructs an immutable (read-only) - wrapper. - - - The that is to be wrapped. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - - Removes all objects from this set. - - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the - instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - Simple linked list implementation. - - Simon White - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class that contains all - elements of the specified list. - - - A list of elements that defines the initial contents. - - - - - Removes the object at the specified index. - - The lookup index. - - If the specified is greater than the - number of objects within the list. - - - - - Inserts an object at the specified index. - - The lookup index. - The object to be inserted. - - If the specified is greater than the - number of objects within the list. - - - - - Removes the first instance of the specified object found. - - The object to remove - - - - Returns if this list contains the specified - element. - - The element to look for. - - if this list contains the specified element. - - - - - Removes all objects from the list. - - - - - Returns the index of the first instance of the specified - found. - - The object to search for - - The index of the first instance found, or -1 if the element was not - found. - - - - - Adds the specified object to the end of the list. - - The object to add - The index that the object was added at. - - - - Adds all of the elements of the supplied - list to the end of this list. - - The list of objects to add. - - - - Checks whether the list can be modified. - - - If the list cannot be modified. - - - - - Validates the specified index. - - The lookup index. - - If the index is invalid. - - - - - Returns the node at the specified index. - - The lookup index. - The node at the specified index. - - If the specified is greater than the - number of objects within the list. - - - - - Returns the node (and index) of the first node that contains - the specified value. - - The value to search for. - - The node, or if not found. - - - - - Removes the specified node. - - The node to be removed. - - - - Copies the elements in this list to an array. - - -

- The type of array needs to be compatible with the objects in this - list, obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - - - If the supplied is . - - - If the supplied is less than zero - or is greater than the length of . - - - If the supplied is of insufficient size. - -
- - - Gets an enumerator for the elements in the - . - - -

- Enumerators are fail fast. -

-
- - An over the elements - in the . - -
- - - Is list read only? - - - if the list is read only. - - - - - Returns the node at the specified index. - - -

- This is the indexer for the - class. -

-
- -
- - - Is the list a fixed size? - - - if the list is a fixed size list. - - - - - Returns if the list is synchronized across - threads. - - - - This implementation always returns . - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - The number of objects within the list. - - - - - An object that can be used to synchronize this - to make it thread-safe. - - - An object that can be used to synchronize this - to make it thread-safe. - - - - - Implements a based on a list. - - -

- Performance is much better for very small lists than either - or . - However, performance degrades rapidly as the data-set gets bigger. Use a - instead if you are not sure your data-set - will always remain very small. Iteration produces elements in the order they were added. - However, element order is not guaranteed to be maintained by the various - mathematical operators. -

-
-
- - - Creates a new set instance based on a list. - - - - - Creates a new set instance based on a list and initializes it based on a - collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Thrown when an element is requested from an empty . - - Griffin Caprio - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - An unbounded priority based on a priority - heap. This queue orders elements according to an order specified - at construction time, which is specified either according to their - natural order (see , or according to a - , depending on which constructor is - used. A priority queue does not permit elements. - A priority queue relying on natural ordering also does not - permit insertion of non-comparable objects (doing so will result - . - -

- The head of this queue is the lowest element - with respect to the specified ordering. If multiple elements are - tied for lowest value, the head is one of those elements -- ties are - broken arbitrarily. - -

- A priority queue is unbounded, but has an internal - capacity governing the size of an array used to store the - elements on the queue. It is always at least as large as the queue - size. As elements are added to a priority queue, its capacity - grows automatically. The details of the growth policy are not - specified. - -

- This class and its enumerator implement all of the - optional methods of the and - interfaces. - The enumerator provided in method - is not guaranteed to traverse the elements of the PriorityQueue in any - particular order. - -

- Note that this implementation is NOT synchronized. - Multiple threads should not access a - instance concurrently if any of the threads modifies the list - structurally. Instead, use the thread-safe PriorityBlockingQueue. -

- Josh Bloch - Griffin Caprio (.NET) -
- - - Priority queue represented as a balanced binary heap: the two children - of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is - ordered by comparator, or by the elements' natural ordering, if - comparator is null: For each node n in the heap and each descendant d - of n, n <= d. - - The element with the lowest value is in queue[1], assuming the queue is - nonempty. (A one-based array is used in preference to the traditional - zero-based array to simplify parent and child calculations.) - - queue.length must be >= 2, even if size == 0. - - - - The number of elements in the priority queue. - - - - The comparator, or null if priority queue uses elements' - natural ordering. - - - - - The number of times this priority queue has been - structurally modified. - - - - - Creates a with the default initial capacity - (11) that orders its elements according to their natural - ordering (using ). - - - - - Creates a with the specified initial capacity - that orders its elements according to their natural ordering - (using ). - - the initial capacity for this priority queue. - - if is less than 1. - - - - Creates a with the specified initial capacity - that orders its elements according to the specified comparator. - - the initial capacity for this priority queue. - the comparator used to order this priority queue. - If then the order depends on the elements' natural ordering. - - if is less than 1. - - - - Creates a containing the elements in the - specified collection. The priority queue has an initial - capacity of 110% of the size of the specified collection or 1 - if the collection is empty. If the specified collection is an - instance of a , the priority queue will be sorted - according to the same comparator, or according to its elements' - natural order if the collection is sorted according to its - elements' natural order. Otherwise, the priority queue is - ordered according to its elements' natural order. - - the collection whose elements are to be placed into this priority queue. - if elements of cannot be - compared to one another according to the priority queue's ordering - if or any element with it is - - - - - - Common code to initialize underlying queue array across - constructors below. - - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - - Establishes the heap invariant assuming the heap - satisfies the invariant except possibly for the leaf-node indexed by k - (which may have a nextExecutionTime less than its parent's). - - - This method functions by "promoting" queue[k] up the hierarchy - (by swapping it with its parent) repeatedly until queue[k] - is greater than or equal to its parent. - - - - - Establishes the heap invariant (described above) in the subtree - rooted at k, which is assumed to satisfy the heap invariant except - possibly for node k itself (which may be greater than its children). - - - This method functions by "demoting" queue[k] down the hierarchy - (by swapping it with its smaller child) repeatedly until queue[k] - is less than or equal to its children. - - - - - Establishes the heap invariant in the entire tree, - assuming nothing about the order of the elements prior to the call. - - - - - Returns the of or - 1, - whichever is smaller. - - base size - percentage to return - of - - - - Initially fill elements of the queue array under the - knowledge that it is sorted or is another , in which - case we can just place the elements in the order presented. - - - - - Initially fill elements of the queue array that is not to our knowledge - sorted, so we must rearrange the elements to guarantee the heap - invariant. - - - - - Removes and returns element located at from queue. (Recall that the queue - is one-based, so 1 <= i <= size.) - - - Normally this method leaves the elements at positions from 1 up to i-1, - inclusive, untouched. Under these circumstances, it returns . - Occasionally, in order to maintain the heap invariant, it must move - the last element of the list to some index in the range [2, i-1], - and move the element previously at position (i/2) to position i. - Under these circumstances, this method returns the element that was - previously at the end of the list and is now at some position between - 2 and i-1 inclusive. - - - - Resize array, if necessary, to be able to hold given index - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - and this queue does not permit - elements. - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - - - Removes a single instance of the specified element from this - queue, if it is present. - - - - - Returns an over the elements in this queue. - The enumeratoar does not return the elements in any particular order. - - an enumerator over the elements in this queue. - - - - Removes all elements from the priority queue. - The queue will be empty after this call returns. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Queries the queue to see if it contains the specified - - element to look for. - if the queue contains the , - otherwise. - - - Returns the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering - (using ). - - - the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering. - - - - - Save the state of the instance to a stream (that - is, serialize it). - - The length of the array backing the instance is - emitted (int), followed by all of its elements (each an - ) in the proper order. - - the stream - the context - - - - Reconstitute the instance from a stream (that is, - deserialize it). - - the stream - the context - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Copies the elements of the to an , starting at index 0. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Gets the Capacity of this queue. Will equal - - - - - Returns the queue count. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Returns if there are no elements in the , otherwise. - - - - - Index (into queue array) of element to be returned by subsequent call to next. - - - - - Implements an based on a sorted - tree. - - -

- This gives good performance for operations on very large data-sets, - though not as good - asymptotically - as a - . However, iteration occurs - in order. -

-

- Elements that you put into this type of collection must implement - , and they must actually be comparable. - You can't mix and - values, for example. -

-

- This implementation does - not support elements that are . -

-
- -
- - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree using for ordering. - - - - - Creates a new set instance based on a sorted tree and initializes - it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Synchronized that should be returned by synchronized - dictionary implementations in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that should be returned by synchronized - collections in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that, unlike hashtable created - using method, synchronizes - reads from the underlying hashtable in addition to writes. - - -

- In addition to synchronizing reads, this implementation also fixes - IEnumerator/ICollection issue described at - http://msdn.microsoft.com/en-us/netframework/aa570326.aspx - (search for SynchronizedHashtable for issue description), by implementing - interface explicitly, and returns thread safe enumerator - implementations as well. -

-

- This class should be used whenever a truly synchronized - is needed. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of - - - - - Initializes a new instance of - - - - - Initializes a new instance of , copying inital entries from - handling keys depending on . - - - - - Creates a instance that - synchronizes access to the underlying . - - the hashtable to be synchronized - - - - Creates a wrapper that synchronizes - access to the passed . - - the hashtable to be synchronized - - - - Adds an element with the provided key and value to the object. - - The to use as the value of the element to add. - The to use as the key of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. 2 - - - - Removes all elements from the object. - - The object is read-only. 2 - - - - Creates a new object that is a copy of the current instance. - - - A new object that is a copy of this instance. - - - - - Determines whether the object contains an element with the specified key. - - - true if the contains an element with the key; otherwise, false. - - The key to locate in the object. - key is null. 2 - - - - Returns, whether this contains an entry with the specified . - - The key to look for - , if this contains an entry with this - - - - Returns, whether this contains an entry with the specified . - - The valúe to look for - , if this contains an entry with this - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets or sets the element with the specified key. - - - The element with the specified key. - - The key of the element to get or set. - The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. - key is null. 2 - - - - Implements a thread-safe wrapper. - - -

- The implementation is extremely conservative, serializing critical - sections to prevent possible deadlocks, and locking on everything. The - one exception is for enumeration, which is inherently not thread-safe. - For this, you have to lock the SyncRoot object for the - duration of the enumeration. -

-
- -
- - - Constructs a thread-safe - wrapper. - - - The object that this object - will wrap. - - - If the supplied ecposes a - SyncRoot value. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the instance. - - A clone of this object. - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Simple listener that logs application events to the console. - - -

- Intended for use during debugging only. -

-
- Rod Johnson - Griffin Caprio (.NET) - -
- - - A listener for application events. - - Rod Johnson - Griffin Caprio (.NET) - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Creates a new instance of the - class. - - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle events. - - Griffin Caprio (.NET) - - - - - - - Encapsulates the data associated with an event raised by an - . - - Rod Johnson - Mark Pollack (.NET) - Griffin Caprio (.NET) - - - - - Creates a new instance of the - class. - - - - - The date and time when the event occured. - - - The date and time when the event occured. - - - - - The system time in milliseconds when the event happened. - - - The system time in milliseconds when the event happened. - - - - - Creates a new instance of the ContextEventArgs class to represent the - supplied context event. - - The type of context event. - - - - Returns a string representation of this object. - - A string representation of this object. - - - - The event type. - - - - - The various context event types. - - - - - The event type when the context is refreshed or created. - - - - - The event type when the context is closed. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Partial implementation of the - interface. - - -

- Does not mandate the type of storage used for configuration, but does - implement common functionality. Uses the Template Method design - pattern, requiring concrete subclasses to implement - methods. -

-

- In contrast to a plain vanilla - , an - is supposed - to detect special objects defined in its object factory: therefore, - this class automatically registers - s, - s - and s that are - defined as objects in the context. -

-

- An may be also supplied as - an object in the context, with the special, well-known-name of - "messageSource". Else, message resolution is delegated to the - parent context. -

-
- Rod Johnson - Juergan Hoeller - Griffin Caprio (.NET) - - -
- - - Configurable implementation of the - interface. - - -

- This implementation - supports the configuration of resource access protocols and the - corresponding .NET types that know how to handle those protocols. -

-

- Basic protocol-to-resource type mappings are also defined by this class, - while others can be added either internally, by application contexts - extending this class, or externally, by the end user configuring the - context. -

-

- Only one resource type can be defined for each protocol, but multiple - protocols can map to the same resource type (for example, the - "http" and "ftp" protocols both map to the - type. The protocols that are - mapped by default can be found in the following list. -

-

- - - assembly - - - config - - - file - - - http - - - https - - -

-
- Aleksandar Seovic - - - -
- - - Describes an object that can load - s. - - -

- An implementation is - generally required to support the functionality described by this - interface. -

-

- The class is a - standalone implementation that is usable outside an - ; the aforementioned - class is also used by the - class. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Return an handle for the - specified resource. - - -

- The handle should always be a reusable resource descriptor; this - allows one to make repeated calls to the underlying - . -

-

-

    -
  • - Must support fully qualified URLs, e.g. "file:C:/test.dat". -
  • -
  • - Should support relative file paths, e.g. "test.dat" (this will be - implementation-specific, typically provided by an - implementation). -
  • -
-

- - An handle does not imply an - existing resource; you need to check the value of an - 's - property to determine - conclusively whether or not the resource actually exists. - -
- The resource location. - - An appropriate handle. - - - - -
- - - The separator between the protocol name and the resource name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified default protocol for unqualified resources. - - - - - Returns a that has been - mapped to the protocol of the supplied . - - The name of the resource. - - A new instance for the - supplied . - - - If a - mapping does not exist for the supplied . - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - - Checks that the supplied starts - with one of the protocol names currently mapped by this - instance. - - The name of the resource. - - if the supplied - starts with one of the known - protocols; if not, or if the supplied - is itself . - - - - - Extracts the protocol name from the supplied - . - - The name of the resource. - - The extracted protocol name or if the - supplied is unqualified (or - is itself ). - - - - - The default protocol to use for unqualified resources. - - -

- The initial value is "file". -

-
-
- - - Provides the means to configure an application context in addition to - the methods exposed on the - interface. - - -

- This interface is to be implemented by most (if not all) - implementations. -

-

- Configuration and lifecycle methods are encapsulated here to avoid - making them obvious to - client code. -

-

- Calling will close this - application context, releasing all resources and locks that the - implementation might hold. This includes disposing all cached - singleton objects. -

- - does not invoke the - attendant on any parent - context. - -
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - The central interface to Spring.NET's IoC container. - - -

- implementations - provide: - - - - Object factory functionality inherited from the - - and - interfaces. - - - - - The ability to resolve messages, supporting internationalization. - Inherited from the - interface. - - - - - The ability to load file resources in a generic fashion. - Inherited from the - interface. - - - - - Acts an an event registry for supporting loosely coupled eventing - between objecs. Inherited from the - interface. - - - - - The ability to raise events related to the context lifecycle. Inherited - from the - interface. - - - - - Inheritance from a parent context. Definitions in a descendant context - will always take priority. - - - -

-

- In addition to standard object factory lifecycle capabilities, - implementations need - to detect - , - , and - objects and supply - their attendant dependencies accordingly. -

-

- This interface is the central client interface in Spring.NET's IoC - container implementation. As such it does inherit a quite sizeable - number of interfaces; implementations are strongly encouraged to use - composition to satisfy each of the inherited interfaces (where - appropriate of course). -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - -
- - - Extension of the interface - to be implemented by object factories that can enumerate all their object instances, - rather than attempting object lookup by name one by one as requested by clients. - - -

- implementations that preload - all their objects (for example, DOM-based XML factories) may implement this - interface. This interface is discussed in - "Expert One-on-One J2EE Design and Development", by Rod Johnson. -

-

- If this is an , - the return values will not take any - hierarchy into account, but - will relate only to the objects defined in the current factory. - Use the helper class to - get all objects. -

-

- With the exception of - , - the methods and properties in this interface are not designed for frequent - invocation. Implementations may be slow. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - The root interface for accessing a Spring.NET IoC container. - - - - This is the basic client view of a Spring.NET IoC container; further interfaces - such as and - - are available for specific purposes such as enumeration and configuration. - - - This is the root interface to be implemented by objects that can hold a number - of object definitions, each uniquely identified by a - name. An independent instance of any of these objects can be obtained - (the Prototype design pattern), or a single shared instance can be obtained - (a superior alternative to the Singleton design pattern, in which the instance is a - singleton in the scope of the factory). Which type of instance - will be returned depends on the object factory configuration - the API is the same. - The Singleton approach is more useful and hence more common in practice. - - - The point of this approach is that the IObjectFactory is a central registry of - application components, and centralizes the configuring of application components - (no more do individual objects need to read properties files, for example). - See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a - discussion of the benefits of this approach. - - - Normally an IObjectFactory will load object definitions stored in a configuration - source (such as an XML document), and use the - namespace to configure the objects. However, an implementation could simply return - .NET objects it creates as necessary directly in .NET code. There are no - constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties - file etc. Implementations are encouraged to support references amongst objects, - to either Singletons or Prototypes. - - - In contrast to the methods in - , all of the methods - in this interface will also check parent factories if this is an - . If an object is - not found in this factory instance, the immediate parent is asked. Objects in - this factory instance are supposed to override objects of the same name in any - parent factory. - - - Object factories are supposed to support the standard object lifecycle interfaces - as far as possible. The maximum set of initialization methods and their standard - order is: - - - - - - 's - property. - - - - - 's - property. - - - - - - (only applicable if running within an ). - - - - - The - - method of - s. - - - - - 's - method. - - - - - A custom init-method definition. - - - - - The - - method of - s. - - - - -

- - On shutdown of an object factory, the following lifecycle methods apply: - - - - - - 's - method. - - - - - A custom destroy-method definition. - - - - - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - -

- Is this object a singleton? - - - - That is, will - always return the same object? - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Does this object factory contain an object with the given name? - - - - The concrete lookup strategy depends on the implementation. E.g. s - will also search their parent factory if a name isn't found . - - - The name of the object to query. - True if an object with the given name is defined. - - - - Return the aliases for the given object name, if defined. - - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - Provides a measure of type safety by throwing an exception if the object is - not of the required . - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - Determine the type of the object with the given name. - - - - More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. - - - The name of the object to query. - - The type of the object or if not determinable. - - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - In addition to being generally useful, typically this method is used to provide - dependency injection functionality for objects that are instantiated outwith the - control of a developer. A case in point is the way that the current (1.1) - ASP.NET classes instantiate web controls... the instantiation takes place within - a private method of a compiled page, and thus cannot be hooked into the - typical Spring.NET IOC container lifecycle for dependency injection. - - - - The following code snippet assumes that the instantiated factory instance - has been configured with an object definition named - 'ExampleNamespace.BusinessObject' that has been configured to set the - Dao property of any ExampleNamespace.BusinessObject instance - to an instance of an appropriate implementation... - - namespace ExampleNamespace - { - public class BusinessObject - { - private IDao _dao; - - public BusinessObject() {} - - public IDao Dao - { - get { return _dao; } - set { _dao = value; } - } - } - } - - with the corresponding driver code looking like so... - - IObjectFactory factory = GetAnIObjectFactoryImplementation(); - BusinessObject instance = new BusinessObject(); - factory.ConfigureObject(instance, "object_definition_name"); - // at this point the dependencies for the 'instance' object will have been resolved... - - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - If there is no object definition for the supplied . - - - If any of the target object's dependencies could not be created. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - This is the indexer for the - interface. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Check if this object factory contains an object definition with the given name. - - -

- Does not consider any hierarchy this factory may participate in. -

- - Ignores any singleton objects that have been registered by other means - than object definitions. - -
- The name of the object to look for. - - if this object factory contains an object - definition with the given name. - -
- - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. - Use - to include beans in ancestor factories too. - <p>Note: Does <i>not</i> ignore singleton objects that have been registered - by other means than bean definitions. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Sub-interface implemented by object factories that can be part - of a hierarchy. - - Rod Johnson - Rick Evans (.NET) - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts, also resolving a given alias if necessary. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Return the parent object factory, or - if this factory does not have a parent. - - - The parent object factory, or - if this factory does not have a parent. - - - - - Describes an object that can resolve messages. - - -

- This enables the parameterization and internationalization of messages. -

-

- Spring.NET provides one out-of-the-box implementation for production - use: -

    -
  • .
  • -
-

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - The default message if name is not found. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - -

- This method must use the - - value to obtain a resource. -

-

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The resolved object, or if not found. - -
- - - Gets a localized resource object identified by the supplied - . - - -

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - -
- - - Applies resources to object properties. - - -

- Resource key names are of the form objectName.propertyName. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - - Encapsulates event publication functionality. - - -

- Serves as a super-interface for the - interface. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Publishes an application context event. - - - The source of the event. May be . - - - The event that is to be raised. - - - - - A registry that manages subscriptions to and the - publishing of events. - - Griffin Caprio - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - Subscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Raised in response to an application context event. - - - - - Returns the date and time this context was loaded. - - -

- This is to be set immediately after an - has been - instantiated and its configuration has been loaded. Implementations - are permitted to update this value if the context is reset or - refreshed in some way. -

-
- - The representing when this context - was loaded. - - -
- - - Gets the parent context, or if there is no - parent context. - - -

- If the parent context is , then this context - is the root of any context hierarchy. -

-
- - The parent context, or if there is no - parent. - -
- - - Gets and sets a name for this context. - - - A name for this context. - - - - - Interface defining methods for start/stop lifecycle control. - The typical use case for this is to control asynchronous processing. - - - - Can be implemented by both components (typically a Spring object defined in - a spring and containers - (typically a spring . Containers will - propagate start/stop signals to all components that apply. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Gets a value indicating whether this component is currently running. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - true if this component is running; otherwise, false. - - - - - Add an - - that will get applied to the internal object factory of this - application context on refresh, before any of the object - definitions are evaluated. - - -

- To be invoked during context configuration. -

-
- - The factory processor to register. - - -
- - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Return the internal object factory of this application context. - - -

- Can be used to access specific functionality of the factory. -

- - This is just guaranteed to return an instance that is not - after the context has been refreshed - at least once. - - - Do not use this to post-process the object factory; singletons - will already have been instantiated. Use an - - to intercept the object factory setup process before objects even - get touched. - -
- -
- - - Sets the parent of this application context. - - - - The parent should not be changed: it should only be set - outside a constructor if it isn't available when an instance of - this class is created. - - - - The parent context. - - - - - Interface for registries that hold object definitions, i.e. - - and - - instances. - - -

- Typically implemented by object factories that work with the - - hierarchy internally. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Determine whether the given object name is already in use within this registry, - i.e. whether there is a local object or alias registered under this name. - - - - - Return the names of all objects defined in this registry. - - - The names of all objects defined in this registry, or an empty array - if none defined - - - - - Check if this registry contains a object definition with the given name. - - - The name of the object to look for. - - - True if this object factory contains an object definition with the - given name. - - - - - Returns the - - for the given object name. - - - The name of the object to find a definition for. - - - The for - the given name (never null). - - - If the object definition cannot be resolved. - - - In case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Return the aliases for the given object name, if defined. - - the object name to check for aliases - - -

- Will ask the parent factory if the object cannot be found in this - factory instance. -

-
- - The aliases, or an empty array if none. - - - If there's no such object definition. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - - The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Return the number of objects defined in the registry. - - - The number of objects defined in the registry. - - - - - Name of the .Net config section that contains Spring.Net context definition. - - - - - Default name of the root context. - - - - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then message resolution - will be delegated to the parent context (if any). -

-
-
- - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then a default - will be used. -

-
-
- - - The instance for this class. - - - - - The instance we delegate - our implementation of said interface to. - - - - - The instance we - delegate our implementation of said interface to. - - - - - Creates a new instance of the - with no parent context. - - -

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

-
-
- - - Creates a new instance of the - with no parent context. - - -

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

-
- Flag specifying whether to make this context case sensitive or not. -
- - - Creates a new instance of the - with the supplied parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent application context. -
- - - Adds the given to the list of standard - processors being added to the underlying - - - Each time is called on this context, the context ensures, that - all default s are registered with the underlying . - - The instance. - - - - Closes this context and disposes of any resources (such as - singleton objects in the wrapped - ). - - - - - Subclasses must implement this method to perform the actual - configuration loading. - - -

- This method is invoked by - , - before any other initialization occurs. -

-
- - In the case of errors encountered while refreshing the object factory. - -
- - - Returns the internal object factory of the parent context if it implements - ; else, - returns the parent context itself. - - - The parent context's object factory, or the parent itself. - - - - - Raises an application context event. - - - Any arguments to the event. May be . - - - - - Raises an application context event. - - - The source of the event. - - - Any arguments to the event. May be . - - - - - Create the strategy to be used - - - - - Modify the application context's internal object factory after its standard - initialization. - - -

- All object definitions will have been loaded, but no objects - will have been instantiated yet. This allows for the registration - of special - s - in certain - implementations. -

-
- - The object factory used by the application context. - - - In the case of errors. - . -
- - - Template method which can be overridden to add context-specific - work before the underlying object factory gets refreshed. - - - - - Template method which can be overridden to add context-specific - refresh work. - - -

- Called on initialization of special objects, before instantiation - of singletons. -

-
-
- - - Template method which can be overridden to add context-specific - work after the context was refreshed but before the - event gets raised. - - - - - Instantiate and invoke all registered - - objects, respecting any explicit ordering. - - - - Must be called before singleton instantiation. - - - In the case of errors. - - - - Resets the well-known ObjectPostProcessorChecker that logs an info - message when an object is created during IObjectPostProcessor - instantiation, i.e. when an object is not eligible for being - processed by all IObjectPostProcessors. - - - - - Initializes the default event registry for this context. - - - - - Returns the internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - The internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - - - Initializes the default message source for this context. - - -

- Uses any parent context's message source if one is not available - in this context. -

-
-
- - - Add a new - that will get applied to the internal object factory of this application context - on refresh, before any of the object definitions are evaluated. - - - The factory processor to register. - - - - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Registers well-known s and - preregisters well-known dependencies using - - the raw object factory as returned from - - - - Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory - - - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Check if this object factory contains an object definition with the given name. - - The name of the object to look for. - - True if this object factory contains an object definition with the given name. - - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - - if an object with the given name is defined. - - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Is this object a singleton? - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determine the of the object with the - given name. - - The name of the object to query. - - The of the object, or - if not determinable. - - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - - - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Determine whether the given object name is already in use within this context, - i.e. whether there is a local object. May be override by subclasses, the default - implementation simply returns - - - - - Register a new object definition with this registry. - Must support - - and . - - The name of the object instance to register. - The definition of the object instance to register. - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - The name of the object. - The alias that will behave the same as the object name. - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - - Subscribes to published events of a all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Publishes an application context event. - - -

- -

-
- - The source of the event. May be . - - - The event that is to be raised. - - -
- - - An object that can be used to synchronize access to the - - - - - Set the to be used by this context. - - - - - The timestamp when this context was first loaded. - - - The timestamp (milliseconds) when this context was first loaded. - - - - - Gets a flag indicating whether context should be case sensitive. - - true if object lookups are case sensitive; otherwise, false. - - - - The for this context. - - - If the context has not been initialized yet. - - - - - The for this context. - - - If the context has not been initialized yet. - - - - - Returns the list of the - s - that will be applied to the objects created with this factory. - - -

- The elements of this list are instances of implementations of the - - interface. -

-
- - The list of the - s - that will be applied to the objects created with this factory. - -
- - - Return the internal object factory of this application context. - - - - - Gets the parent context, or if there is no - parent context. - - - The parent context, or if there is no - parent. - - - - - - Gets a value indicating whether this component is currently running. - - - true if this component is running; otherwise, false. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - - - Gets a dictionary of all singleton beans that implement the - ILifecycle interface in this context. - - A dictionary of ILifecycle objects with object name as key. - - - - Raised in response to an implementation-dependant application - context event. - - - - - The date and time this context was first loaded. - - - The representing when this context - was first loaded. - - - - - A name for this context. - - - A name for this context. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return the parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - - Allows for custom modification of new object instances, e.g. - checking for marker interfaces or wrapping them with proxies. - - -

- Application contexts can auto-detect - - objects in their object definitions and apply them before any other - objects get created. Plain object factories allow for programmatic - registration of post-processors. -

-

- Typically, post-processors that populate objects via marker interfaces - or the like will implement - , - and post-processors that wrap objects with proxies will normally implement - . -

-
- Juergen Hoeller - Aleksandar Seovic (.NET) - -
- - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Interface that can be implemented by objects that should be orderable, e.g. in an - . - - -

- The actual order can be interpreted as prioritization, the first object (with the - lowest order value) having the highest priority. -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Abstract implementation of the interface, - implementing common handling of message variants, making it easy - to implement a specific strategy for a concrete . - - -

Subclasses must implement the abstract ResolveObject - method.

-

Note: By default, message texts are only parsed through - String.Format if arguments have been passed in for the message. In case - of no arguments, message texts will be returned as-is. As a consequence, - you should only use String.Format escaping for messages with actual - arguments, and keep all other messages unescaped. -

-

Supports not only IMessageSourceResolvables as primary messages - but also resolution of message arguments that are in turn - IMessageSourceResolvables themselves. -

-

This class does not implement caching of messages per code, thus - subclasses can dynamically change messages over time. Subclasses are - encouraged to cache their messages in a modification-aware fashion, - allowing for hot deployment of updated messages. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - Harald Radi (.NET) - - - -
- - - Sub-interface of to be - implemented by objects that can resolve messages hierarchically. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - holds the logger instance shared with subclasses. - - - - - Initializes this instance. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- If the lookup is not successful throw NoSuchMessageException -
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException. -

-
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message if name is not found. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException -

-
-
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - The value object storing those attributes that are required to - properly resolve a message. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful. - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. If - the resource name resolves to null, then in .NET 1.1 the return - value will be String.Empty whereas in .NET 2.0 it will return - null. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Resolve the given code and arguments as message in the given culture, - returning null if not found. Does not fall back to the code - as default message. Invoked by GetMessage methods. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Try to retrieve the given message from the parent MessageSource, if any. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Return a fallback default message for the given code, if any. - - - Default is to return the code itself if "UseCodeAsDefaultMessage" - is activated, or return no fallback else. In case of no fallback, - the caller will usually receive a NoSuchMessageException from GetMessage - - The code to lookup up, such as 'calculator.noRateSet'. - The default message to use, or null if none. - - - - Renders the default message string. The default message is passed in as specified by the - caller and can be rendered into a fully formatted default message shown to the user. - - Default implementation passed he String for String.Format resolving any - argument placeholders found in them. Subclasses may override this method to plug - in custom processing of default messages. - - The default message. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The rendered default message (with resolved arguments) - - - - Format the given default message String resolving any - agrument placeholders found in them. - - The message to format. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The formatted message (with resolved arguments) - - - - Search through the given array of objects, find any - MessageSourceResolvable objects and resolve them. - - - Allows for messages to have MessageSourceResolvables as arguments. - - - The array of arguments for a message. - The with which the - resource is associated. - An array of arguments with any IMessageSourceResolvables resolved - - - - Gets the specified resource (e.g. Icon or Bitmap). - - The name of the resource to resolve. - - The to resolve the - code for. - - The resource if found. otherwise. - - - - Applies resources from the given name on the specified object. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Subclasses must implement this method to resolve a message. - - The code to lookup up, such as 'calculator.noRateSet'. - The with which the - resource is associated. - The resolved message from the backing store of message data. - - - - Resolves an object (typically an icon or bitmap). - - -

- Subclasses must implement this method to resolve an object. -

-
- The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - -
- - - Applies resources to object properties. - - -

- Subclasses must implement this method to apply resources - to an arbitrary object. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - Gets or Sets a value indicating whether to use the message code as - default message instead of throwing a NoSuchMessageException. - Useful for development and debugging. Default is "false". - - -

Note: In case of a IMessageSourceResolvable with multiple codes - (like a FieldError) and a MessageSource that has a parent MessageSource, - do not activate "UseCodeAsDefaultMessage" in the parent: - Else, you'll get the first code returned as message by the parent, - without attempts to check further codes.

-

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, - AbstractMessageSource contains special checks - to delegate to the internal GetMessageInternal method if available. - In general, it is recommended to just use "UseCodeAsDefaultMessage" during - development and not rely on it in production in the first place, though.

-

Alternatively, consider overriding the GetDefaultMessage - method to return a custom fallback message for an unresolvable code.

-
- - true if use the message code as default message instead of - throwing a NoSuchMessageException; otherwise, false. - -
- - - The parent message source used to try and resolve messages that - this object can't resolve. - - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - Convenient abstract superclass for - implementations that - draw their configuration from XML documents containing object - definitions as understood by an - . - - Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - class - with the given parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent context. -
- - - Instantiates and populates the underlying - with the object - definitions yielded up by the - method. - - - In the case of errors encountered while refreshing the object factory. - - - In the case of errors encountered reading any of the resources - yielded by the method. - - - - - - Initialize the object definition reader used for loading the object - definitions of this context. - - -

- The default implementation of this method is a no-op; i.e. it does - nothing. Can be overridden in subclasses to provide custom - initialization of the supplied - ; for example, a derived - class may want to turn off XML validation. -

-
- - The object definition reader used by this context. - -
- - - Load the object definitions with the given - . - - -

- The lifecycle of the object factory is handled by - ; - therefore this method is just supposed to load and / or register - object definitions. -

-
- - The reader containing object definitions. - - In case of object registration errors. - - - In the case of errors encountered reading any of the resources - yielded by either the or - the methods. - -
- - - Loads the object definitions into the given object factory, typically through - delegating to one or more object definition readers. - - The object factory to lead object definitions into - - - - - - Create a new reader instance for importing object definitions into the specified . - - the to be associated with the reader - a new instance. - - - - Customizes the internal object factory used by this context. - - Called for each attempt. -

- The default implementation is empty. Can be overriden in subclassses to customize - DefaultListableBeanFatory's standard settings. -

- The newly created object factory for this context -
- - - Create an internal object factory for this context. - - -

- Called for each attempt. - This default implementation creates a - - with the internal object factory of this context's parent serving - as the parent object factory. Can be overridden in subclasse,s - for example to customize DefaultListableBeanFactory's settings. -

-
- The object factory for this context. -
- - - Determine whether the given object name is already in use within this context's object factory, - i.e. whether there is a local object or alias registered under this name. - - - - - An array of resource locations, referring to the XML object - definition files that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of resource locations, or if none. - -
- - - An array of resources that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of s, or if none. - -
- - - Subclasses must return their internal object factory here. - - - The internal object factory for the application context. - - - - - - - implementation that passes the application context to object that - implement the - , - , and - interfaces. - - -

- If an object's class implements more than one of the - , - , and - interfaces, then the - order in which the interfaces are satisfied is as follows... - - - - - - - - - - - -

-

- Application contexts will automatically register this with their - underlying object factory. Applications should thus never need to use - this class directly. -

-
- Juergen Hoeller - Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - The that this - instance will work with. - - - - - Apply this - to the given new object instance before any object - initialization callbacks. - - - The new object instance. - - - The name of the object. - - - The 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. - - - 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. - - - - - - Convenient superclass for application objects that want to be aware of - the application context, e.g. for custom lookup of collaborating object - or for context-specific resource access. - - -

- It saves the application context reference and provides an - initialization callback method. Furthermore, it offers numerous - convenience methods for message lookup. -

-

- There is no requirement to subclass this class: it just makes things - a little easier if you need access to the context, e.g. for access to - file resources or to the message source. Note that many application - objects do not need to be aware of the application context at all, - as they can receive collaborating objects via object references. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) -
- - - To be implemented by any object that wishes to be notified - of the that it runs in. - - -

- Implementing this interface makes sense when an object requires access - to a set of collaborating objects. Note that configuration via object - references is preferable to implementing this interface just for object - lookup purposes. -

-

- This interface can also be implemented if an object needs access to - file resources, i.e. wants to call - , or access to - the . However, it is - preferable to implement the more specific - - interface to receive a reference to the - object in that scenario. -

-

- Note that dependencies can also - be exposed as object properties of the - type, populated via strings with - automatic type conversion performed by an object factory. This obviates - the need for implementing any callback interface just for the purpose - of accessing a specific file resource. -

-

- - is a convenience implementation of this interface for your - application objects. -

-

- For a list of all object lifecycle methods, see the overview for the - interface. -

-
- Rod Johnson - Mark Pollack (.NET) - - - -
- - - 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. - - -
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - The that this - object runs in. - -
- - - Intializes the wrapped - . - - -

- This is a template method that subclasses can override for custom - initialization behavior. -

-

- Gets called by the - - instance directly after setting the context instance. -

- - Does not get called on reinitialization of the context. - -
- - In the case of any initialization errors. - - - If thrown by application context methods. - -
- - - The context class that any context passed to the - - must be an instance of. - - - The - . - - - - - Return a for the - application context used by this object, for easy message access. - - - - - Gets or sets the that this - object runs in. - - - When passed an unexpected - implementation - instance that is not compatible with the - defined by the value of the - . - property. Also, thrown when trying to re-initialize with a - different than was - originally used. - - - If thrown by any application context methods. - - - - - - - Creates an instance - using context definitions supplied in a custom configuration and - configures the with that instance. - - - Implementations of the - interface must provide the following two constructors: - - - - A constructor that takes a string array of resource locations. - - - - - A constructor that takes a reference to a parent application context - and a string array of resource locations (and in that order). - - - -

- Note that if the type attribute is not present in the declaration - of a particular context, then a default - - is assumed. This default - - is currently the - ; please note the exact - of this default is an - implementation detail, that, while unlikely, may do so in the future. - to -

-
- -

- This is an example of specifying a context that reads its resources from - an embedded Spring.NET XML object configuration file... -

- - - - -
- - - - - - - - - -

- This is an example of specifying a context that reads its resources from - a custom configuration section within the same application / web - configuration file and uses case insensitive object lookups. -

-

- Please note that you must adhere to the naming - of the various sections (i.e. '<sectionGroup name="spring">' and - '<section name="context">'. -

- - - - -
-
- - - - - - - - - - - - -

- And this is an example of specifying a hierarchy of contexts. The - hierarchy in this case is only a simple parent->child hierarchy, but - hopefully it illustrates the nesting of context configurations. This - nesting of contexts can be arbitrarily deep, and is one way... child - contexts know about their parent contexts, but parent contexts do not - know how many child contexts they have (if any), or have references - to any such child contexts. -

- - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mark Pollack - Aleksandar Seovic - Rick Evans - - - - - Creates an instance - using the context definitions supplied in a custom - configuration section. - - -

- This instance is - also used to configure the . -

-
- - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - An instance - populated with the object definitions supplied in the configuration - section. - -
- - - Create all child-contexts in the given for the given context. - - The parent context to use - The current configContext - The list of child context elements - - - - Instantiates a new context. - - - - - Gets the context's name specified in the name attribute of the context element. - - The current configContext - The context element - - - - Extracts the context-type from the context element. - If none is specified, returns the parent's type. - - - - - Extracts the case-sensitivity attribute from the context element - - - - - Gets the context specified in the type - attribute of the context element. - - -

- If this attribute is not defined it defaults to the - type. -

-
- - If the context type does not implement the - interface. - -
- - - Returns the array of resources containing object definitions for - this context. - - - - - Returns the array of child contexts for this context. - - - - - The of - created if no type attribute is specified on a context element. - - - - - - Get the context's case-sensitivity to use if none is specified - - -

- Derived handlers may override this property to change their default case-sensitivity. -

-

- Defaults to 'true'. -

-
-
- - - Specifies, whether the instantiated context will be automatically registered in the - global . - - - - - Returns if the context should be lazily - initialized. - - - - - Constants defining the structure and values associated with the - schema for laying out Spring.NET contexts in XML. - - - - - Defines a single - . - - - - - Specifies a context name. - - - - - Specifies if context should be case sensitive or not. Default is true. - - - - - Specifies a . - - -

- Does not have to be fully assembly qualified, but its generally regarded - as better form if the names of one's objects - are specified explicitly. -

-
-
- - - Specifies whether context should be lazy initialized. - - - - - Defines an - - - - - Specifies the URI for an - . - - - - - Provides access to a central registry of - s. - - -

- A singleton implementation to access one or more application contexts. Application - context instances are cached. -

-

Note that the use of this class or similar is unnecessary except (sometimes) for - a small amount of glue code. Excessive usage will lead to code that is more tightly - coupled, and harder to modify or test. Consider refactoring your code to use standard - Dependency Injection techniques or implement the interface IApplicationContextAware to - obtain a reference to an application context.

-
- Mark Pollack - Aleksandar Seovic - -
- - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the ContextRegistry class. - - -

- Explicit static constructor to tell C# compiler - not to mark type as beforefieldinit. -

-
-
- - - Registers an instance of an - . - - -

- This is usually called via a - inside a .NET - application configuration file. -

-
- The application context to be registered. - - If a context has previously been registered using the same name - -
- - - Handles events raised by an application context. - - - - - - - Removes the context from the registry - - - Has no effect if the context wasn't registered - - ´the context to remove from the registry - - - - Returns the root application context. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The root application context. -
- - - Returns context based on specified name. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The context name. - The specified context, or null, if context with that name doesn't exists. - - If the context name is null or empty - -
- - - Removes all registered - s from this - registry. - - - Raises the event while still holding a lock on - - - - - Allows to check, if a context is already registered - - The context name. - true, if the context is already registered. false otherwise - - - - This event is fired, if ContextRegistry.Clear() is called.
- Clients may register to get informed -
- - This event is fired while still holding a lock on the Registry.
- 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used -
-
- - - Gets an object that should be used to synchronize access to ContextRegistry - from the calling code. - - - - - Default implementation of the - interface. - - -

- Provides easy ways to store all the necessary values needed to resolve - messages from an . -

-
- Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Describes objects that are suitable for message resolution in a - . - - -

- Spring.NET's own validation error classes implement this interface. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - -

- The last code will therefore be the default one. -

-
- - A array of codes which are associated - with this message. - -
- - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - Creates a new instance of the - class - using a single code. - - The message code to be resolved. - - - - Initializes a new instance of the class. - - The codes to be used to resolve this message - - - - Creates a new instance of the - class - using multiple codes. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - - - Creates a new instance of the - class - using multiple codes and a default message. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - The default message used if no code could be resolved. - - - - - Creates a new instance of the - class - from another resolvable. - - -

- This is the copy constructor for the - class. -

-
- - The to be copied. - - - If the supplied is . - -
- - - Returns a representation of this - . - - - A representation of this - . - - - - - Calls the visit method on the supplied - to output a version of this class. - - The visitor to use. - - A representation of this - . - - - - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - - A array of codes which are associated - with this message. - - - - - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - - Return the default code for this resolvable. - - - The default code of this resolvable; this will be the last code in - the codes array, or if this instance has no - codes. - - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - - Default section handler that can handle any configuration section. - - -

- Simply returns the configuration section as an . -

-
- Aleksandar Seovic -
- - - Returns the configuration section as an - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is a null reference. - - - The for the section. - - Config section as XmlElement. - - - - Empty implementation that - simply delegates all method calls to it's parent - . - - -

- If no parent is available, - no messages will be resolved (and a - will be thrown). -

-

- Used as placeholder by the - class, - if the context definition doesn't define its own - . Not intended for direct use - in applications. -

-
- Juergan Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - - Generic ApplicationContext implementation that holds a single internal - instance and does not - assume a specific object definition format. - - - Implements the interface in order - to allow for aplying any object definition readers to it. - Typical usage is to register a variety of object definitions via the - interface and then call - to initialize those - objects with application context semantics (handling - , auto-detecting - ObjectFactoryPostProcessors, etc). - - In contrast to other IApplicationContext implementations that create a new internal - IObjectFactory instance for each refresh, the internal IObjectFactory of this context - is available right from the start, to be able to register object definitions on it. - may only be called once - Usage examples - - GenericApplicationContext ctx = new GenericApplicationContext(); - // register your objects and object definitions - ctx.RegisterObjectDefinition(...) - ctx.Refresh(); - - - Mark Pollack - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true names in the context are case sensitive. - - - - Initializes a new instance of the class. - - The object factory instance to use for this context. - - - - Initializes a new instance of the class. - - The parent application context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - - - - Initializes a new instance of the class. - - The object factory to use for this context - The parent applicaiton context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - The object factory to use for this context - - - - Do nothing operation. We hold a single internal ObjectFactory and rely on callers - to register objects throug our public methods (or the ObjectFactory's). - - - In the case of errors encountered while refreshing the object factory. - - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - - - - Return the internal object factory of this application context. - - - - - - Gets the underlying object factory of this context, available for - registering object definitions. - - You need to call Refresh to initialize the - objects factory and its contained objects with application context - semantics (autodecting IObjectFactoryPostProcessors, etc). - The internal object factory (as DefaultListableObjectFactory). - - - - Helper class for easy access to messages from an - , providing various - overloaded GetMessage methods. - - -

- Available from - , but also - reusable as a standalone helper to delegate to in application objects. -

-
- Juergen Hoeller - Griffin Caprio (.NET) - - -
- - - Creates a new instance of the - class - that uses the current - for all locale specific lookups. - - - The to use to locate messages. - - - - - Creates a new instance of the - class - - - The to use to locate - messages. - - - The to use for - locale specific messages. - - - - - Retrieve the message for the given code and the default - . - - The code of the message. - The message. - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - The message. - - - - Retrieve the message for the given code and the default - . - - The code of the message. - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - . - - - The . - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - in the given - . - - - The . - - - The to use for - lookups. - - The message - - If the message could not be found. - - - - - Visitor class to represent - instances. - - -

- Used in the first instance to supply stringified versions of - instances. -

-

- Other methods can be added here to return different representations, - including XML, CSV, etc.. -

-
- Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - - - Outputs the supplied - as a nicely formatted . - - - The to output. - - - - - Configuration section handler for the (recommended, Spring.NET standard) parsers - config section. - - -

- Spring.NET allows the registration of custom configuration parsers that - can be used to create simplified configuration schemas that better - describe object definitions. -

-

- For example, Spring.NET uses this facility internally in order to - define simplified schemas for various AOP, Data and Services definitions. -

-
- -

- The following example shows how to configure both this section handler - and how to define custom configuration parsers within a Spring.NET - config section. -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Registers parsers specified in the (recommended, Spring.NET standard) - parsers config section with the . - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because parsers - are registered as a side-effect of this object's execution and there - is thus no need to return anything. - - - - - An that doesn't do a whole lot. - - -

- is an implementation of - the NullObject pattern. It should be used in those situations where a - needs to be passed (say to a - method) but where the resolution of messages is not required. -

-

- There should not (typically) be a need to instantiate instances of this class; - does not maintan any state - and the instance is - thus safe to pass around. -

-
- Aleksandar Seovic -
- - - The canonical instance of the - class. - - - - - Creates a new instance of the class. - - -

- Consider using - instead. -

-
-
- - - Simply returns the supplied message as-is. - - The code of the message to resolve. - - The to resolve the - code for. - - - The supplied message as-is. - - - - - Always returns . - - The code of the object to resolve. - - The to resolve the - code for. - - - (always). - - - - - Does nothing. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Handler for Spring.NET resourceHandlers config section. - - -

- Spring allows registration of custom resource handlers that can be used to load - object definitions from. -

-

- For example, if you wanted to store your object definitions in a database instead - of in the config file, you could write a custom implementation - and register it with Spring using 'db' as a protocol name. -

-

- Afterwards, you would simply specify resource URI within the context config element - using your custom resource handler. -

-
- -

- The following example shows how to configure both this section handler, - how to define custom resource within Spring config section, and how to load - object definitions using custom resource handler: -

- - - - -
- - - - - - - - - - - - - - Aleksandar Seovic - - - - - Registers resource handlers that are specified in - the resources config section with the . - - - The configuration settings in a corresponding parent - configuration section. Ignored. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns null, because resource handlers are registered - as a sideffect of its execution and there is no need to return anything. - - - - - An implementation that - accesses resources from .resx / .resource files. - - Note that for the method - GetResourceObject if the resource name resolves to null, then in - .NET 1.1 the return value will be String.Empty whereas - in .NET 2.0 it will return null. - Griffin Caprio (.NET) - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - - - - Defines a simple initialization callback for objects that need to to some - post-initialization logic after all of their dependencies have been injected. - - -

- An implementation of the - - method might perform some additional custom initialization (over and above that - performed by the constructor), or merely check that all mandatory properties - have been set (this last example is a very typical use case of this interface). -

- - The use of the - interface - by non-Spring.NET framework code can be avoided (and is generally - discouraged). The Spring.NET container provides support for a generic - initialization method given to the object definition in the object - configuration store (be it XML, or a database, etc). This requires - slightly more configuration (one attribute-value pair in the case of - XML configuration), but removes any dependency on Spring.NET from the - class definition. - -
- Rod Johnson - Rick Evans (.NET) - -
- - - 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. - -
- - - Creates a new instance of the - class. - - - - - Resolves a given code by searching through each assembly name in - the base names array. - - The code to resolve. - - The to use for lookups. - - The message from the resource set. - - - - Resolves a given code by searching through each assembly name in the array. - - The code to resolve. - - The to use for lookups. - - The object from the resource set. - - - - Uses a System.ComponentModel.ComponentResourceManager - to apply resources to object properties. - Resource key names are of the form objectName.propertyName - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - An object that contains the property values to be applied. - - - The base name of the object to use for the key lookup. - - - The to use for lookups. - If , uses the - value. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - - - Resolves a code into an object given a base name. - - The to search. - The code to resolve. - - The to use for lookups. - - The object from the resource file. - - - - Returns a representation of the - . - - A representation of the - . - - - - Invoked by an - after it has set all object properties supplied. - - -

- The list may contain objects of type or - . types - are converted to instances using the notation - resourcename, assembly partial name. -

-
- - If the conversion from a to a - can't be performed. - -
- - - The collection of s - in this . - - - - - that allows concrete registration of - objects and messages in code, rather than from external configuration sources. - - -

- Mainly useful for testing. -

-
- Rod Johnson - Griffin Caprio (.NET) -
- - - Creates a new instance of the StaticApplicationContext class. - - - - - Creates a new instance of the StaticApplicationContext class. - - The parent application context. - - - - Creates a new, named instance of the StaticApplicationContext class. - - the context name - The parent application context. - - - - Do nothing: we rely on callers to update our public methods. - - - - - Register a singleton object with the default object factory. - - The name of the object. - The of the object. - The property values for the singleton instance. - - - - Registers a prototype object with the default object factory. - - The name of the prototype object. - The of the prototype object. - The property values for the prototype instance. - - - - Associate the given message with the given code. - - The lookup code. - - The that the message should be found within. - - The message associated with the lookup code. - - - - Simple implementation of - that allows messages to be held in an object and added programmatically. - - -

- Mainly useful for testing. -

-

- This supports internationalization. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Creates a new instance of the - class. - - - - - Returns a format string. - - The code of the message to resolve. - - The to resolve the - code for. - - - A format string or if not found. - - - - - - Resolves an object (typically an icon or bitmap). - - The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - - - - - - Applies resources to object properties. - - -

- Uses a System.ComponentModel.ComponentResourceManager - internally to apply resources to object properties. Resource key - names are of the form objectName.propertyName. -

-

- This feature is not currently supported on version 1.0 of the .NET platform. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - -
- - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The message format associated with this lookup code. - - - - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The object associated with this lookup code. - - - - - Returns a representation of this - message source. - - - A containing all of this message - source's messages. - - - - - Configuration section handler for the Spring.NET typeAliases - config section. - - -

- Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

-

- This includes type names specified within an object definition, as well - as values of the properties or constructor arguments that expect - instances. -

-
- -

- The following example shows how to configure both this section handler and - how to define type aliases within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeAliases config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of this - object's execution and thus there is no need to return anything. - - - - - Configuration section handler for the Spring.NET typeConverters - config section. - - -

- Type converters are used to convert objects from one type into another - when injecting property values, evaluating expressions, performing data - binding, etc. -

-

- They are a very powerful mechanism as they allow Spring.NET to automatically - convert string-based property values from the configuration file into the appropriate - type based on the target property's type or to convert string values submitted - via a web form into a type that is used by your data model when Spring.NET data - binding is used. Because they offer such tremendous help, you should always provide - a type converter implementation for your custom types that you want to be able to use - for injected properties or for data binding. -

-

- The standard .NET mechanism for specifying type converter for a particular type is - to decorate the type with a , passing the type - of the -derived class as a parameter. -

-

- This mechanism will still work and is a preferred way of defining type converters if - you control the source code for the type that you want to define a converter for. However, - this configuration section allows you to specify converters for the types that you don't - control and it also allows you to override some of the standard type converters, such as - the ones that are defined for some of the types in the .NET Base Class Library. -

-
- -

- The following example shows how to configure both this section handler and - how to define type converters within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeConverters config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of - its execution and thus there is no need to return anything. - - - - - An implementation that - reads context definitions from XML based resources. - - -

- Currently, the resources that are supported are the file, - http, ftp, config and assembly resource - types. -

-

- You can provide custom implementations of the - interface and and register them - with any that inherits - from the - - interface. -

- - In case of multiple config locations, later object definitions will - override ones defined in previously loaded resources. This can be - leveraged to deliberately override certain object definitions via an - extra XML file. - -
- -

- Find below some examples of instantiating an - using a - variety of different XML resources. -

- - // an XmlApplicationContext that reads its object definitions from an - // XML file that has been embedded in an assembly... - IApplicationContext context = new XmlApplicationContext - ( - "assembly://AssemblyName/NameSpace/ResourceName" - ); - - // an XmlApplicationContext that reads its object definitions from a - // number of disparate XML resources... - IApplicationContext context = new XmlApplicationContext - ( - // from an XML file that has been embedded in an assembly... - "assembly://AssemblyName/NameSpace/ResourceName", - // and from a (relative) filesystem-based resource... - "file://Objects/services.xml", - // and from an App.config / Web.config resource... - "config://spring/objects" - ); - -
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - -
- - - Initializes a new instance of the XmlApplicationContext class. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The created context will be case sensitive. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - This constructor is meant to be used by derived classes. By passing =false, it is - the responsibility of the deriving class to call to initialize the context instance. - - if true, is called automatically. - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - An array of resource locations, referring to the XML object - definition files with which this context is to be built. - - - An array of resource locations, or if none. - - - - - - An array of resources instances with which this context is to be built. - - - An array of s, or if none. - - - - - - Encapsulates arguments to the class. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - - - - Initializes a new instance of the XmlApplicationContextArgs class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - if set to true [case sensitive]. - if set to true [refresh]. - - - Exception thrown during application context initialization. - Rod Johnson - Mark Pollack (.NET) - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Marks an interface as being an application event listener. - - Griffin Caprio - - - - - Creates a new instance of the - class. - - - - - The callback for application events. - - - - - To be implemented by any object that wishes to be notified - of the associated with it. - - -

- In the current implementation, the - will typically be the - associated that - spawned the implementing object. -

-

- The can usually also be - passed on as an object reference to arbitrary object properties or - constructor arguments, because a - is typically defined as an - object with the well known name "messageSource" in the - associated application context. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Sets the associated - with this object. - - -

- Invoked after population of normal object properties but - before an initializing callback such as the - - method of the - interface - or a custom init-method. -

-

- It is also invoked before the - - property of any - - implementation. -

-
- - The associated - with this object. - -
- - - Interface to be implemented by any object that wishes to be notified - of the (typically the - ) that it runs in. - - -

- Note that dependencies can also - be exposed as object properties of type - , populated via strings with - automatic type conversion by the object factory. This obviates the - need for implementing any callback interface just for the purpose of - accessing a specific resource. -

-

- You typically need an - when your application object has to access a variety of file resources - whose names are calculated. A good strategy is to make the object use - a default resource loader but still implement the - interface to allow - for overriding when running in an - . -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Sets the - that this object runs in. - - -

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

-
-
- - - Thrown when a message cannot be resolved. - - Rod Johnson - Mark Pollack (.NET) - - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class with the - specified message. - - - 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. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for given culture. - - - The that was used - to search for the code. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for the current UI culture. - - - - - Convenience base class for - implementations, pre-implementing typical behavior. - - -

- The method will - check whether a or - can be opened; - will always return - ; - and - throw an exception; - and will - return the value of the - property. -

-
- Juergen Hoeller - Rick Evans (.NET) - Aleksandar Seovic (.NET) - -
- - - The central abstraction for Spring.NET's access to resources such as - s. - - -

- This interface encapsulates a resource descriptor that abstracts away - from the underlying type of resource; possible resource types include - files, memory streams, and databases (this list is not exhaustive). -

-

- A can definitely be opened and accessed - for every such resource; if the resource exists in a physical form (for - example, the resource is not an in-memory stream or one that has been - extracted from an assembly or ZIP file), a or - can also be accessed. The actual - behavior is implementation-specific. -

-

- This interface, when used in tandem with the - interface, forms the backbone of - Spring.NET's resource handling. Third party extensions or libraries - that want to integrate external resources with Spring.NET's IoC - container are encouraged expose such resources via this abstraction. -

-

- Interfaces cannot obviously mandate implementation, but derived classes - are strongly encouraged to expose a constructor that takes a - single as it's sole argument (see example). - Exposing such a constructor will make your custom - implementation integrate nicely - with the class. -

-
- Juergen Hoeller - Rick Evans (.NET) - - -
- - - Simple interface for objects that are sources for - s. - - -

- This is the base interface for the abstraction encapsulated by - Spring.NET's interface. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Return an for this resource. - - - - Clients of this interface must be aware that every access of this - property will create a fresh ; - it is the responsibility of the calling code to close any such - . - - - - An . - - - If the stream could not be opened. - - - - - Creates a resource relative to this resource. - - - The path (always resolved as relative to this resource). - - - The relative resource. - - - If the relative resource could not be created from the supplied - path. - - - If the resource does not support the notion of a relative path. - - - - - Does this resource represent a handle with an open stream? - - -

- If , the - cannot be read multiple times, and must be read and then closed to - avoid resource leaks. -

-

- Will be for all usual resource descriptors. -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - -
- - - Returns a handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available on a filesystem, or cannot be - exposed as a handle. - - - -
- - - Returns a description for this resource. - - -

- The description is typically used for diagnostics and other such - logging when working with the resource. -

-

- Implementations are also encouraged to return this value from their - method. -

-
- - A description for this resource. - -
- - - Does this resource actually exist in physical form? - - -

- An example of a resource that physically exists would be a - file on a local filesystem. An example of a resource that does not - physically exist would be an in-memory stream. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - The default special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - A string representation of the resource. - - - If the supplied is - or contains only whitespace character(s). - -
- - - Strips any protocol name from the supplied - . - - -

- If the supplied does not - have any protocol associated with it, then the supplied - will be returned as-is. -

-
- - - GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); - // returns www.mycompany.com/resource.txt - - - - The name of the resource. - - - The name of the resource without the protocol name. - -
- - - Resolves the supplied to its value - sans any leading protocol. - - - The name of the resource. - - - The name of the resource without the protocol name. - - - - - - Resolves the presence of the - value - in the supplied into a path. - - -

- The default implementation simply returns the supplied - as is. -

-
- - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - -
- - - This implementation returns the - of this resource. - - - - - - Determines whether the specified is - equal to the current . - - -

- This implementation compares values. -

-
- -
- - - Serves as a hash function for a particular type, suitable for use - in hashing algorithms and data structures like a hash table. - - -

- This implementation returns the hashcode of the - property. -

-
- -
- - - Factory Method. Create a new instance of the current resource type using the given resourceName - - - - - The ResourceLoader to be used for resolving relative resources - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Creates a new resource that is relative to this resource based on the - supplied . - - -

- This method can accept either a fully qualified resource name or a - relative resource name as it's parameter. -

-

- A fully qualified resource is one that has a protocol prefix and - all elements of the resource name. All other resources are treated - as relative to this resource, and the following rules are used to - locate a relative resource: -

- - - If the starts with '..', - the current resource path is navigated backwards before the - is concatenated to the current - of - this resource. - - - If the starts with '/', the - current resource path is ignored and a new resource name is - appended to the - of - this resource. - - - If the starts with '.' or a - letter, a new path is appended to the current - of - this resource. - - -
- - The name of the resource to create. - - The relative resource. - - If the process of resolving the relative resource yielded an - invalid URI. - - - If this resource does not support the resolution of relative - resources (as determined by the value of the - - property). - - -
- - - Calculates a new resource path based on the supplied - . - - - The relative path to evaluate. - - The newly calculated resource path. - - - - The special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
- -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the protocol associated with this resource (if any). - - -

- The value of this property may be if no - protocol is associated with the resource type (for example if the - resource is a memory stream). -

-
- - The protocol associated with this resource (if any). - -
- - - Does this resource represent a handle with an open stream? - - -

- This, the default implementation, always returns - . -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - - - - - Returns a handle for this resource. - - -

- This, the default implementation, always throws a - , assuming that the - resource cannot be resolved to an absolute file path. -

-
- - The handle for this resource. - - - This implementation always throws a - . - - - -
- - - Does this resource actually exist in physical form? - - -

- This implementation checks whether a - can be opened, falling back to whether a - can be opened. -

-

- This will cover both directories and content resources. -

-

- This implementation will also return if - permission to the (file's) path is denied. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - Does this support relative - resource retrieval? - - -

- This property is generally to be consulted prior to attempting - to attempting to access a resource that is relative to this - resource (via a call to - ). -

-

- This, the default implementation, always returns - . -

-
- - if this - supports relative resource - retrieval. - -
- - - Gets the root location of the resource. - - -

- Where root resource can be taken to mean that part of the resource - descriptor that doesn't change when a relative resource is looked - up. Examples of such a root location would include a drive letter, - a web server name, an assembly name, etc. -

-
- - The root location of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets the current path of the resource. - - -

- An example value of this property would be the name of the - directory containing a filesystem based resource. -

-
- - The current path of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets those characters that are valid path separators for the - resource type. - - -

- An example value of this property would be the - and - values for a - filesystem based resource. -

-

- Any derived classes that override this method are expected to - return a new array for each access of this property. -

-
- - Those characters that are valid path separators for the resource - type. - - - This, the default implementation, always throws a - . - -
- - - An implementation for - resources stored within assemblies. - - -

- This implementation expects any resource name passed to the - constructor to adhere to the following format: -

-

- assembly://assemblyName/namespace/resourceName -

-
- Aleksandar Seovic (.NET) - Federico Spinazzi (.NET) -
- - - Creates a new instance of the - class. - - - The name of the assembly resource. - - - If the supplied did not conform - to the expected format. - - - If the assembly specified in the supplied - was loaded twice with two - different evidences. - - - If the assembly specified in the supplied - could not be found. - - - If the caller does not have the required permission to load - the assembly specified in the supplied - . - - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the caller does not have the required permission to load - the underlying assembly's manifest. - - - - - - - Does the embedded resource specified in the value passed to the - constructor exist? - - - if this resource actually exists in physical - form (for example on a filesystem). - - - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (the assembly name in this - case). - - - The root location of the resource. - - - - - - Gets the current path of the resource (the namespace in which the - target resource was embedded in this case). - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - - - - Used when retrieving information from the standard .NET configuration - files (App.config / Web.config). - - -

- If created with the name of a configuration section, then all methods - aside from the description return , - , or throw an exception. If created with an - , then the - property - will return a corresponding to parse. -

-
- Mark Pollack - Rick Evans -
- - - Creates new instance of the - class. - - - The actual XML configuration section. - - - If the supplied is . - - - - - Creates new instance of the - class. - - - The name of the configuration section. - - - If the supplied is - or contains only whitespace character(s). - - - - - Returns the handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a description for this resource (the name of the - configuration section in this case). - - - A description for this resource. - - - - - - Does this resource actually exist in physical form? - - -

- This implementation always returns . -

-
- - - - - -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Exposes the actual for the - configuration section. - - -

- Introduced to accomodate line info tracking during parsing. -

-
-
- - - Holder that combines with a specific encoding to be used for reading - from the resource - - Juergen Hoeller - Erich Eichinger (.NET) - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - the resource to read from. Must not be null - whether to autoDetect encoding from byte-order marks () - - - - Create an encoded resource using the specified encoding. - - the resource to read from. Must not be null - the encoding to use. If null, encoding will be autodetected. - whether to autoDetect encoding from byte-order marks () - - - - - - - - - - Determine whether equals this instance. - - - true if obj is an and both - , and are equal. - - - - - Calculate the unique hash code for this instance. - - - - - - Get a textual description of the resource. - - - - - Get the underlying resource - - - - - Get the encoding to use for reading, if any. May be null - - - - - whether to autoDetect encoding from byte-order marks () - - - - - A backed resource. - - -

- Supports resolution as both a and a - . -

-

- Also supports the use of the ~ character. If the ~ character - is the first character in a resource path (sans protocol), the ~ - character will be replaced with the value of the - System.AppDomain.CurrentDomain.BaseDirectory property (an example of - this can be seen in the examples below). -

-
- -

- Consider the example of an application that is running (has been launched - from) the C:\App\ directory. The following resource paths will map - to the following resources on the filesystem... -

- - strings.txt C:\App\strings.txt - ~/strings.txt C:\App\strings.txt - file://~/strings.txt C:\App\strings.txt - file://~/../strings.txt C:\strings.txt - ../strings.txt C:\strings.txt - ~/../strings.txt C:\strings.txt - - // note that only a leading ~ character is resolved to the executing directory... - stri~ngs.txt C:\App\stri~ngs.txt - -
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - If the supplied is - or contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - Supresses initialization of this instance. Used from derived classes. - - - If the supplied is - or contains only whitespace character(s). - - - - - Initializes this instance. - - - - - - Resolves the handle - for the supplied . - - - The name of the file system resource. - - - The handle for this resource. - - - - - Resolves the root location for the supplied . - - - The name of the file system resource. - - - The root location of the resource. - - - - - Resolves the path for the supplied . - - - The name of the file system resource. - - - The current path of the resource. - - - - - Resolves the presence of the - value - in the supplied into a path. - - - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the underlying handle for - this resource. - - - The handle for this resource. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (a drive or UNC file share - name in this case). - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the underlying file could not be found. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - adapter implementation for a - . - - -

- Should only be used if no other - implementation is applicable. -

-

- In contrast to other - implementations, this is an adapter for an already opened - resource - the - therefore always returns . Do not use this class - if you need to keep the resource descriptor somewhere, or if you need - to read a stream multiple times. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The input to use. - - - Where the input comes from. - - - If the supplied is - . - - - - - The input to use. - - - If the underlying has already - been read. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Custom type converter for instances. - - -

- A resource path may contain placeholder variables of the form ${...} - that will be expended to environment variables. -

-

- Currently only supports conversion from a - instance. -

-
- -

- On Win9x boxes, this resource path, ${userprofile}\objects.xml will - be expanded at runtime with the value of the 'userprofile' environment - variable substituted for the '${userprofile}' portion of the path. -

- - // assuming a user called Rick, running on a plain vanilla Windows XP setup... - // this resource path... - - ${userprofile}\objects.xml - - // will become (after expansion)... - - C:\Documents and Settings\Rick\objects.xml - -
- Mark Pollack - - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified resourceLoader. - - the underlying IResourceLoader to be used to resolve resources - - - - Returns whether this converter can convert an object of one - to a - - - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - - - - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An if successful. - - - If the resource name objectained form the supplied - is malformed. - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - Resolve the given path, replacing placeholder values with - corresponding property values if necessary. - - -

- This implementation resolves environment variables only. -

-
- The original resource path. - The resolved resource path. -
- - - Return the used to - resolve the string. - - - The used to resolve - the string. - - - - - Registry class that allows users to register and retrieve protocol handlers. - - - - Resource handler is an implementation of interface - that should be used to process resources with the specified protocol. - - - They are used throughout the framework to access resources from various - sources. For example, application context loads object definitions from the resources - that are processed using one of the registered resource handlers. - - Following resource handlers are registered by default: - - - Protocol - Handler Type - Description - - - config - - Resolves the resources by loading specified configuration section from the standard .NET config file. - - - file - - Resolves filesystem resources. - - - http - - Resolves remote web resources. - - - https - - Resolves remote web resources via HTTPS. - - - ftp - - Resolves ftp resources. - - - assembly - - Resolves resources that are embedded into an assembly. - - - web - Spring.Core.IO.WebResource, Spring.Web* - Resolves resources relative to the web application's virtual directory. - - - * only available in web applications. - - Users can create and register their own protocol handlers by implementing interface - and mapping custom protocol name to that implementation. See for details - on how to register custom protocol handler. - - - Aleksandar Seovic - - - - Name of the .Net config section that contains definitions - for custom resource handlers. - - - - - Registers standard and user-configured resource handlers. - - - - - Returns resource handler for the specified protocol name. - - - - This method returns object that should be used - to create an instance of the -derived type by passing - resource location as a parameter. - - - Name of the protocol to get the handler for. - Resource handler constructor for the specified protocol name. - If is null. - - - - Returns true if a handler is registered for the specified protocol, - false otherwise. - - Name of the protocol. - - true if a handler is registered for the specified protocol, false otherwise. - - If is null. - - - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The type name of the concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Allows to create any arbitrary Url format - - - - - A adapter implementation encapsulating a simple string. - - Erich Eichinger - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Get the to - for accessing this resource. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Gets the encoding used to create a byte stream of the string. - - - - - Gets the content encapsulated by this . - - - - - A backed resource - on top of - - -

- Obviously supports resolution as a , and also - as a in the case of the "file:" - protocol. -

-
- -

- Some examples of the strings that can be used to initialize a new - instance of the class - include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) - - - -
- - - Creates a new instance of the - class. - - -

- Some examples of the values that the - can typically be expected to hold include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- - A string representation of the resource. - -
- - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the instance - used for the resource resolution. - - - A instance. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - Returns a handle for this resource. - - - The handle for this resource. - - - If the resource is not available on a filesystem. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource. - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Converts string representation of a credential for Web client authentication - into an instance of . - - -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. -

- - - - - - -
- Bruno Baia -
- - - Can we convert from the sourcetype - to a instance ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A instance if successful. - - - - - A custom for any - primitive numeric type such as , - , , etc. - - -

- Can use a given for - (locale-specific) parsing and rendering. -

-

- This is not meant to be used as a system - but rather as a - locale-specific number converter within custom controller code, to - parse user-entered number strings into number properties of objects, - and render them in a UI form. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The primitive numeric to convert to. - - - The to use for - (locale-specific) parsing and rendering - - - Is an empty string allowed to be converted? If - , an empty string value will be converted to - numeric 0. - - Id the supplied is not a primitive - . - - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - -
- - - Converts the specified object (a string) to the required primitive - type. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - A primitive representation of the string value. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Custom implementation for - objects. - - -

- Handles conversion from an XML formatted string to a - object - (see below for an example of the expected XML format). -

-

- This converter must be registered before it will be available. Standard - converters in this namespace are automatically registered by the - class. -

-
- -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. Note that the name of the top level - (document) element is quite arbitrary... it is only the content that - matters (and which must be in the format - <add key="..." value="..."/>. For your continued sanity - though, you may wish to standardize on the top level name of - 'dictionary' (although you are of course free to not do so). -

- - - - - - -

- The following example uses a different top level (document) element - name, but is equivalent to the first example. -

- - - - - - -
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from an - XML formatted instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - - - - Converts string representation of a regular expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts string representation of the registry key - into instance. - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Generates partial registry key name. - - - Key elements. - - - Index of the last element to use. - - - Friendly key name containing key element from - 0 to , inclusive. - - - - - Returns for the specified - root hive name. - - - Root hive name. - - - Registry key for the specified name. - - - - - Converts a two part string, (resource name, assembly name) - to a ResourceManager instance. - - - - - This constant represents the name of the folder/assembly containing global resources. - - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - If the specified does not denote a valid resource - - - - Converter for from a comma separated - list of RBG values. - - -

- Please note that this class does not implement converting - to a comma separated list of RBG values from a - . -

-
- Federico Spinazzi -
- - - Returns whether this converter can convert an object of one - to a - . - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Converts the specified object (a string) a - instance. - - - A - that provides a format context. - - - The to use - as the current culture: currently ignored. - - - The value that is to be converted, in "R,G,B", "A,R,G,B", or - symbolic color name (). - - - A representation of the string value. - - - If the input string is not in a supported format, or is not one of the - predefined system colors (). - - - - - A custom for - runtime type references. - - -

- Currently only supports conversion to and from a - . -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to the - of this converter. - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Returns whether this converter can convert the object to the specified - . - - - A - that provides a format context. - - - A that represents the - you want to convert to. - - True if the conversion is possible. - - - - Converts the given value to the type of this converter. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An that represents the converted value. - - - - - Converts the given value object to the specified type, - using the specified context and culture information. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - The to convert the - parameter to. - - - An that represents the converted value. - - - - - Converter for to directly set a - property. - - Jurgen Hoeller - Mark Pollack (.NET) - - - - Create a new StreamConverter using the default - . - - - - - Create a new StreamConverter using the given - . - - - The to use. - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts a separated to a - array. - - -

- Defaults to using the , (comma) as the list separator. Note that the value - of the current is - not used. -

-

- If you want to provide your own list separator, you can set the value of the - - property to the value that you want. Please note that this value will be used - for all future conversions in preference to the default list separator. -

-

- Please note that the individual elements of a string will be passed - through as is (i.e. no conversion or trimming of surrounding - whitespace will be performed). -

-

- This should be - automatically registered with any - implementations. -

-
- - - public class StringArrayConverterExample - { - public static void Main() - { - StringArrayConverter converter = new StringArrayConverter(); - - string csvWords = "This,Is,It"; - string[] frankBoothWords = converter.ConvertFrom(csvWords); - - // the 'frankBoothWords' array will have 3 elements, namely - // "This", "Is", "It". - - // please note that extraneous whitespace is NOT trimmed off - // in the current implementation... - string csv = " Cogito ,ergo ,sum "; - string[] descartesWords = converter.ConvertFrom(csv); - - // the 'descartesWords' array will have 3 elements, namely - // " Cogito ", "ergo ", "sum ". - // notice how the whitespace has NOT been trimmed. - } - } - - - -
- - - Can we convert from a the sourcetype to a array? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to a - array. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - The value that will be used as the list separator when performing - conversions. - - - A 'single' string character that will be used as the list separator - when performing conversions. - - - If the supplied value is not and is an empty - string, or has more than one character. - - - - - Base parser for custom specifiers. - - - - - Convert int value to a Timespan based on the specifier - - - - - - - Check if the string contains the specifier and - - - - - - - Specifier - - - - - Recognize 10d as ten days - - - - - Parse value as days - - Timespan in days - - - - - Day specifier: d - - - - - Recognize 10h as ten hours - - - - - Parse value as hours - - Timespan in hours - - - - - Hour specifier: h - - - - - Recognize 10m as ten minutes - - - - - Parse value as minutes - - Timespan in minutes - - - - - Minute specifier: m - - - - - Recognize 10s as ten seconds - - - - - Parse value as seconds - - Timespan in seconds - - - - - Second specifier: s - - - - - Recognize 10ms as ten milliseconds - - - - - Parse value as milliseconds - - Timespan in milliseconds - - - - - Millisecond specifier: ms - - - - - Converter for instances. - - Bruno Baia - Roberto Paterlini - - - - Creates a new instance of the - class. - - - - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Utility methods that are used to convert objects from one type into another. - - Aleksandar Seovic - - - - Convert the value to the required (if necessary from a string). - - The proposed change value. - - The we must convert to. - - Property name, used for error reporting purposes... - - If there is an internal error. - - The new value, possibly the result of type conversion. - - - - Utility method to create a property change event. - - - The full name of the property that has changed. - - The property old value - The property new value - - A new . - - - - - Determines if a Type implements a specific generic interface. - - Candidate to evaluate. - The to test for in the Candidate . - if a match, else - - - - Registry class that allows users to register and retrieve type converters. - - Aleksandar Seovic - - - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - Registers standard and configured type converters. - - - - - Returns for the specified type. - - Type to get the converter for. - a type converter for the specified type. - If is null. - - - - Registers for the specified type. - - Type to register the converter for. - Type converter to register. - If either of arguments is null. - - - - Registers for the specified type. - - - This is a convinience method that accepts the names of both - type to register converter for and the converter itself, - resolves them using , creates an - instance of type converter and calls overloaded - method. - - Type name of the type to register the converter for (can be a type alias). - Type name of the type converter to register (can be a type alias). - If either of arguments is null or empty string. - - If either of arguments fails to resolve to a valid . - - - If type converter does not derive from or if it cannot be instantiated. - - - - - Converts between instances of and their string representations. - - Erich Eichinger - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A that provides a format context. - - - A that represents the you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful, otherwise. - - The conversion cannot be performed. - - - - Returns whether this converter can convert the object to the specified type, using the specified context. - - An that provides a format context. - A that represents the type you want to convert to. - - true if this converter can perform the conversion; otherwise, false. - - - At the moment only conversion to string is supported. - - - - - Converts the given value object to the specified type, using the specified context and culture information. - - - - An that represents the converted value. - - - A . If null is passed, the current culture is assumed. - An that provides a format context. - The to convert the value parameter to. - The to convert. - The conversion cannot be performed. - The destinationType parameter is null. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Resolves (instantiates) a by it's (possibly - assembly qualified) name, and caches the - instance against the type name. - - Rick Evans - Bruno Baia - Erich Eichinger - - - - Resolves a by name. - - -

- The rationale behind the creation of this interface is to centralise - the resolution of type names to instances - beyond that offered by the plain vanilla - method call. -

-
- Rick Evans -
- - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - The cache, mapping type names ( instances) against - instances. - - - - - Creates a new instance of the class. - - - The that this instance will delegate - actual resolution to if a - cannot be found in this instance's cache. - - - If the supplied is . - - - - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holder for the generic arguments when using type parameters. - - -

- Type parameters can be applied to classes, interfaces, - structures, methods, delegates, etc... -

-
-
- - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The character that separates a list of generic arguments. - - - - - Creates a new instance of the GenericArgumentsHolder class. - - - The string value to parse looking for a generic definition - and retrieving its generic arguments. - - - - - Returns the array declaration portion of the definition, e.g. "[,]" - - - - - - Returns an array of unresolved generic arguments types. - - -

- A empty string represents a type parameter that - did not have been substituted by a specific type. -

-
- - An array of strings that represents the unresolved generic - arguments types or an empty array if not generic. - -
- - - The (unresolved) generic type name portion - of the original value when parsing a generic type. - - - - - The (unresolved) generic method name portion - of the original value when parsing a generic method. - - - - - Is the string value contains generic arguments ? - - -

- A generic argument can be a type parameter or a type argument. -

-
-
- - - Is generic arguments only contains type parameters ? - - - - - Is this an array type definition? - - - - - Resolves a generic by name. - - Bruno Baia - - - - Resolves a by name. - - Rick Evans - Aleksandar Seovic - Bruno Baia - - - - Resolves the supplied to a - instance. - - - The unresolved (possibly partially assembly qualified) name - of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Uses - to load an and then the attendant - referred to by the - parameter. - - -

- is - deprecated in .NET 2.0, but is still used here (even when this class is - compiled for .NET 2.0); - will - still resolve (non-.NET Framework) local assemblies when given only the - display name of an assembly (the behaviour for .NET Framework assemblies - and strongly named assemblies is documented in the docs for the - method). -

-
- - The assembly and type to be loaded. - - - A , or . - - - - -
- - - Uses - to load the attendant referred to by - the parameter. - - - The type to be loaded. - - - A , or . - - - - - Creates a new instance - from the given - - - - - Creates a new instance - from the given with the given inner - - - - - Resolves the supplied generic to a - instance. - - - The unresolved (possibly generic) name of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holds data about a and it's - attendant . - - - - - The string that separates a name - from the name of it's attendant - in an assembly qualified type name. - - - - - Creates a new instance of the TypeAssemblyHolder class. - - - The unresolved name of a . - - - - - The (unresolved) type name portion of the original type name. - - - - - The (unresolved, possibly partial) name of the attandant assembly. - - - - - Is the type name being resolved assembly qualified? - - - - - Provides access to a central registry of aliased s. - - -

- Simplifies configuration by allowing aliases to be used instead of - fully qualified type names. -

-

- Comes 'pre-loaded' with a number of convenience alias' for the more - common types; an example would be the 'int' (or 'Integer' - for Visual Basic.NET developers) alias for the - type. -

-
- Aleksandar Seovic - -
- - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - The alias around the 'int' type. - - - - - The alias around the 'Integer' type (Visual Basic.NET style). - - - - - The alias around the 'int[]' array type. - - - - - The alias around the 'Integer()' array type (Visual Basic.NET style). - - - - - The alias around the 'decimal' type. - - - - - The alias around the 'Decimal' type (Visual Basic.NET style). - - - - - The alias around the 'decimal[]' array type. - - - - - The alias around the 'Decimal()' array type (Visual Basic.NET style). - - - - - The alias around the 'char' type. - - - - - The alias around the 'Char' type (Visual Basic.NET style). - - - - - The alias around the 'char[]' array type. - - - - - The alias around the 'Char()' array type (Visual Basic.NET style). - - - - - The alias around the 'long' type. - - - - - The alias around the 'Long' type (Visual Basic.NET style). - - - - - The alias around the 'long[]' array type. - - - - - The alias around the 'Long()' array type (Visual Basic.NET style). - - - - - The alias around the 'short' type. - - - - - The alias around the 'Short' type (Visual Basic.NET style). - - - - - The alias around the 'short[]' array type. - - - - - The alias around the 'Short()' array type (Visual Basic.NET style). - - - - - The alias around the 'unsigned int' type. - - - - - The alias around the 'unsigned long' type. - - - - - The alias around the 'ulong[]' array type. - - - - - The alias around the 'uint[]' array type. - - - - - The alias around the 'unsigned short' type. - - - - - The alias around the 'ushort[]' array type. - - - - - The alias around the 'double' type. - - - - - The alias around the 'Double' type (Visual Basic.NET style). - - - - - The alias around the 'double[]' array type. - - - - - The alias around the 'Double()' array type (Visual Basic.NET style). - - - - - The alias around the 'float' type. - - - - - The alias around the 'Single' type (Visual Basic.NET style). - - - - - The alias around the 'float[]' array type. - - - - - The alias around the 'Single()' array type (Visual Basic.NET style). - - - - - The alias around the 'DateTime' type. - - - - - The alias around the 'DateTime' type (C# style). - - - - - The alias around the 'DateTime' type (Visual Basic.NET style). - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime()' array type (Visual Basic.NET style). - - - - - The alias around the 'bool' type. - - - - - The alias around the 'Boolean' type (Visual Basic.NET style). - - - - - The alias around the 'bool[]' array type. - - - - - The alias around the 'Boolean()' array type (Visual Basic.NET style). - - - - - The alias around the 'string' type. - - - - - The alias around the 'string' type (Visual Basic.NET style). - - - - - The alias around the 'string[]' array type. - - - - - The alias around the 'string[]' array type (Visual Basic.NET style). - - - - - The alias around the 'object' type. - - - - - The alias around the 'object' type (Visual Basic.NET style). - - - - - The alias around the 'object[]' array type. - - - - - The alias around the 'object[]' array type (Visual Basic.NET style). - - - - - The alias around the 'int?' type. - - - - - The alias around the 'int?[]' array type. - - - - - The alias around the 'decimal?' type. - - - - - The alias around the 'decimal?[]' array type. - - - - - The alias around the 'char?' type. - - - - - The alias around the 'char?[]' array type. - - - - - The alias around the 'long?' type. - - - - - The alias around the 'long?[]' array type. - - - - - The alias around the 'short?' type. - - - - - The alias around the 'short?[]' array type. - - - - - The alias around the 'unsigned int?' type. - - - - - The alias around the 'unsigned long?' type. - - - - - The alias around the 'ulong?[]' array type. - - - - - The alias around the 'uint?[]' array type. - - - - - The alias around the 'unsigned short?' type. - - - - - The alias around the 'ushort?[]' array type. - - - - - The alias around the 'double?' type. - - - - - The alias around the 'double?[]' array type. - - - - - The alias around the 'float?' type. - - - - - The alias around the 'float?[]' array type. - - - - - The alias around the 'bool?' type. - - - - - The alias around the 'bool?[]' array type. - - - - - Registers standard and user-configured type aliases. - - - - - Registers an alias for the specified . - - -

- This overload does eager resolution of the - referred to by the parameter. It will throw a - if the referred - to by the parameter cannot be resolved. -

-
- - A string that will be used as an alias for the specified - . - - - The (possibly partially assembly qualified) name of the - to register the alias for. - - - If either of the supplied parameters is or - contains only whitespace character(s). - - - If the referred to by the supplied - cannot be loaded. - -
- - - Registers short type name as an alias for - the supplied . - - - The to register. - - - If the supplied is . - - - - - Registers an alias for the supplied . - - - The alias for the supplied . - - - The to register the supplied under. - - - If the supplied is ; or if - the supplied is or - contains only whitespace character(s). - - - - - Resolves the supplied to a . - - - The alias to resolve. - - - The the supplied was - associated with, or if no - was previously registered for the supplied . - - - If the supplied is or - contains only whitespace character(s). - - - - - Returns a flag specifying whether TypeRegistry contains - specified alias or not. - - - Alias to check. - - - true if the specified type alias is registered, - false otherwise. - - - - - Helper methods with regard to type resolution. - - -

- Not intended to be used directly by applications. -

-
- Bruno Baia -
- - - Creates a new instance of the class. - - -

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

-
-
- - - Resolves the supplied type name into a - instance. - - -

- If you require special resolution, do - not use this method, but rather instantiate - your own . -

-
- - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the type cannot be resolved. - -
- - - Resolves a string array of interface names to - a array. - - - An array of valid interface names. Each name must include the full - interface and assembly name. - - An array of interface s. - - If any of the interfaces can't be loaded. - - - If any of the s specified is not an interface. - - - If (or any of its elements ) is - . - - - - - Match a method against the given pattern. - - the pattern to match against. - the method to match. - - if the method matches the given pattern; otherwise . - - - If the supplied is invalid. - - - - - Exception thrown when the ObjectFactory cannot load the specified type of a given object. - - Mark Pollack - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Initializes 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. - - - - - Initializes a new instance of the class. - - The resource description that the object definition came from. - Name of the object requested - Name of the object type. - The root cause. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Gets he name of the object we are trying to load. - - The name of the object. - - - - Gets the name of the object type we are trying to load. - - The name of the object type. - - - - Gets the resource description that the object definition came from - - The resource description. - - - - A implementation that represents - a composed collection of instances. - - - - - The criteria for an arbitrary filter. - - Rick Evans - - - - Does the supplied satisfy the criteria - encapsulated by this instance? - - - The datum to be checked by this criteria instance. - - - if the supplied - satisfies the criteria encapsulated by this instance; - if not, or the supplied - is . - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A user-defined (child) criteria that will be composed into this instance. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The data to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Adds the supplied into the criteria - composed within this instance. - - - The to be added. - - - - - The list of composing this - instance. - - - - - Factory class to conceal any default implementation. - - Rod Johnson - Simon White (.NET) - - - - Creates a new instance of the - implementation provided by this factory. - - - A new instance of the - implementation provided by this factory. - - - - - Interface to be implemented by objects that can return information about - the current call stack. - - -

- Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - The to look for. - - - if the caller is under the supplied . - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - - The to look for. - - The name of the method to look for. - - if the caller is under the supplied - and . - - - - - Does the current stack trace contain the supplied ? - - The token to match against. - - if the current stack trace contains the supplied - . - - - - - Creates a new instance of the - class. - - - - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - -

- Matches the whole method name. -

-
- -
- - - Does the current stack trace contain the supplied ? - - -

- This leaves it up to the caller to decide what matches, but is obviously less of - an abstraction because the caller must know the exact format of the underlying - stack trace. -

-
- -
- - - Provides methods to support various naming and other conventions used throughout the framework. - Mainly for internal use within the framework. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - Convert Strings in attribute name format (lowercase, hyphens separating words) - into property name format (camel-cased). For example, transaction-manager is - converted into transactionManager. - - - - - Convenience class that exposes a signature that matches the - delegate. - - -

- Useful when filtering members via the - mechanism. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - - - Returns true if the supplied instance - satisfies the supplied (which must be an - implementation). - - - The instance that will be checked to see if - it matches the supplied . - - - The criteria against which to filter the supplied - instance. - - - True if the supplied instance - satisfies the supplied (which must be an - implementation); false if not or the - supplied is not an - implementation or is null. - - - - - Interface that can be implemented by exceptions etc that are error coded. - - -

- The error code is a , rather than a number, so it can - be given user-readable values, such as "object.failureDescription". -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Return the error code associated with this failure. - - -

- The GUI can render this anyway it pleases, allowing for I18n etc. -

-
- - The error code associated with this failure, - or the empty string instance if not error-coded. - -
- - - Thrown in response to referring to an invalid property (most often via reflection). - - Rick Evans - - - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - - - Creates a new instance of the InvalidPropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The that is (or rather was) the source of the - offending property. - - - - - The name of the offending property. - - - - - Extension of the interface, expressing a 'priority' - ordering: Order values expressed by IPriorityOrdered objects always - apply before order values of 'plain' Ordered values. - - - This is primarily a special-purpose interface, used for objects - where it is particularly important to determine 'prioritized' - objects first, without even obtaining the remaining objects. - A typical example: Prioritized post-processors in a Spring - - - IPriorityOrdered post-processor objects are initialized in - a special phase, ahead of other post-processor objects. - - Juergen Hoeller - Mark Pollack (.NET) - - - - - - - Criteria that is satisfied if the of each of the - arguments matches each of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - -

- This implementation respects the inheritance chain of any parameter - s... i.e. methods that have a base type (or - interface) that is assignable to the in the - same corresponding index of the parameter types will satisfy this - criteria instance. -

-
- The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - -
- - - Criteria that is satisfied if the number of generic arguments to a given - matches an arbitrary number. - - -

- This class supports checking the generic arguments count of both - generic methods and constructors. -

-
- Bruno Baia -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Thrown when a method (typically a property getter or setter invoked via reflection) - throws an exception, analogous to a . - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for exceptions related to a property access, such as a - mismatch or a target invocation exception. - - Rod Johnson - Mark Pollack (.NET) - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessException class. - - - - - Creates a new instance of the PropertyAccessException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Returns the PropertyChangeEventArgs that resulted in the problem. - - - - - The string error code used to classify the error. - - - - - Creates a new instance of the MethodInvocationException class. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Constructor to use when an exception results from a - . - - - The raised by the invoked property. - - - The that - resulted in an exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The error code string for this exception. - - - - - Criteria that is satisfied if the method Name of an - instance matches a - supplied string pattern. - - - - Supports the following simple pattern styles: - "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - - Bruno Baia - - - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to * (any method name). -

-
-
- - - Creates a new instance of the - class. - - The pattern that names - must match against in order to satisfy this criteria. - - If the supplied is null or resolve to an empty string. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is null or resolve to an empty string. - - - - - Helper class that encapsulates the specification of a method parameter, i.e. - a MethodInfo or ConstructorInfo plus a parameter index. - Useful as a specification object to pass along. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - Initializes a new instance of the class for the given - MethodInfo. - - The MethodInfo to specify a parameter for. - Index of the parameter. - - - - Initializes a new instance of the class. - - The ConstructorInfo to specify a parameter for. - Index of the parameter. - - - - Create a new MethodParameter for the given method or donstructor. - This is a convenience constructor for scenarios where a - Method or Constructor reference is treated in a generic fashion. - - The method or constructor to specify a parameter for. - Index of the parameter. - the corresponding MethodParameter instance - - - - Parameters the name of the method/constructor parameter. - - the parameter name. - - - - Gets the type of the method/constructor parameter. - - The type of the parameter. (never null) - - - - Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The MethodInfo, or null if none. - - - - Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The ConstructorInfo, or null if none - - - - Criteria that is satisfied if the number of parameters to a given - matches an arbitrary number. - - -

- This class supports checking the parameter count of both methods and - constructors. -

-

- Default parameters, etc need to taken into account. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Criteria that is satisfied if the of each of the - parameters of a given matches each - of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the return of a given - matches a given . - - Rick Evans - - - - The return to match against if no - is provided explictly. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Thrown in response to a failed attempt to read a property. - - -

- Typically thrown when attempting to read the value of a write-only - property via reflection. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - 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. - - - - - Thrown in response to a failed attempt to write a property. - - Mark Pollack (.NET) - - - - Creates a new instance of the NotWritablePropertyException class. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class - summarizing what property was not writable. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - - - Creates new NotWritablePropertyException with a root cause. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - The root cause indicating why the property was not writable. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to encountering a value - when traversing a nested path expression. - - - - - 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 of the object where the property was not found. - - The name of the property not found. - - - - Creates a new instance of the - class. - - - The of the object where the property was not found. - - The name of the property not found. - A message about the exception. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the offending property. - - - - - The of the class where the property was last looked for. - - - - - Comparator implementation for objects, sorting by - order value ascending (resp. by priority descending). - - -

- Non- objects are treated as greatest order values, - thus ending up at the end of a list, in arbitrary order (just like same order values of - objects). -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Compares two objects and returns a value indicating whether one is less than, - equal to or greater than the other. - - -

- Uses direct evaluation instead of - to avoid unnecessary boxing. -

-
- The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - -
- - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - Provides additional data for the PropertyChanged event. - - -

- Provides some additional properties over and above the name of the - property that has changed (which is inherited from the - base class). - This allows calling code to determine whether or not a property has - actually changed (i.e. a PropertyChanged event may have been - raised, but the value itself may be equivalent). -

-
- -
- - - Create a new instance of the - class. - - - The name of the property that was changed. - The old value of the property. - the new value of the property. - - - - Get the old value for the property. - - - - - - Get the new value of the property. - - - - - - A base class for all - implementations that are regular expression based. - - Rick Evans - - - - The default pattern... matches absolutely anything. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The regular expression pattern to be applied. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Convenience method that calls the - - on the supplied . - - The input to match against. - True if the matches. - - - - The regular expression pattern to be applied. - - - - - The regular expression options to be applied. - - - - - The regular expression to be applied. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default event name pattern... matches pretty much any event name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default method name pattern... matches pretty much any method name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Exception thrown on a mismatch when trying to set a property - or resolve an argument to a method invocation. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the TypeMismatchException class. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the TypeMismatchException class describing the - property and required type that could not used to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - - - - Creates a new instance of the TypeMismatchException class describing the - property, required type, and underlying exception that could not be used - to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - The underlying exception. - - - - Creates a new instance of the TypeMismatchException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The string error code used to classify the exception. - - - - - Abstract base class for implementations. - - Aleksandar Seovic - - - - An interface that defines the methods that have to be implemented by all data bindings. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - The name of the always filled error provider - - - - - Gets or sets a flag specifying whether this binding is valid. - - - true if this binding evaluated without errors; - false otherwise. - - - - - Marks this binding's state as invalid for this validationErrors collection. - Returns false if is null. - - - false, if validationErrors is null - - - - Initializes a new instance of the class. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets the unique ID of this binding instance. - - - - - Gets or sets the . - - The binding direction. - - - - Gets the error message. - - The error message. - - - - Gets the error providers. - - - - - Abstract base class for simple, one-to-one implementations. - - Aleksandar Seovic - - - - Initialize a new instance of without any - - - - - Initialize a new instance of with the - specified . - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation if source to target binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation of target to source binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets or sets the to use. - - The formatter to use. - - - - Base implementation of the . - - Aleksandar Seovic - - - - An interface that has to be implemented by all data binding containers. - - Aleksandar Seovic - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Gets a value indicating whether this data binding container - has bindings. - - - true if this data binding container has bindings; - false otherwise. - - - - - Creates a new instance of . - - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Implemented as a NOOP for containers. - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Gets a list of bindings for this container. - - - A list of bindings for this container. - - - - - Gets a value indicating whether this instance has bindings. - - - true if this instance has bindings; otherwise, false. - - - - - BaseBindingManager keeps track of all registered bindings and - represents an entry point for the binding and unbinding process. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Enumeration that defines possible values for data binding direction. - - Aleksandar Seovic - - - - Specifies that value from the control property should be bound to a data model. - - - - - Specifies that value from the data model should be bound to control property. - - - - - Specifies that binding is bidirectional. - - - - - Represents an ErrorMessage specific to a binding instance. - - Erich Eichinger - - - - Represents a single validation error message. - - Aleksandar Seovic - Goran Milosavljevic - - - - Default constructor. - - - - - Initializes a new instance of the class. - - Error message resource identifier. - Parameters that should be used for message resolution. - - - - Initializes a new instance of the class copying values from another instance. - - Another Error message instance to copy values from. - - - - This property is reserved, apply the - - to the class instead. - - - An - that describes the XML representation of the object that - is produced by the - - method and consumed by the - - method. - - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Resolves the message against specified . - - Message source to resolve this error message against. - Resolved error message. - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets or sets the resource identifier for this message. - - The resource identifier for this message. - - - - Gets or sets the message parameters. - - The message parameters. - - - - Initializes a new instance of the class. - - the id of the binding this error message is associated with - the message id - optional parameters to this message - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Get the ID of the binding this message instance relates to. - - - - - Interface that should be implemented by data bound objects, such as - web pages, user controls, windows forms, etc. - - Aleksandar Seovic - - - - Gets the binding manager. - - The binding manager. - - - - implementation that allows - data binding between collections that implement - interface. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Simple, expression-based implementation of that - binds source to target one-to-one. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - The formatter to use. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the source expression. - - The source expression. - - - - Gets the target expression. - - The target expression. - - - - Minimal AST node interface used by ANTLR AST generation and tree-walker. - - - - - Add a (rightmost) child to this node - - - - - - Get the first child of this node; null if no children - - - - - Get the next sibling in line after this one - - - - - Get the token text for this node - - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Set the first child of a node. - - - - - - Set the next sibling after this one. - - - - - - Set the token text for this node - - - - - - Set the token type for this node - - - - - - Get the token type for this node - - - - - Event type. - - - - Used for creating Token instances. - - - Used for caching lookahead characters. - - - - This method is executed by ANTLR internally when it detected an illegal - state that cannot be recovered from. - The previous implementation of this method called - and writes directly to , which is usually not - appropriate when a translator is embedded into a larger application. - - Error message. - - - - A creator of Token object instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of Token objects. - - - Since Lexers in ANTLR use a single Token type, each TokenCreator can - create one class of Token objects (that's why it's not called TokenFactory). - - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - The fully qualified name of the Token type to create. - - - - - Type object used as a template for creating tokens by reflection. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - This type was created in VisualAge. - - - - Report exception errors caught in nextToken() - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - - Represents a stream of characters fed to the lexer from that can be rewound - via mark()/rewind() methods. - - - - A dynamic array is used to buffer up all the input characters. Normally, - "k" characters are stored in the buffer. More characters may be stored - during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. - Consumption of characters is deferred. In other words, reading the next - character is not done by conume(), but deferred until needed by LA or LT. - - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "CharConsumed" event. - - Event source object - Event data object - - - - Handle the "CharLA" event. - - Event source object - Event data object - - - - Handle the "Mark" event. - - Event source object - Event data object - - - - Handle the "Rewind" event. - - Event source object - Event data object - - - charBufferConsume method comment. - - - - charBufferLA method comment. - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Specify an object with support code (shared by Parser and TreeParser. - Normally, the programmer does not play with this, using - instead. - - - - - - Specify the type of node to create during tree building. - - Fully qualified AST Node type name. - - - - Specify the type of node to create during tree building. - use now to be consistent with - Token Object Type accessor. - - Fully qualified AST Node type name. - - - - - - - - Get another token object from the token stream - - - - Return the token type of the ith token of lookahead where i=1 - is the current token being examined by the parser (i.e., it - has not been matched yet). - - - - Make sure current lookahead symbol matches token type t. - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Make sure current lookahead symbol matches the given set - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Parser error-reporting function can be overridden in subclass - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - User can override to do their own debugging - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Specifies the behaviour required (i.e. parser modifications) - specifically to support parse tree debugging and derivation. - - - - Override the standard matching and rule entry/exit routines - to build parse trees. This class is useful for 2.7.3 where - you can specify a superclass like - - - class TinyCParser extends Parser(ParseTreeDebugParser); - - - - - - Each new rule invocation must have it's own subtree. Tokens are - added to the current root so we must have a stack of subtree roots. - - - - - Track most recently created parse subtree so that when parsing - is finished, we can get to the root. - - - - - For every rule replacement with a production, we bump up count. - - - - - Adds LT(1) to the current parse subtree. - - - - Note that the match() routines add the node before checking for - correct match. This means that, upon mismatched token, there - will a token node in the tree corresponding to where that token - was expected. For no viable alternative errors, no node will - be in the tree as nothing was matched() (the lookahead failed - to predict an alternative). - - - - - - Create a rule node, add to current tree, and make it current root - - - - - - Pop current root; back to adding to old root - - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - AST Support code shared by TreeParser and Parser. - - - - We use delegation to share code (and have only one - bit of code to maintain) rather than subclassing - or superclassing (forces AST support code to be - loaded even when you don't want to do AST stuff). - - - Typically, is used to specify the - homogeneous type of node to create, but you can override - to make heterogeneous nodes etc... - - - - - - Constructs an ASTFactory with the default AST node type of - . - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - Name of default AST node type for this factory. - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - MetaType of default AST node type for this factory. - - - - - Stores the Type of the default AST node class to be used during tree construction. - - - - - Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass - and ASTNodeCreator. - - - - - Stores the mapping between AST node typenames and their token ID. - - - - - Specify an "override" for the type created for - the specified Token type. - - - This method is useful for situations that ANTLR cannot oridinarily deal - with (i.e., when you create a token based upon a nonliteral token symbol - like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token - type (and hence the AST) statically. - - Token type to override. - - Fully qualified AST typename (or null to specify - the factory's default AST type). - - - - - Register an AST Node Type for a given Token type ID. - - The Token type ID. - The AST Node Type to register. - - - - Register an ASTNodeCreator for a given Token type ID. - - The Token type ID. - The creater to register. - - - - Register an ASTNodeCreator to be used for creating node by default. - - The ASTNodeCreator. - - - - Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings - to the specified size. - This is primarily a convenience method that can be used to prevent - unnecessary and costly re-org of the mappings list. - - Maximum Token Type ID. - - - - Add a child to the current AST - - The AST to add a child to - The child AST to be added - - - - Creates a new uninitialized AST node. Since a specific AST Node Type - wasn't indicated, the new AST node is created using the current default - AST Node type - - - An uninitialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. Once created, - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - Fully qualified name of the Type to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. - - Token instance to be used to initialize the new AST Node. - - Fully qualified name of the Type to be used for creating the new AST Node. - - A newly created and initialized AST node object. - - Once created, the new AST node is initialized with the specified Token - instance. The used for creating this new AST - node is determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - - - - Creates and initializes a new AST node using the specified AST Node instance. - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by aNode. - The AST Node type must have a default/parameterless constructor. - - AST Node instance to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token instance. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token instance to be used to create new AST Node. - An initialized AST node object. - - - - Returns a copy of the specified AST Node instance. The copy is obtained by - using the method Clone(). - - AST Node to copy. - An AST Node (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node and all of it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Make a tree from a list of nodes. The first element in the - array is the root. If the root is null, then the tree is - a simple list not a tree. Handles null children nodes correctly. - For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) - yields tree (nil a b). - - List of Nodes. - AST Node tree. - - - - Make a tree from a list of nodes, where the nodes are contained - in an ASTArray object. - - List of Nodes. - AST Node tree. - - - - Make an AST the root of current AST. - - - - - - - Sets the global default AST Node Type for this ASTFactory instance. - This method also attempts to load the instance - for the specified typename. - - Fully qualified AST Node Type name. - - - - To change where error messages go, can subclass/override this method - and then setASTFactory in Parser and TreeParser. This method removes - a prior dependency on class antlr.Tool. - - - - - - A creator of AST node instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of AST node objects. - - - Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever - they need to create an AST node objeect. What this class does is to support - performant extensibility of the basic ASTFactory. The ASTFactory can now be - extnded as run-time to support more new AST node types without using needing - to use reflection. - - - - - - Constructs an instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Summary description for ASTVisitor. - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Small buffer used to avoid reading individual chars - - - - - Small buffer used to avoid reading individual chars - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - A token is minimally a token type. Subclasses can add the text matched - for the token and line info. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Summary description for DumpASTVisitor. - - Simple class to dump the contents of an AST to the output - - - - Append a char to the msg buffer. If special, then show escaped version - - Message buffer - Char to append - - - - Walk parse tree and return requested number of derivation steps. - If steps less-than 0, return node text. If steps equals 1, return derivation - string at step. - - derivation steps - - - - - Get derivation and return how many you did (less than requested for - subtree roots. - - string buffer - derivation steps - - - - - Do a step-first walk, building up a buffer of tokens until - you've reached a particular step and print out any rule subroots - insteads of descending. - - derivation buffer - derivation steps - - - - - This token stream tracks the *entire* token stream coming from - a lexer, but does not pass on the whitespace (or whatever else - you want to discard) to the parser. - - - - This class can then be asked for the ith token in the input stream. - Useful for dumping out the input stream exactly after doing some - augmentation or other manipulations. Tokens are index from 0..n-1 - - - You can insert stuff, replace, and delete chunks. Note that the - operations are done lazily--only if you convert the buffer to a - string. This is very efficient because you are not moving data around - all the time. As the buffer of tokens is converted to strings, the - toString() method(s) check to see if there is an operation at the - current index. If so, the operation is done and then normal string - rendering continues on the buffer. This is like having multiple Turing - machine instruction streams (programs) operating on a single input tape. :) - - - Since the operations are done lazily at toString-time, operations do not - screw up the token index values. That is, an insert operation at token - index i does not change the index values for tokens i+1..n-1. - - - Because operations never actually alter the buffer, you may always get - the original token stream back without undoing anything. Since - the instructions are queued up, you can easily simulate transactions and - roll back any changes if there is an error just by removing instructions. - For example, - - For example: - - TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); - JavaRecognizer parser = new JavaRecognizer(rewriteEngine); - ... - rewriteEngine.insertAfter("pass1", t, "foobar");} - rewriteEngine.insertAfter("pass2", u, "start");} - System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); - System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); - - - - You can also have multiple "instruction streams" and get multiple - rewrites from a single pass over the input. Just name the instruction - streams and use that name again when printing the buffer. This could be - useful for generating a C file and also its header file--all from the - same buffer. - - - If you don't use named rewrite streams, a "default" stream is used. - - - Terence Parr, parrt@cs.usfca.edu - University of San Francisco - February 2004 - - - - - - Track the incoming list of tokens - - - - - You may have multiple, named streams of rewrite operations. - I'm calling these things "programs." - Maps string (name) -> rewrite (List) - - - - - Map string (program name) -> Integer index - - - - - track index of tokens - - - - - Who do we suck tokens from? - - - - - Which (whitespace) token(s) to throw out - - - - - Rollback the instruction stream for a program so that - the indicated instruction (via instructionIndex) is no - longer in the stream. - - - UNTESTED! - - - - - - - Reset the program so that no instructions exist - - - - - - If op.index > lastRewriteTokenIndexes, just add to the end. - Otherwise, do linear - - - - - - Execute the rewrite operation by possibly adding to the buffer. - - rewrite buffer - The index of the next token to operate on. - - - - This token tracks it's own index 0..n-1 relative to the beginning - of the stream. It is designed to work with - in TokenStreamRewriteEngine.cs - - - - - Index into token array indicating position in input stream - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Implementation of the average aggregator. - - Aleksandar Seovic - - - - Defines an interface that should be implemented - by all collection processors and aggregators. - - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Returns the average of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The average of the numeric values in the source collection. - - - - - Converts all elements in the input list to a given target type. - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the count aggregator. - - Aleksandar Seovic - - - - Returns the number of items in the source collection. - - - The source collection to process. - - - Ignored. - - - The number of items in the source collection, - or zero if the collection is empty or null. - - - - - Converts a string literal to a instance. - - Erich Eichinger - - - - - Erich Eichinger - - - - Implementation of the distinct processor. - - Aleksandar Seovic - - - - Returns distinct items from the collection. - - - The source collection to process. - - - 0: boolean flag specifying whether to include null - in the results or not. Default is false, which means that - null values will not be included in the results. - - - A collection containing distinct source collection elements. - - - If there is more than one argument, or if the single optional argument - is not Boolean. - - - - - Implementation of the maximum aggregator. - - Aleksandar Seovic - - - - Returns the largest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The largest item in the source collection. - - - - - Implementation of the minimum aggregator. - - Aleksandar Seovic - - - - Returns the smallest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The smallest item in the source collection. - - - - - Implementation of the non-null processor. - - Aleksandar Seovic - - - - Returns non-null items from the collection. - - - The source collection to process. - - - Ignored. - - - A collection containing non-null source collection elements. - - - - - Implementation of the 'order by' processor. - - Aleksandar Seovic - Erich Eichinger - - - - Sorts the source collection using custom sort criteria. - - - Please note that your compare function needs to take care about - proper conversion of types to be comparable! - - - The source collection to sort. - - - Sort criteria to use. - - - A sorted array containing collection elements. - - - - - Reverts order of elements in the list - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the sort processor. - - Aleksandar Seovic - - - - Sorts the source collection. - - - Please not that this processor requires that collection elements - are of a uniform type and that they implement - interface. -

- If you want to perform custom sorting based on element properties - you should consider using instead. - - - The source collection to sort. - - - Ignored. - - - An array containing sorted collection elements. - - - If collection is not empty and it is - neither nor . - - - -

- Implementation of the sum aggregator. - - Aleksandar Seovic -
- - - Returns the sum of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The sum of the numeric values in the source collection. - - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Base type for nodes that accept arguments. - - Aleksandar Seovic - - - - Base type for all expression nodes. - - Aleksandar Seovic - - - - For internal purposes only. Use for expression node implementations. - - - This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST - unfortunately is not marked as [Serializable].
-
- Note:Since SpringAST implements , deriving classes - have to explicitely override if they need to persist additional - data during serialization. -
-
- - - The global SpringAST node factory - - - - - Create an instance - - - - - Create an instance from a token - - - - - initialize this instance from an AST - - - - - initialize this instance from an IToken - - - - - initialize this instance from a token type number and a text - - - - - sets the text of this node - - - - - gets the text of this node - - - - - Create a new instance from SerializationInfo - - - - - populate SerializationInfo from this instance - - - - - gets or sets the token type of this node - - - - - gets or sets the text of this node - - - - - Interface that all navigation expression nodes have to implement. - - Aleksandar Seovic - - - - Returns expression value. - - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Expression variables map. - Value of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - New value for the last node of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - Expression variables map. - New value for the last node of the expression. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value. - - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Expression variables map. - Node's value. - - - - Returns node's value for the given context. - - Node's value. - - - - Evaluates this node for the given context, switching local variables map to the ones specified in . - - - - - Sets node's value for the given context. - - Object to evaluate node against. - New value for this node. - - - - Sets node's value for the given context. - - Object to evaluate node against. - Expression variables map. - New value for this node. - - - - Sets node's value for the given context. - - -

- This is a default implementation of Set method, which - simply throws . -

-

- This was done in order to avoid redundant Set method implementations, - because most of the node types do not support value setting. -

-
-
- - - Returns a string representation of this node instance. - - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Holds the state during evaluating an expression. - - - - - Gets/Sets the root context of the current evaluation - - - - - Gets/Sets the current context of the current evaluation - - - - - Gets/Sets global variables of the current evaluation - - - - - Gets/Sets local variables of the current evaluation - - - - - Initializes a new EvaluationContext instance. - - The root context for this evaluation - dictionary of global variables used during this evaluation - - - - Switches current ThisContext. - - - - - Switches current LocalVariables. - - - - - Gets the type of the - - - - - Create a new instance - - - - - Create a new instance - - - - - Append an argument node to the list of child nodes - - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - - - - Asserts the argument count. - - The required count. - - - - Resolves the arguments. - - Current expression evaluation context. - An array of argument values - - - - Resolves the named arguments. - - Current expression evaluation context. - A dictionary of argument name to value mappings. - - - - Resolves the argument. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the argument without ensuring was called. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the named argument. - - Argument name. - Current expression evaluation context. - Resolved named argument value. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed assignment node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed attribute node in the navigation expression. - - Aleksandar Seovic - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Determines the type of object that should be instantiated. - - - The type name to resolve. - - - The type of object that should be instantiated. - - - If the type cannot be resolved. - - - - - Initializes this node by caching necessary constructor and property info. - - - - - - - Sets the named arguments (properties). - - Instance to set property values on. - Argument (property) name to value mappings. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Tries to determine attribute type based on the specified - attribute type name. - - - Attribute type name to resolve. - - - Resolved attribute type. - - - If type cannot be resolved. - - - - - Base class for binary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance with the supplied operands - - - - - - - Create a new instance from SerializationInfo - - - - - Evaluate the left operand - - - - - Evaluate the left operand - - - - - Gets the left operand. - - The left operand. - - - - Gets the right operand. - - The right operand. - - - - Represents parsed boolean literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the boolean literal node. - - - This is the entrypoint into evaluating this expression. - - Node's value. - - - - Represents parsed default node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns left operand if it is not null, or the right operand if it is. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Container object for the parsed expression. - - -

- Preparing this object once and reusing it many times for expression - evaluation can result in significant performance improvements, as - expression parsing and reflection lookups are only performed once. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of the class - by parsing specified expression string. - - Expression to parse. - - - - Registers lambda expression under the specified . - - Function name to register expression as. - Lambda expression to register. - Variables dictionary that the function will be registered in. - - - - Initializes a new instance of the class - by parsing specified primary expression string. - - Primary expression to parse. - - - - Initializes a new instance of the class - by parsing specified property expression string. - - Property expression to parse. - - - - Initializes a new instance of the class. - - - - - Create a new instance from SerializationInfo - - - - - Evaluates this expression for the specified root object and returns - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value of the last node. - - - - Evaluates this expression for the specified root object and sets - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value to set last node to. - If navigation expression is empty. - - - - Evaluates this expression for the specified root object and returns - of the last node, if possible. - - Context to evaluate expression against. - Expression variables map. - Value of the last node. - - - - Contains a list of reserved variable names. - You must not use any variable names with the reserved prefix! - - - - - Variable Names using this prefix are reserved for internal framework use - - - - - variable name of the currently processed object factory, if any - - - - - Converts string representation of expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Utility class that enables easy expression evaluation. - - -

- This class allows users to get or set properties, execute methods, and evaluate - logical and arithmetic expressions. -

-

- Methods in this class parse expression on every invocation. - If you plan to reuse the same expression many times, you should prepare - the expression once using the static method, - and then call to evaluate it. -

-

- This can result in significant performance improvements as it avoids expression - parsing and node resolution every time it is called. -

-

-

-
- Aleksandar Seovic -
- - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Value of the last node in the expression. - - - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Expression variables map. - Value of the last node in the expression. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Value to set last node to. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Expression variables map. - Value to set last node to. - - - - Represents parsed expression list node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a result of the last expression in a list. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the last expression in a list - - - - Represents parsed function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed hexadecimal integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the hexadecimal integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed indexer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - - Context to resolve property against. - Expression variables map. - PropertyInfo for this node. - - - - Represents parsed integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents lambda expression. - - Aleksandar Seovic - - - - caches argumentNames of this instance - - - - - caches body expression of this lambda function - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Gets argument names for this lambda expression. - - - - - Represents parsed list initializer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the list defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents local function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Represents parsed map entry node. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map entry defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed map initializer node in the navigation expression. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Static constructor. Initializes a map of special collection processor methods. - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Gets the best method given the name, argument values, for a given type. - - The type on which to search for the method. - Name of the method. - The binding flags. - The arg values. - Best matching method or null if none found. - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed null literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the null literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic addition operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic addition operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents AND operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical BETWEEN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents arithmetic division operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic division operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical equality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical equality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical IN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical IS operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IS operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical "less than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "less than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents VB-style logical LIKE operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical LIKE operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents logical MATCHES operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical MATCHES operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents arithmetic modulus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic modulus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic multiplication operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic multiplication operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents NOT operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Base class for unary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Gets the operand. - - The operand. - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical NOT operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical inequality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical inequality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents OR operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical OR operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic exponent operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic exponent operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic subtraction operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic subtraction operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary minus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary plus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - - Erich Eichinger - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed projection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of projection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents node that navigates to object's property or public field. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - The parent. - - - - Attempts to resolve property or field. - - - Type to search for a property or a field. - - - Property or field name. - - - Binding flags to use. - - - Resolved property or field accessor, or null - if specified cannot be resolved. - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Retrieves property or field value. - - Context to evaluate expressions against. - Current expression evaluation context. - Property or field value. - - - - Sets property value, doing any type conversions that are necessary along the way. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Sets property or field value using either dynamic or standard reflection. - - Object to evaluate node against. - New value for this node, converted to appropriate type. - - - - In the case of read only collections or custom collections that are not assignable from - IList, try to add to the collection. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - true if was able add to IList, IDictionary, or ISet - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... - - Context to resolve property against. - PropertyInfo for this node. - - - - Gets a value indicating whether this node represents a property. - - - true if this node is a property; otherwise, false. - - - - - Gets a value indicating whether this node represents a field. - - - true if this node is a field; otherwise, false. - - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified identifier. - - - Fully qualified identifier as a string. - - - - - Represents parsed real literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the real literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents a reference to a Spring-managed object. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the first context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the last context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of selection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed string literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Exception thrown when detecting invalid SpEL syntax - - Erich Eichinger - - - - TODO - - - - - TODO - - - - - - - - - - - - - - - - - - - - Gets a message that provides details on the syntax error. - - - - - The expression that caused the error - - - - - Represents ternary expression node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed type node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified typename. - - - Fully qualified typename as a string. - - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Implementation of that can be used to - format and parse boolean values. - - Erich Eichinger - - - - Interface that should be implemented by all formatters. - - - - Formatters assume that source value is a string, and make no assumptions - about the target value's type, which means that Parse method can return - object of any type. - - - Aleksandar Seovic - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Initializes a new instance of the class - using default values - - - - - Initializes a new instance of the class - - - - - Formats the specified boolean value. - - The value to format. - Formatted boolean value. - If is null. - If is not of type . - - - - Parses the specified boolean value according to settings of and - - The boolean value to parse. - Parsed boolean value as a . - If does not match or . - - - - Set/Get value to control casesensitivity of - - - Defaults to true - - - - - Set/Get value to recognize as boolean "true" value - - - Defaults to - - - - - Set/Get value to recognize as boolean "false" value - - - Defaults to - - - - - Implementation of that can be used to - format and parse currency values. - - - - CurrencyFormatter uses currency related properties of the - to format and parse currency values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of CurrencyFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the CurrencyFormatter in order - to override some of the default currency formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - currency values are formatted. - - - - - Formats the specified currency value. - - The value to format. - Formatted currency . - If is null. - If is not a number. - - - - Parses the specified currency value. - - The currency value to parse. - Parsed currency value as a . - - - - Gets or sets the currency decimal digits. - - The currency decimal digits. - - - - - Gets or sets the currency decimal separator. - - The currency decimal separator. - - - - - Gets or sets the currency group sizes. - - The currency group sizes. - - - - - Gets or sets the currency group separator. - - The currency group separator. - - - - - Gets or sets the currency symbol. - - The currency symbol. - - - - - Gets or sets the currency negative pattern. - - The currency negative pattern. - - - - - Gets or sets the currency positive pattern. - - The currency positive pattern. - - - - - Implementation of that can be used to - format and parse values. - - - - DateTimeFormatter uses properties of the - to format and parse values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of DateTimeFormatter, default DateTimeFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the DateTimeFormatter in order - to override some of the default formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - Date/time format string. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture. - - - - Formats the specified value. - - The value to format. - Formatted value. - If is null. - If is not an instance of . - - - - Parses the specified value. - - The string to parse. - Parsed value. - - - - Provides base functionality for filtering values before they actually get parsed/formatted. - - Erich Eichinger - - - - Creates a new instance of this FilteringFormatter. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Allows to rewrite a value before it gets parsed by the underlying formatter - - - - - Allows to change a value before it gets formatted by the underlying formatter - - - - - Implementation of that can be used to - format and parse floating point numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign, decimal point, exponent). - - - Aleksandar Seovic - - - - Default format string. - - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and current thread's culture. - - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and specified culture. - - The culture. - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - The culture name. - - - - Initializes a new instance of the class, - using specified format string and culture. - - The format string. - The culture. - - - - Formats the specified float value. - - The value to format. - Formatted floating point number. - If is null. - If is not a number. - - - - Parses the specified float value. - - The float value to parse. - Parsed float value as a . - - - - Replaces input strings with a given default value, - if they are null or contain whitespaces only, - - Erich Eichinger - - - - Creates a new instance of this HasTextFilteringFormatter using null as default value. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Creates a new instance of this HasTextFilteringFormatter. - - the default value to be returned, if input text doesn't contain text - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - If value contains no text, it will be replaced by a defaultValue. - - - - - Implementation of that can be used to - format and parse integer numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign). - - - Aleksandar Seovic - - - - Initializes a new instance of the class, - using default format string of '{0:D}'. - - - - - Initializes a new instance of the class, - using specified format string. - - - - - Formats the specified integer value. - - The value to format. - Formatted integer number. - If is null. - If is not an integer number. - - - - Parses the specified integer value. - - The integer value to parse. - Parsed number value as a . - - - - Implementation of that simply calls . - - - This formatter is a no-operation implementation. - - Erich Eichinger - - - - Initializes a new instance of the class. - - - - - Converts the passed value to a string by calling . - - The value to convert. - to string converted value. - - - - Returns the passed string "as is". - - The value to return. - The value passed into this method. - - - - Implementation of that can be used to - format and parse numbers. - - - - NumberFormatter uses number-related properties of the - to format and parse numbers. - - - This formatter works with both integer and decimal numbers and allows - you to format and parse numbers that conform to - number style (leading and trailing white space and/or sign, thousands separator, - decimal point) - - - If you use one of the constructors that accept culture as a parameter - to create an instance of NumberFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the NumberFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified number value. - - The value to format. - Formatted number . - If is null. - If is not a number. - - - - Parses the specified number value. - - The number value to parse. - Parsed number value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the number group sizes. - - The number group sizes. - - - - - Gets or sets the number group separator. - - The number group separator. - - - - - Gets or sets the negative pattern. - - The number negative pattern. - - - - - Implementation of that can be used to - format and parse numbers. - - - - PercentFormatter uses percent-related properties of the - to format and parse percentages. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of PercentFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the PercentFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified percentage value. - - The value to format. - Formatted percentage. - If is null. - If is not a number. - - - - Parses the specified percentage value. - - The percentage value to parse. - Parsed percentage value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the percent group sizes. - - The percent group sizes. - - - - - Gets or sets the percent group separator. - - The percent group separator. - - - - - Gets or sets the negative pattern. - - The percent negative pattern. - - - - - Gets or sets the positive pattern. - - The percent positive pattern. - - - - - Gets or sets the percent symbol. - - The percent symbol. - - - - - Gets or sets the per mille symbol. - - The per mille symbol. - - - - - Loads a list of resources that should be applied from the .NET . - - -

- This implementation will iterate over all resource managers - within the message source and return a list of all the resources whose name starts with '$this'. -

-

- All other resources will be ignored, but you can retrieve them by calling one of - GetMessage methods on the message source directly. -

-
- Aleksandar Seovic -
- - - Abstract base class that all localizers should extend - - -

- This class contains the bulk of the localizer logic, including implementation - of the ApplyResources methods that are defined in - interface. -

-

- All specific localizers need to do is inherit this class and implement - GetResources method that will return a list of - objects that should be applied to a specified target. -

-

- Custom implementations can use whatever type of resource storage they want, - such as standard .NET resource sets, custom XML files, database, etc. -

-
- Aleksandar Seovic -
- - - Defines an interface that localizers have to implement. - - -

- Localizers are used to automatically apply resources to object's members - using reflection. -

-
- Aleksandar Seovic -
- - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's culture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's uiCulture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Returns a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - implementation - that simply returns the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . - - Aleksandar Seovic - - - - Strategy interface for - resolution. - - Aleksandar Seovic - - - - Resolves the - from some context. - - -

- The 'context' is determined by the appropriate implementation class. - An example of such a context might be a thread local bound - , or a - sourced from an HTTP - session. -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - -

- This is an optional operation and does not need to be implemented - such that it actually does anything useful (i.e. it can be a no-op). -

-
- - The new or - to clear the current . - -
- - - Returns the default . - - -

- It tries to get the - from the value of the - - property and falls back to the of the - current thread if the - - is . -

-
- - The default - -
- - - Resolves the - from some context. - - -

- The 'context' in this implementation is the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - - The new or - to clear the current . - - - - - - - The default . - - - The default . - - - - - Abstract base class that all resource cache implementations should extend. - - Aleksandar Seovic - - - - Defines an interface that resource cache adapters have to implement. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Gets the list of resources from the cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Crates resource cache key for the specified target object and culture. - - Target object to apply resources to. - Resource culture to use for resource lookup. - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Resource cache implementation that doesn't cache resources. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - Always returns null. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - - - - Holds mapping between control property and it's value - as read from the resource file. - - Aleksandar Seovic - - - - Creates instance of resource mapper. - - Target property. - Resource value. - - - - Gets parsed target property expression. See - for more information on object navigation expressions. - - - - - Value of the resource that target property should be set to. - - - - - Utility class to aid in the manipulation of events and delegates. - - Griffin Caprio - - - - Returns a new instance of the requested . - - -

- Often used to wire subscribers to event publishers. -

-
- - The of delegate to create. - - - The target subscriber object that contains the delegate implementation. - - - referencing the delegate method on the subscriber. - - - A delegate handler that can be added to an events list of handlers, or called directly. - -
- - - Queries the input type for a signature matching the input - signature. - - - Typically used to query a potential subscriber to see if they implement an event handler. - - to match against - to query - - matching input - signature, or if there is no match. - - - - - Creates a new instance of the EventManipulationUtilities class. - - -

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

-
-
- - - Default implementation of the - interface. - - Griffin Caprio - - - - Creates a new instance of the EventRegistry class. - - - - - Adds the input object to the list of publishers. - - - This publishes all events of the source object to any object - wishing to subscribe - - The source object to publish. - - - - Subscribes to all events published, if the subscriber implements - compatible handler methods. - - The subscriber to use. - - - - Subscribes to published events of all objects of a given type, if the - subscriber implements compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - The target to unsubscribe from - - - - The list of event publishers. - - The list of event publishers. - - - - To be implemented by any object that wishes to receive a reference to - an . - - -

- This interface only applies to objects that have been instantiated - within the context of an - . This interface does - not typically need to be implemented by application code, but is rather - used by classes internal to Spring.NET. -

-
- Mark Pollack - Rick Evans -
- - - Set the - associated with the - that created this - object. - - -

- This property will be set by the relevant - after all of this - object's dependencies have been resolved. This object can use the - supplied - immediately to publish or subscribe to one or more events. -

-
-
- - - Marks a property as being 'required': that is, the setter property - must be configured to be dependency-injected with a value. - - Consult the SDK documentation for , - which, by default, checks for the presence of this annotation. - - Rob Harrop - Mark Pollack - - - - A implementation that enforces required properties to have been configured. - Required properties are detected through an attribute, by default, Spring's - attribute. - - - The motivation for the existence of this IObjectPostProcessor is to allow - developers to annotate the setter properties of their own classes with an - arbitrary attribute to indicate that the container must check - for the configuration of a dependency injected value. This neatly pushes - responsibility for such checking onto the container (where it arguably belongs), - and obviates the need (in part) for a developer to code a method that - simply checks that all required properties have actually been set. - - Please note that an 'init' method may still need to implemented (and may - still be desirable), because all that this class does is enforce that a - 'required' property has actually been configured with a value. It does - not check anything else... In particular, it does not check that a - configured value is not null. - - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Adapter that implements all methods on - as no-ops, which will not change normal processing of each object instantiated - by the container. Subclasses may override merely those methods that they are - actually interested in. - - - Note that this base class is only recommendable if you actually require - functionality. If all you need - is plain functionality, prefer a straight - implementation of that (simpler) interface. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Extension of the interface, - adding a callback for predicting the eventual type of a processed object. - - This interface is a special purpose interface, mainly for - internal use within the framework. In general, application-provided - post-processors should simply implement the plain - interface or derive from the - class. New methods might be added to this interface even in point releases. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Subinterface of - - that adds a before-instantiation callback and a callback after instantiation but before - explicit properties are set or autowiring occurs. - - - - Typically used to suppress default instantiation for specific target objects, - for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, - lazily initializing targets, etc), or to implement additional injection strategies such as field - injection. - - - This interface is a special purpose interface, mainly for internal use within the framework. - It is recommended to implement the plain interface as far as - possible, or to derive from in order to be shielded - from extension to this interface. - - - Juergen Hoeller - Rick Evans (.NET) - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Predicts the type of the object to be eventually returned from this - processors callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Predicts the type of the object to be eventually returned from this - processors PostProcessBeforeInstantiation callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Cache for validated object names, skipping re-validation for the same object - - - - - Post-process the given property values before the factory applies them - to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. - - The property values that the factory is about to apply (never null). - The 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances or null to skip property population. - - If a required property value has not been specified - in the configuration metadata. - - - - Determines whether the supplied property is required to have a value, that is to be dependency injected. - - - This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that - the property has a setter method. - - The target PropertyInfo - - true if the supplied property has been marked as being required;; otherwise, false if - not or if the supplied property does not have a setter method - - - - - Builds an exception message for the given list of invalid properties. - - The list of names of invalid properties. - Name of the object. - The exception message - - - - Sets the type of the required attribute, to be used on a property setter - - - The default required attribute type is the Spring-provided attribute. - This setter property exists so that developers can provide their own - (non-Spring-specific) annotation type to indicate that a property value is required. - - The type of the required attribute. - - - - Base class that provides common functionality needed for several IObjectFactoryPostProcessor - implementations - - Mark Pollack - - - - Allows for custom modification of an application context's object - definitions, adapting the object property values of the context's - underlying object factory. - - -

- Application contexts can auto-detect - IObjectFactoryPostProcessor objects in their object definitions and - apply them before any other objects get created. -

-

- Useful for custom config files targeted at system administrators that - override object properties configured in the application context. -

-

- See PropertyResourceConfigurer and its concrete implementations for - out-of-the-box solutions that address such configuration needs. -

-
- Juergen Hoeller - Rick Evans (.Net) -
- - - Modify the application context's internal object factory after its - standard initialization. - - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - The object factory used by the application context. - - - In case of errors. - -
- - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Resolves the supplied into a - instance. - - The object that is to be resolved into a - instance. - The error context source. - The error context string. - A resolved . - -

- This (default) implementation supports resolving - s and s. - Only override this method if you want to key your type alias - on something other than s - and s. -

-
- - If the supplied is , - or the supplied cannot be resolved. - -
- - - Return the order value of this object, with a higher value meaning - greater in terms of sorting. - - The order value. - - - - - Simple template superclass for - implementations that allows for the creation of a singleton or a prototype - instance (depending on a flag). - - - If the value of the - - property is (this is the default), this class - will create a single instance of it's object upon initialization and - subsequently return the singleton instance; else, this class will - create a new instance each time (prototype mode). Subclasses must - implement the - - template method to actually create objects. - - Juergen Hoeller - Keith Donald - Simon White (.NET) - - - - Interface to be implemented by objects used within an - that are themselves - factories. - - -

- If an object implements this interface, it is used as a factory, - not directly as an object. s - can support singletons and prototypes - ()... - please note that an - itself can only ever be a singleton. It is a logic error to configure an - itself to be a prototype. -

- - An object that implements this interface cannot be used as a normal object. - -
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - - If this method is being called in the context of an enclosing IoC container and - returns , the IoC container will consider this factory - object as not being fully initialized and throw a corresponding (and most - probably fatal) exception. - - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - 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? - - - - - Invoked by an - after it has injected all of an object's dependencies. - - - In the event of misconfiguration (such as the failure to set a - required property) or if initialization fails. - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - Template method that subclasses must override to construct - the object returned by this factory. - - - Invoked once immediately after the initialization of this - in the case of - a singleton; else, on each call to the - - method. - - - If an exception occured during object creation. - - - A distinct instance of the object created by this factory. - - - - - Performs cleanup on any cached singleton object. - - -

- Only makes sense in the context of a singleton object. -

-
- - -
- - - Is the object managed by this factory a singleton or a prototype? - - -

- Please note that changing the value of this property after - this factory object instance has been created by an enclosing - Spring.NET IoC container really is a programming error. This - property should really only be set once, prior to the invocation - of the - - callback method. -

-
- -
- - - Return the of object that this - creates, or - if not known in advance. - - - - - - The various autowiring modes. - - Rick Evans - - - - Do not autowire. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Implementation of that - resolves variable name against command line arguments. - - Aleksandar Seovic - - - - Defines contract that different variable sources have to implement. - - -

- The "variable sources" are objects containing name-value pairs - that allow a variable value to be retrieved for the given name.

-

- Out of the box, Spring.NET supports a number of variable sources, - that allow users to obtain variable values from .NET config files, - Java-style property files, environment, registry, etc.

-

- Users can always write their own variable sources implementations, - that will allow them to load variable values from the database or - other proprietary data source.

-
- - - - - - - Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Default constructor. - Initializes command line arguments from the environment. - - - - - Constructor that allows arguments to be passed externally. - Useful for testing. - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes command line arguments dictionary. - - - - - Gets or sets a prefix that should be used to - identify arguments to extract values from. - - - A prefix that should be used to identify arguments - to extract values from. Defaults to slash ("/"). - - - - - Gets or sets a character that should be used to - separate argument name from its value. - - - A character that should be used to separate argument - name from its value. Defaults to colon (":"). - - - - - Implementation of that - resolves variable name against name-value sections in - the standard .NET configuration file. - - Aleksandar Seovic - - - - Initializes a new instance of - - - - - Initializes a new instance of from the given - - - - - Initializes a new instance of from the given - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets a list of section names variables should be loaded from. - - - All sections specified need to be handled by the - in order to be processed successfully. - - - A list of section names variables should be loaded from. - - - - - Convinience property. Gets or sets a single section - to read properties from. - - - The section specified needs to be handled by the - in order to be processed successfully. - - - A section to read properties from. - - - - - Implementation of that - resolves variable name against provided variables. - - - Variable name resolution is case insensitive. - - Bruno Baia - - - - Initializes a new instance of . - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets variables. - - - - - Various utility methods for .NET style .config files. - - -

- Currently supports reading custom configuration sections and returning them as - objects. -

-
- Simon White - Mark Pollack -
- - - Initializes the type members - - - - - Reads the specified configuration section into a - . - - The resource to read. - The section name. - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - The populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Read from the specified configuration from the supplied XML - into a - . - - - - Does not support section grouping. The supplied XML - must already be loaded. - - - - The to read from. - - - The configuration section name to read. - - - A newly populated - . - - - If any errors are encountered while reading (this only applies to - v1.1 and greater of the .NET Framework). - - - If any errors are encountered while reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Returns the section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed result of evaluating the specified . - - if the result's type does not match the expected type - - - - Reads the specified configuration section from the given - - - - - - - - Reads the specified configuration section from the given - - - - - - - - - Determine the configuration section handler type - - - - - Populates the supplied with values from - a .NET application configuration file. - - - The - to add any key-value pairs to. - - - The configuration section name in the a .NET application configuration - file. - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - if the supplied - was found. - - - - - Creates a new instance of the ConfigurationReader class. - - -

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

-
-
- - - Implementation of that - resolves variable name connection strings defined in - the standard .NET configuration file. - - -

- When the <connectionStrings> configuration section is processed by this class, - two variables are defined for each connection string: one for connection string and - the second one for the provider name.

-

- Variable names are generated by appending '.connectionString' and '.providerName' - literals to the value of the name attribute of the connection string element. - For example:

-
-            
-               
-            
-            
-

- will result in two variables being created: myConn.connectionString and myConn.providerName. - You can reference these variables within your object definitions, just like any other variable.

-
- Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Holder for constructor argument values for an object. - - -

- Supports values for a specific index or parameter name (case - insensitive) in the constructor argument list, and generic matches by - . -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Can be used as an argument filler for the - - overload when one is not looking for an argument by index. - - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Add argument value for the given index in the constructor argument list. - - - The index in the constructor argument list. - - - The argument value. - - - - - Add argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - The argument value. - - The of the argument - . - - - - - Add argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - The argument value. - - If the supplied is - or is composed wholly of whitespace. - - - - - Get argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - - The required of the argument. - - - The - - for the argument, or if none set. - - - - - Get argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - - The - - for the argument, or if none set. - - - - - Does this set of constructor arguments contain a named argument matching the - supplied name? - - - - The comparison is performed in a case-insensitive fashion. - - - The named argument to look up. - - if this set of constructor arguments - contains a named argument matching the supplied - name. - - - - - Add generic argument value to be matched by type. - - - The argument value. - - - - - Add generic argument value to be matched by type. - - The argument value. - - The of the argument - . - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - The - - for the argument, or if none set. - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list, or to the named argument, or - generically matches by . - - - The index of the argument in the constructor argument list. May be - negative, to denote the fact that we are not looking for an - argument by index (see - . - - - The name of the argument in the constructor argument list. May be - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Return the map of indexed argument values. - - - An with - indices as keys and - s - as values. - - - - - Return the map of named argument values. - - - An with - named arguments as keys and - s - as values. - - - - - Return the set of generic argument values. - - - A of - s. - - - - - Return the number of arguments held in this instance. - - - - - Returns true if this holder does not contain any argument values, - neither indexed ones nor generic ones. - - - - - Holder for a constructor argument value, with an optional - attribute indicating the target - of the actual constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - The of the argument - . Can also be one of the common - aliases (int, bool, - float, etc). - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Gets and sets the value for the constructor argument. - - -

- Only necessary for manipulating a registered value, for example in - s. -

-
-
- - - Return the of the constructor - argument. - - - - - - implementation that allows for convenient registration of custom - s. - - - - The use of this class is typically not required; the .NET - mechanism of associating a - with a - via the use of the - is the - recommended (and standard) way. This class primarily exists to cover - those cases where third party classes to which one does not have the - source need to be exposed to the type conversion mechanism. - -

- Because the - - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever type conversion is required. If - one is using a - - object definition within the scope of an - , no such automatic - pickup of the - - is performed (custom converters will have to be added manually using the - - method). For most application scenarios, one will get better - mileage using the - abstraction. -

-
- -

- The following examples all assume XML based configuration, and use - inner object definitions to define the custom - objects (nominally to - avoid polluting the object name space, but also because the - configuration simply reads better that way). -

- - - - - - - - - - - - - - - - -

- The following example illustrates a complete (albeit naieve) use case - for this class, including a custom - implementation, said - converters domain class, and the XML configuration that hooks the - converter in place and makes it available to a Spring.NET container for - use during object resolution. -

-

- The domain class is a simple data-only object that contains the data - required to send an email message (such as the host and user account - name). A developer would prefer to use a string of the form - UserName=administrator,Password=r1l0k1l3y,Host=localhost to - configure the mail settings and just let the container take care of the - conversion. -

- - namespace ExampleNamespace - { - public sealed class MailSettings - { - private string _userName; - private string _password; - private string _host; - - public string Host - { - get { return _host; } - set { _host = value; } - } - - public string UserName - { - get { return _userName; } - set { _userName = value; } - } - - public string Password - { - get { return _password; } - set { _password = value; } - } - } - - public sealed class MailSettingsConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (typeof (string) == sourceType) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - string text = value as string; - if(text != null) - { - MailSettings mailSettings = new MailSettings(); - string[] tokens = text.Split(','); - for (int i = 0; i < tokens.Length; ++i) - { - string token = tokens[i]; - string[] settings = token.Split('='); - typeof(MailSettings).GetProperty(settings[0]) - .SetValue(mailSettings, settings[1], null); - } - return mailSettings; - } - return base.ConvertFrom(context, culture, value); - } - } - - // a very naieve class that uses the MailSettings class... - public sealed class ExceptionLogger - { - private MailSettings _mailSettings; - - public MailSettings MailSettings { - { - set { _mailSettings = value; } - } - - public void Log(object value) - { - Exception ex = value as Exception; - if(ex != null) - { - // use _mailSettings instance... - } - } - } - } - -

- The attendant XML configuration for the above classes would be... -

- - - - - - - - - - - - - - - - Juergen Hoeller - Simon White (.NET) - - - - - - - Registers any custom converters with the supplied - . - - - The object factory to register the converters with. - - - In case of errors. - - - - - Resolves the supplied into a - instance. - - - The object that is to be resolved into a - instance. - - - A resolved instance. - - - If the supplied is , - or the supplied cannot be resolved. - - - - - The custom converters to register. - - -

- The uses the type name - of the class that requires conversion as the key, and an - instance of the - that will effect - the conversion. Alternatively, the actual - of the class that requires conversion - can be used as the key. -

-
- -

- - IDictionary converters = new Hashtable(); - converters.Add( "System.Date", new MyCustomDateConverter() ); - // a System.Type instance can also be used as the key... - converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); - -

-
-
- - - implementation that - creates delegates. - - -

- Supports the creation of s for both - instance and methods. -

-
- Rick Evans -
- - - Callback method called once all factory properties have been set. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Creates the delegate. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - The of - created by this factory. - - -

- Returns the - if accessed prior to the method - being called. -

-
-
- - - The of the - created by this factory. - - - - - The name of the method that is to be invoked by the created - delegate. - - - - - The target if the - refers to a method. - - - - - The target object if the - refers to an instance method. - - - - - A generic implementation of an , that delegates post processing to a passed delegate - - - This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. - - - The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on - the context instance: - - IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); - ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => - { - of.RegisterSingleton("someObject", someObject); - })); - - - Erich Eichinger - - - - Get or Set the handler to delegate configuration to - - - - - Descriptor for a specific dependency that is about to be injected. - Wraps a constructor parameter, a method parameter or a field, - allowing unified access to their metadata. - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for a method or constructor parameter. - Considers the dependency as 'eager' - - The MethodParameter to wrap. - if set to true if the dependency is required. - - - - Initializes a new instance of the class for a method or a constructor parameter. - - The MethodParameter to wrap. - if set to true the dependency is required. - if set to true the dependency is 'eager' in the sense of - eagerly resolving potential target objects for type matching. - - - - Gets a value indicating whether this dependency is required. - - true if required; otherwise, false. - - - - Determine the declared (non-generic) type of the wrapped parameter/field. - - The type of the dependency (never null - - - - Gets a value indicating whether this is eager in the sense of - eagerly resolving potential target beans for type matching. - - true if eager; otherwise, false. - - - - Gets the wrapped MethodParameter, if any. - - The method parameter. - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
- - If the value is . - - - If the value is an . - - - If the value is an interface. - -
- - - The of objects created by this factory. - - - Always returns the . - - - - - A very simple, hashtable-based implementation of - - Erich Eichinger - - - - Creates a new, empty variable source - - - - - Creates a new, empty and case-insensitive variable source - - - - - Create a new variable source from a list of paired string values. - - - - The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: - - new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) - - - - the argument list containing pairs, or null - - - - Initializes a new instance of the DictionaryVariableSource class. - - - - - Creates a new variable source, reading values from another dictionary - and converting them to strings if necessary - - - - - Adds a key/value pair - - this dictionary. allows for fluent config - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Performs a variable name lookup - - - - - Specifies how instances of the - - class must apply environment variables when replacing values. - - Mark Pollack - - - - Never replace environment variables. - - - - - If properties are not specified via a resource, - then resolve using environment variables. - - - - - Apply environment variables first before applying properties from a - resource. - - - - - Implementation of that - resolves variable name against environment variables. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Holder for event handler values for an object. - - Rick Evans (.NET) - - - - The empty array of s. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Adds the supplied handler to the collection of event handlers. - - The handler to be added. - - - - The mapping of event names to an - of - s. - - - - - Gets the of events - that have handlers associated with them. - - - - - Gets the of - s for the supplied - event name. - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to a Spring that should be evaluated at runtime. - - Aleksandar Seovic - - - - Creates a new instance of the - - class. - - The expression to resolve. - - - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Gets or sets the expression string. Setting the expression string will cause - the expression to be parsed. - - The expression string. - - - - Return the expression. - - - - - Properties for this expression node. - - - - - implementation that - retrieves a static or non-static public field value. - - -

- Typically used for retrieving public constants. -

-
- -

- The following example retrieves the field value... -

- - - - - - -

- The previous example could also have been written using the convenience - - property, like so... -

- - - - - -

- This class also implements the - interface - (). - If the id (or name) of one's - - object definition is set to the - of the field to be retrieved, then the id (or - name) of one's object definition will be used for the name of the - field lookup. See below for an example of this - concise style of definition. -

- - - - - - - -

- The usage for retrieving instance fields is similar. No example is shown - because public instance fields are generally bad practice; but if - you have some legacy code that exposes public instance fields, or if you - just really like coding public instance fields, then you can use this - implementation to - retrieve such field values. -

- - Juergen Hoeller - Rick Evans (.NET) - - - - Interface to be implemented by objects that wish to be aware of their object - name in an . - - -

- Note that most objects will choose to receive references to collaborating - objects via respective properties. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. -

-
-
- - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - -

- This method allows the object instance to perform initialization only - possible when all object properties have been set and to throw an - exception in the event of misconfiguration. -

-
- - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The of the - field to be retrieved. - - - - - Set the name of the object in the object factory that created this object. - - - The name of the object in the factory. - - -

- In the context of the - - class, the - - value will be interepreted as the value of the - - property if no value has been explicitly assigned to the - - property. This allows for concise object definitions with just an id or name; - see the class documentation for - - for an example of this style of usage. -

-
-
- - - The name of the field the value of which is to be retrieved. - - -

- If the - - has been set (and is not ), then the value of this property - refers to an instance field name; it otherwise refers to a - field name. -

-
-
- - - The object instance on which the field is defined. - - - - - The on which the field is defined. - - - - - The of object that this - creates, or - if not known in advance. - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - Extension of the - interface to be implemented by object factories that are capable of - autowiring and expose this functionality for existing object instances. - - Juergen Hoeller - Rick Evans (.NET) - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - the resolved object, or null if none found - if dependency resolution failed - - - - Extension of the interface - that injects dependencies into the object managed by the factory. - - Bruno Baia - - - - Gets the template object definition that should be used - to configure the instance of the object managed by this factory. - - - - - SPI interface to be implemented by most if not all listable object factories. - - -

- Allows for framework-internal plug'n'play, e.g. in - . -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Configuration interface to be implemented by most if not all object - factories. - - -

- Provides the means to configure an object factory in addition to the - object factory client methods in the - interface. -

-

- Allows for framework-internal plug'n'play even when needing access to object - factory configuration methods. -

-

- When disposed, it will destroy all cached singletons in this factory. Call - when you want to shutdown - the factory. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Interface that defines a registry for shared object instances. - - - Can be implemented by - implementations in order to expose their singleton management facility - in a uniform manner. - - The interface extends this interface. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Registers the given existing object as singleton in the object registry, - under the given object name. - - - - The given instance is supposed to be fully initialized; the registry - will not perform any initialization callbacks (in particular, it won't - call IInitializingObject's AfterPropertiesSet method). - The given instance will not receive any destruction callbacks - (like IDisposable's Dispose method) either. - - - If running within a full IObjectFactory: Register an object definition - instead of an existing instance if your object is supposed to receive - initialization and/or destruction callbacks. - - - Typically invoked during registry configuration, but can also be used - for runtime registration of singletons. As a consequence, a registry - implementation should synchronize singleton access; it will have to do - this anyway if it supports a BeanFactory's lazy initialization of singletons. - - - Name of the object. - The singleton object. - - - - - - Return the (raw) singleton object registered under the given name. - - - - Only checks already instantiated singletons; does not return an Object - for singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to access manually registered singletons - . Can also be used to access a singleton - defined by an object definition that already been created, in a raw fashion. - - - Name of the object to look for. - the registered singleton object, or null if none found - - - - - Check if this registry contains a singleton instance with the given name. - - - - Only checks already instantiated singletons; does not return true - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check whether a - singleton defined by an object definition has already been created. - - - To check whether an object factory contains an object definition with a given name, - use ListableBeanFactory's ContainsObjectDefinition. Calling both - ContainsObjectDefinition and ContainsSingleton answers - whether a specific object factory contains an own object with the given name. - - - Use IObjectFactory's ContainsObject for general checks whether the - factory knows about an object with a given name (whether manually registered singleton - instance or created by bean definition), also checking ancestor factories. - - - Name of the object to look for. - - true if this bean factory contains a singleton instance with the given name; otherwise, false. - - - - - - - - Gets the names of singleton objects registered in this registry. - - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - The list of names as String array (never null). - - - - - - - Gets the number of singleton beans registered in this registry. - - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - The number of singleton objects. - - - - - - - Ignore the given dependency type for autowiring. - - -

- To be invoked during factory configuration. -

-

- This will typically be used for dependencies that are resolved - in other ways, like - through . -

-
- - The to be ignored. - -
- - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - -

- To be invoked during factory configuration. -

-
- - The - to register. - -
- - - Given an object name, create an alias. - - -

- This is typically used to support names that are illegal within - XML ids (which are used for object names). -

-

- Typically invoked during factory configuration, but can also be - used for runtime registration of aliases. Therefore, a factory - implementation should synchronize alias access. -

-
- The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - -
- - - Register the given custom - for all properties of the given . - - -

- To be invoked during factory configuration. -

-
- - The required of the property. - - - The to register. - -
- - - Set the parent of this object factory. - - -

- Note that the parent shouldn't be changed: it should only be set outside - a constructor if it isn't available when an object of this class is - created. -

-
-
- - - Returns the current number of registered - s. - - - The current number of registered - s. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - -

- Typically invoked at the end of factory setup, if desired. -

-

- As this is a startup method, it should destroy already created singletons if - it fails, to avoid dangling resources. In other words, after invocation - of that method, either all or no singletons at all should be - instantiated. -

-
- - If one of the singleton objects could not be created. - -
- - - Register a special dependency type with corresponding autowired value. - - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the BeanFactory interface itself. - - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - May be used to store custom value references in object definition properties. - - - Erich Eichinger - - - - - - the object factory holding the given object definition - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Subinterface of - that adds - a before-destruction callback. - - - The typical usage will be to invoke custom destruction callbacks on - specific object types, matching corresponding initialization callbacks. - - Juergen Hoeller - Simon White (.NET) - - - - Apply this - to the - given new object instance before its destruction. Can invoke custom - destruction callbacks. - - The new object instance. - The name of the object. - - In case of errors. - - - - - Denotes a special placeholder collection that may contain - s or - other placeholder objects that will need to be resolved. - - -

- 'A special placeholder collection' means that the elements of this - collection can be placeholders for objects that will be resolved later by - a Spring.NET IoC container, i.e. the elements themselves will be - resolved at runtime by the enclosing IoC container. -

-

- The core Spring.NET library already provides three implementations of this interface - straight out of the box; they are... -

- - - - . - - - - - . - - - - - . - - - -

- If you have a custom collection class (i.e. a class that either implements the - directly or derives from a class that does) - that you would like to expose as a special placeholder collection (i.e. one that can - have s as elements - that will be resolved at runtime by an appropriate Spring.NET IoC container, just - implement this interface. -

-
- -

- Lets say one has a Bag class (i.e. a collection that supports bag style semantics). -

- - using System; - - using Spring.Objects.Factory.Support; - - namespace MyNamespace - { - public sealed class Bag : ICollection - { - // ICollection implementation elided for clarity... - - public void Add(object o) - { - // implementation elided for clarity... - } - } - - public class ManagedBag : Bag, IManagedCollection - { - public ICollection Resolve( - string objectName, RootObjectDefinition definition, - string propertyName, ManagedCollectionElementResolver resolver) - { - Bag newBag = new Bag(); - string elementName = propertyName + "[bag-element]"; - foreach(object element in this) - { - object resolvedElement = resolver(objectName, definition, elementName, element); - newBag.Add(resolvedElement); - } - return newBag; - } - } - } - -
- Rick Evans -
- - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Resolves a single element value of a managed collection. - - -

- If the does not need to be resolved or - converted to an appropriate , the - will be returned as-is. -

-
- - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - That element of a managed collection that may need to be resolved - to a concrete value. - - A fully resolved element. -
- - - Describes an object instance, which has property values, constructor - argument values, and further information supplied by concrete implementations. - - -

- This is just a minimal interface: the main intention is to allow - - (like PropertyPlaceholderConfigurer) to access and modify property values. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - Return the event handlers for any events exposed by this object. - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The name of the parent definition of this object definition, if any. - - - - - The target scope for this object. - - - - - Get the role hint for this object definition - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition. - - Note that this does not have to be the actual type name used at runtime, - in case of a child definition overrding/inheriting the the type name from its - parent. It can be modifed during object factory post-processing, typically - replacing the original class name with a parsed variant of it. - Hence, do not consider this to be the definitive bean type at runtime - but rather only use it for parsing purposes at the individual object - definition level. - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - implementation that - creates instances of the class. - - -

- Typically used for retrieving shared - instances for common topics (such as the 'DAL', 'BLL', etc). The - - property determines the name of the - Common.Logging logger. -

-
- Rick Evans - -
- - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The name of the instance served up by - this factory. - - - If the supplied is - or contains only whitespace character(s). - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object - managed by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The name of the instance served up by - this factory. - - - The name of the instance served up by - this factory. - - - If the supplied to the setter is - or contains only whitespace character(s). - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Tag subclass used to hold a dictionary of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Interface representing an object whose value set can be merged with that of a parent object. - - Rob Harrop - Mark Pollack (.NET) - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. - - - - - Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. - - The approximate number of elements that the object can initially contain. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the keys of this managed dictionary. - - The unresolved name for the type of the keys of this managed dictionary. - - - - Gets or sets the unresolved name for the - of the values of this managed dictionary. - - The unresolved name for the type of the values of this managed dictionary. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a list of managed elements. - - Rod Johnson - Rick Evans (.NET) - - - - Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. - - - - - Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. - - The number of elements that the new list can initially store. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed list. - - The unresolved name for the type of the elements of this managed list. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag class which represent a Spring-managed instance that - supports merging of parent/child definitions. - - - - - Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - - - - Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - The initial number of entries that the can contain. is less than zero. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a set of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed set. - - The unresolved name for the type of the elements of this managed set. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - An that returns a value - that is the result of a or instance method invocation. - - -

- Note that this class generally is expected to be used for accessing factory methods, - and as such defaults to operating in singleton mode. The first request to - - by the owning object factory will cause a method invocation, the return - value of which will be cached for all subsequent requests. The - property may be set to - , to cause this factory to invoke the target method each - time it is asked for an object. -

-

- A target method may be specified by setting the - property to a string representing - the method name, with specifying - the that the method is defined on. - Alternatively, a target instance method may be specified, by setting the - property as the target object, and - the property as the name of the - method to call on that target object. Arguments for the method invocation may be - specified by setting the property. -

-

- Another (esoteric) use case for this factory object is when one needs to call a method - that doesn't return any value (for example, a class method to - force some sort of initialization to happen)... this use case is not supported by - factory-methods, since a return value is needed to become the object. -

-

- - This class depends on the - - method being called after all properties have been set, as per the - contract. If you are - using this class outside of a Spring.NET IoC container, you must call one of either - or - yourself to ready the object's internal - state, or you will get a nasty . - -

-
- -

- The following example uses an instance of this class to call a - factory method... -

- - - - - - - - 1st - 2nd - and 3rd arguments - - - - -

- The following example is similar to the preceding example; the only pertinent difference is the fact that - a number of different objects are passed as arguments, demonstrating that not only simple value types - are valid as elements of the argument list... -

- - - - - - - - - - - 1st - - - - - - - http://www.springframework.net/ - - - - - -

- Named parameters are also supported... this next example yields the same results as - the preceding example (that did not use named arguments). -

- - - - - - - - - - 1st - and 3rd arguments - 2nd - - - - -

- Similarly, the following example uses an instance of this class to call an instance method... -

- - - - - - - - - -

- The above example could also have been written using an anonymous inner object definition... if the - object on which the method is to be invoked is not going to be used outside of the factory object - definition, then this is the preferred idiom because it limits the scope of the object on which the - method is to be invoked to the surrounding factory object. -

- - - - - - - - - - Colin Sampaleanu - Juergen Hoeller - Rick Evans (.NET) - Simon White (.NET) - - - - - - Specialisation of the class that tries - to convert the given arguments for the actual target method via an - appropriate implementation. - - Juergen Hoeller - Rick Evans - - - - - Helper class allowing one to declaratively specify a method call for later invocation. - - -

- Typically not used directly but via its subclasses such as - . -

-

- Usage: specify either the and - or the - and - properties respectively, and - (optionally) any arguments to the method. Then call the - method to prepare the invoker. - Once prepared, the invoker can be invoked any number of times. -

-
- -

- The following example uses the class to invoke the - ToString() method on the Foo class using a mixture of both named and unnamed - arguments. -

- - public class Foo - { - public string ToString(string name, int age, string address) - { - return string.Format("{0}, {1} years old, {2}", name, age, address); - } - - public static void Main() - { - Foo foo = new Foo(); - MethodInvoker invoker = new MethodInvoker(); - invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; - invoker.AddNamedArgument("age", 29); - invoker.Prepare(); - // at this point, the arguments that will be passed to the method invocation - // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} - string details = (string) invoker.Invoke(); - Console.WriteLine (details); - // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' - } - } - -
- Colin Sampaleanu - Juergen Hoeller - Simon White (.NET) -
- - - The used to search for - the method to be invoked. - - - - - The value returned from the invocation of a method that returns void. - - - - - The method that will be invoked. - - - - - Creates a new instance of the class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set, or a matching argument could not be found - for a named argument (typically down to a typo). - - - If the specified method could not be found. - -
- - - Searches for and returns the method that is to be invoked. - - - The return value of this method call will subsequently be returned from the - . - - The method that is to be invoked. - - If no method could be found. - - - If more than one method was found. - - - - - Adds the named argument to this instances mapping of argument names to argument values. - - - The name of an argument on the method that is to be invoked. - - - The value of the named argument on the method that is to be invoked. - - - - - Returns the prepared object that - will be invoked. - - -

- A possible use case is to determine the return of the method. -

-
- - The prepared object that - will be invoked. - -
- - - Invoke the specified method. - - -

- The invoker needs to have been prepared beforehand (via a call to the - method). -

-
- - The object returned by the method invocation, or - if the method returns void. - - - If at least one of the arguments passed to this - was incompatible with the signature of the invoked method. - -
- - - The target on which to call the target method. - - -

- Only necessary when the target method is ; - else, a target object needs to be specified. -

-
-
- - - The target object on which to call the target method. - - -

- Only necessary when the target method is not ; - else, a target class is sufficient. -

-
-
- - - The name of the method to be invoked. - - -

- Refers to either a method - or a non- method, depending on - whether or not a target object has been set. -

-
- -
- - - Arguments for the method invocation. - - -

- Ordering is significant... the order of the arguments in this - property must match the ordering of the various parameters on the target - method. There does however exist a small possibility for confusion when - the arguments in this property are supplied in addition to one or more named - arguments. In this case, each named argument is slotted into the index position - corresponding to the named argument... once once all named arguments have been - resolved, the arguments in this property are slotted into any remaining (empty) - slots in the method parameter list (see the example in the overview of the - class if this is not clear). -

-

- If this property is not set, or the value passed to the setter invocation - is or a zero-length array, a method with no (un-named) arguments is assumed. -

-
- -
- - - The resolved arguments for the method invocation. - - - - This property is not set until the target method has been resolved via a call to the - method). It is a combination of the - named and plain vanilla arguments properties, and it is this object array that - will actually be passed to the invocation of the target method. - -

- Setting the value of this property to results in basically clearing out any - previously prepared arguments... another call to the - method will then be required to prepare the arguments again (or the prepared arguments - can be set explicitly if so desired). -

-
- - -
- - - Named arguments for the method invocation. - - -

- The keys of this dictionary are the () names of the - method arguments, and the () values are the actual - argument values themselves. -

-

- If this property is not set, or the value passed to the setter invocation - is a reference, a method with no named arguments is assumed. -

-
- -
- - - Creates a new instance of the - class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set. - - - If the specified method could not be found. - -
- - - Register the given custom - for all properties of the given . - - - The of property. - - - The to register. - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - -

- Returns the return value of the method that is to be invoked. -

-

- Will return the same value each time if the - - property value is . -

-
- - An instance (possibly shared or independent) of the object managed by - this factory. - - -
- - - Prepares this method invoker. - - - If all required properties are not set. - - - If the specified method could not be found. - - - - - - If a singleton should be created, or a new object on each request. - Defaults to . - - - - - Return the return value of the method - that this factory invokes, or if not - known in advance. - - -

- If the return value of the method that this factory is to invoke is - , then the - will be returned (in accordance with the - contract that - treats a value as a configuration error). -

-
- -
- - - Holder for an with - name and aliases. - - -

- Recognized by - - for inner object definitions. Registered by - , - which also uses it as general holder for a parsed object definition. -

-

- Can also be used for programmatic registration of inner object - definitions. If you don't care about the functionality offered by the - interface and the like, - registering - or is good enough. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - - The name of the object definition. - - - - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - The name of the object. - - Any aliases for the supplied - - - - - The held by this - instance. - - - - - The name of the object definition. - - - - - Any aliases for the object definition. - - -

- Guaranteed to never return ; if the associated - - does not have any aliases associated with it, then an empty - array will be returned. -

-
-
- - - Visitor class for traversing objects, in particular - the property values and constructor arguments contained in them resolving - object metadata values. - - - Used by and - to parse all string values contained in a ObjectDefinition, resolving any placeholders found. - - Mark Pollack - - - - Initializes a new instance of the class. - - The handler to be called for resolving variables contained in a string. - - - - Initializes a new instance of the class - for subclassing - - Subclasses should override the ResolveStringValue method - - - - Traverse the given ObjectDefinition object and the MutablePropertyValues - and ConstructorArgumentValues contained in them. - - The object definition to traverse. - - - - Visits the ObjectDefinition property ObjectTypeName, replacing string values using - the specified IVariableSource. - - The object definition. - - - - Visits the property values of the ObjectDefinition, replacing string values - using the specified IVariableSource. - - The object definition. - - - - Visits the indexed constructor argument values, replacing string values using the - specified IVariableSource. - - The indexed argument values. - - - - Visits the named constructor argument values, replacing string values using the - specified IVariableSource. - - The named argument values. - - - - Visits the generic constructor argument values, replacing string values using - the specified IVariableSource. - - The genreic argument values. - - - - Configures the constructor argument ValueHolder. - - The vconstructor alue holder. - - - - Resolves the given value taken from an object definition according to its type - - the value to resolve - the resolved value - - - - Visits the ManagedList property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet properties KeyTypeName and ValueTypeName and - calls for dictionary's value element. - - - - - Visits the elements of a NameValueCollection and calls - for value of each element. - - - - - calls the to resolve any variables contained in the raw string. - - the raw string value containing variable placeholders to be resolved - If no has been configured. - the resolved string, having variables being replaced, if any - - - - Returns a value that is an - that - returns an object from an - . - - -

- The primary motivation of this class is to avoid having a client object - directly calling the - - method to get a prototype object out of an - , which would be a - violation of the inversion of control principle. With the use of this - class, the client object can be fed an - as a property - that directly returns one target prototype object. -

-

- The object referred to by the value of the - - property does not have to be a prototype object, but there is little - to no point in using this class in conjunction with a singleton object. -

-
- -

- The following XML configuration snippet illustrates the use of this - class... -

- - - - - - - - - - - - - - - - Colin Sampaleanu - Simon White (.NET) - - - - Interface to be implemented by objects that wish to be aware of their owning - . - - -

- For example, objects can look up collaborating objects via the factory. -

-

- Note that most objects will choose to receive references to collaborating - objects via respective properties and / or an appropriate constructor. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - 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. - -
- - - Returns an instance of the object factory. - - The object factory. - - - - Invoked by an - after it has set all supplied object properties. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Sets the name of the target object. - - - - - 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 of object created by this factory. - - - - - Interface defining a factory which can return an object instance - (possibly shared or independent) when invoked. - - - This interface is typically used to encapsulate a generic factory - which returns a new instance (prototype) on each invocation. - It is similar to the , but - implementations of the aforementioned interface are normally meant to be defined - as instances by the user in an , - while implementations of this class are normally meant to be fed as a property to - other objects; as such, the - method - has different exception handling behavior. - - Colin Sampaleanu - Simon White (.NET) - - - - Return an instance (possibly shared or independent) - of the object managed by this factory. - - - An instance of the object (should never be ). - - - - - Creates a new instance of the GenericObjectFactory class. - - - The enclosing - . - - - - - Returns the object created by the enclosed object factory. - - The created object. - - - - An implementation - that exposes an arbitrary target object under a different name. - - -

- Usually, the target object will reside in a different object - definition file, using this - to link it in - and expose it under a different name. Effectively, this corresponds - to an alias for the target object. -

- - For XML based object definition files, a <alias> - tag is available that effectively achieves the same. - -
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Initialize a new default instance - - - - - Initialize this instance with the predefined and . - - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The name of the target object. - - -

- The target object may potentially be defined in a different object - definition file. -

-
- The name of the target object. -
- - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Callback that supplies the owning factory to an object instance. - - - The owning - (may not be ). The object can immediately - call methods on the factory. - - - In case of initialization errors. - - - - - - - Erich Eichinger - - - - Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. - - - - - Role hint indicating that a is a supporting - part of some larger configuration, typically an outer ComponentDefinition - SUPPORT objects are considered important enough to be aware - of when looking more closely at a particular ComponentDefinition, - but not when looking at the overall configuration of an application. - - - - - Role hint indicating that a is providing an - entirely background role and has no relevance to the end-user. This hint is - used when registering objects that are completely part of the internal workings - of a ComponentDefinition. - - - - - Implementation of that - resolves variable name against Java-style property file. - - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets the locations of the property files - to read properties from. - - - The locations of the property files - to read properties from. - - - - - Convinience property. Gets or sets a single location - to read properties from. - - - A location to read properties from. - - - - - Sets a value indicating whether to ignore resource locations that do not exist. This will call - the Exists property. - - - true if one should ignore missing resources; otherwise, false. - - - - - Overrides default values in one or more object definitions. - - -

- Instances of this class override already existing values, and is - thus best suited to replacing defaults. If you need to replace - placeholder values, consider using the - - class instead. -

-

- In contrast to the - - class, the original object definition can have default - values or no values at all for such object properties. If an overriding - configuration file does not have an entry for a certain object property, - the default object value is left as is. Also note that it is not - immediately obvious to discern which object definitions will be mutated by - one or more - s - simply by looking at the object configuration. -

-

- Each line in a referenced configuration file is expected to take the - following form... -

- - - -

- The name.property key refers to the object name and the - property that is to be overridden; and the value is the overridding - value that will be inserted into the appropriate object definition's - named property. -

-

- Please note that in the case of multiple - s - that define different values for the same object definition value, the - last overridden value will win (due to the fact that the values - supplied by previous - s - will be overridden). -

-
- -

- The following XML context definition defines an object that has a number - of properties, all of which have default values... -

- - - - - - - - -

- What follows is a .NET config file snippet for the above example (assuming - the need to override one of the default values)... -

- - - - - - -
- Juergen Hoeller - Simon White (.NET) - - - -
- - - Allows for the configuration of individual object property values from - a .NET .config file. - - -

- Useful for custom .NET .config files targetted at system administrators - that override object properties configured in the application context. -

-

- Two concrete implementations are provided in the Spring.NET core library: - - - - - for <add key="placeholderKey" value="..."/> style - overriding (pushing values from a .NET .config file into object - definitions). - - - - - - for replacing "${...}" placeholders (pulling values from a .NET .config - file into object definitions). - - - -

-

- Please refer to the API documentation for the concrete implementations - listed above for example usage. -

-
- Juergen Hoeller - Simon White (.NET) - - -
- - - The default configuration section name to use if none is explictly supplied. - - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Modify the application context's internal object factory after its - standard initialization. - - - The object factory used by the application context. - - - In case of errors. - - - - - - Loads properties from the configuration sections - specified in into . - - The instance to be filled with properties. - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Validates the supplied . - - -

- Basically, if external locations are specified, ensure that either - one or a like number of config sections are also specified. -

-
- - The to be validated. - -
- - - Simply initializes the supplied - collection with this instances default - (if any). - - - The collection to be so initialized. - - - - - The policy for resolving conflicting property overrides from - several resources. - - -

- When merging conflicting property overrides from several resources, - should append an override with the same key be appended to the - current value, or should the property override from the last resource - processed override previous values? -

-

- The default value is ; i.e. a property - override from the last resource to be processed overrides previous - values. -

-
- - if the property override from the last resource - processed overrides previous values. - -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - The default properties to be applied. - - -

- These are to be considered defaults, to be overridden by values - loaded from other resources. -

-
-
- - - The location of the .NET .config file that contains the property - overrides that are to be applied. - - - - - The locations of the .NET .config files containing the property - overrides that are to be applied. - - - - - The configuration sections to look for within the .config files. - - - - - - - Should a failure to find a .config file be ignored? - - -

- is only appropriate if the .config file is - completely optional. The default is . -

-
- - if a failure to find a .config file is to be - ignored. - -
- - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Process the given key as 'name.property' entry. - - - The object factory containing the object definitions that are to be - processed. - - The key. - The value. - - If an error occurs. - - - If the property was not well formed (i.e. not in the format "name.property"). - - - - - implementation that - evaluates a property path on a given target object. - - -

- The target object can be specified directly or via an object name (see - example below). -

-

- Please note that the - is an implementation, and as such has - to comply with the contract of the - interface; more specifically, this means that the end result of the property lookup path - evaluation cannot be ( - implementations are not permitted to return ). If the resut of a - property lookup path evaluates to , an exception will be thrown. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Juergen Hoeller - Rick Evans (.NET) - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The target object that the property path lookup is to be applied to. - - -

- This would most likely be an inner object, but can of course be - any object reference. -

-
- - The target object that the property path lookup is to be applied to. - - -
- - - The (object) name of the target object that the property path lookup - is to be applied to. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this name prior to resolution. The implication of this is that - one cannot use the - class in conjunction with object names that start or end with whitespace. -

-
- - The (object) name of the target object that the property path lookup - is to be applied to. - - -
- - - The property (lookup) path to be applied to the target object. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this path prior to resolution. Whitespace is not a valid - identifier for property names (in part or whole) in CLS-based languages, - so this is a not unreasonable action. Please also note that whitespace - that is embedded within the property path will be left as-is (which may - or may not result in an error being thrown, depending on the context of - the whitespace). -

-
- -

- Examples of such property lookup paths can be seen below; note that - property lookup paths can be nested to an arbitrary level. -

- - name.length - accountManager.account['the key'].name - accounts[0].name - -
- - The property (lookup) path to be applied to the target object. - -
- - - The 'expected' of the result from evaluating the - property path. - - -

- This is not necessary for directly specified target objects, or - singleton target objects, where the can - be determined via reflection. Just specify this in case of a - prototype target, provided that you need matching by type (for - example, for autowiring). -

-

- It is permissable to set the value of this property to - (which in any case is the default value). -

-
- - The 'expected' of the result from evaluating the - property path. - -
- - - 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? - - - - - - Set the name of the object in the object factory that created this object. - - -

- The object name of this - - will be interpreted as "objectName.property" pattern, if neither the - - - have been supplied (set). -

-

- This allows for concise object definitions with just an id or name. -

-
- - The name of the object in the factory. - -
- - - 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. - - - - - Resolves placeholder values in one or more object definitions. - - -

- The default placeholder syntax follows the NAnt style: ${...}. - Instances of this class can be configured in the same way as any other - object in a Spring.NET container, and so custom placeholder prefix - and suffix values can be set via the - and properties. -

- -

- The following example XML context definition defines an object that has - a number of placeholders. The placeholders can easily be distinguished - by the presence of the ${} characters. -

- - - - - - - - -

- The associated XML configuration file for the above example containing the - values for the placeholders would contain a snippet such as .. -

- - - - - - - - -

- The preceding XML snippet listing the various property keys and their - associated values needs to be inserted into the .NET config file of - your application (or Web.config file for your ASP.NET web application, - as the case may be), like so... -

- - - - - - - - -
-

- - checks simple property values, lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. -

- - - - - - - - -

- In contrast to the - - class, this configurer only permits the replacement of explicit - placeholders in object definitions. Therefore, the original definition - cannot specify any default values for its object properties, and the - placeholder configuration file is expected to contain an entry for each - defined placeholder. That is, if an object definition contains a - placeholder ${foo}, there should be an associated - <add key="foo" value="..."/> entry in the - referenced placeholder configuration file. Default property values - can be defined via the inherited - - collection to overcome any perceived limitation of this feature. -

-

- If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. If you want to resolve properties from multiple configuration - resources, simply specify multiple resources via the - - property. Finally, please note that you can also define multiple - - instances, each with their own custom placeholder syntax. -

-
- Juergen Hoeller - Simon White (.NET) - - - -
- - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Initializes the new instance - - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Parse values recursively to be able to resolve cross-references between - placeholder values. - - - The map of constructor arguments / property values. - - The string to be resolved. - The placeholders that have already been visited - during the current resolution attempt (used to detect circular references - between placeholders). Only non-null if we're parsing a nested placeholder. - - If an error occurs. - - The resolved string. - - - - Resolve the given placeholder using the given name value collection, - performing an environment variables check according to the given mode. - - -

- The default implementation delegates to - - before/afer the environment variable check. Subclasses can override - this for custom resolution strategies, including customized points - for the environment properties check. -

-
- The placeholder to resolve - - The merged name value collection of this configurer. - - The environment variable mode. - - The resolved value or if none. - - -
- - - Resolve the given placeholder using the given name value collection. - - -

- This (the default) implementation simply looks up the value of the - supplied key. -

-

- Subclasses can override this for customized placeholder-to-key - mappings or custom resolution strategies, possibly just using the - given name value collection as fallback. -

-
- The placeholder to resolve. - - The merged name value collection of this configurer. - - The resolved value. -
- - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Controls how environment variables will be used to - replace property placeholders. - - -

- See the overview of the - - enumeration for the available options. -

-
-
- - - implementation that - retrieves a or non-static public property value. - - -

- Typically used for retrieving public property values. -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - Template method that subclasses must override to construct the object - returned by this factory. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - The of the static property - to be retrieved. - - - - - Arguments for the property invocation. - - -

- If this property is not set, or the value passed to the setter invocation - is a null or zero-length array, a property with no arguments is assumed. -

-
-
- - - The name of the property the value of which is to be retrieved. - - -

- Refers to either a property or a non-static property, - depending on a target object being set. -

-
-
- - - The object instance on which the property is defined. - - - - - The on which the property is defined. - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - Implementation of that - resolves variable name against registry key. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, - strings are concatenated to a comma-separated list following - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets the registry key to obtain variable values from. - - - The registry key to obtain variable values from. - - - - - - implementation that allows for convenient registration of custom - IResource implementations. - - -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of IResources is required. -

-
- Mark Pollack - - -
- - - Registers custom IResource implementations. The supplied - is not used since IResourse implementations - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The IResource implementations, i.e. resource handlers, to register. - - -

- The has the - contains the resource protocol name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - The value can be the fully qualified name of the IResource - implementation, a string, or - an actual of the IResource class - -

-
-
- - - A convenience class to create a - given the resource base - name and assembly name. - - -

- This is currently the preferred way of injecting resources into view - tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). - A GUI component (typically a Windows Form) is injected with - an instance, and can - then proceed to use the various GetXxx() methods on the - to retrieve images, - strings, custom resources, etc. -

-
- Mark Pollack - - - -
- - - Creates a . - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The root name of the resources. - - -

- For example, the root name for the resource file named - "MyResource.en-US.resources" is "MyResource". -

- - The namespace is also prefixed before the resource file name. - -
-
- - - The string representation of the assembly that contains the resource. - - - - - The . - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to another object in this factory to be resolved at runtime. - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - -

- This does not mark this object as being a reference to - another object in any parent factory. -

-
- The name of the target object. -
- - - Creates a new instance of the - - class. - - -

- This variant constructor allows a client to specifiy whether or not - this object is a reference to another object in a parent factory. -

-
- The name of the target object. - - Whether this object is an explicit reference to an object in a - parent factory. - -
- - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Return the target object name. - - - - - Is this is an explicit reference to an object in the parent - factory? - - - if this is an explicit reference to an - object in the parent factory. - - - - - Simple factory object for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target set. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - Configure all ISharedStateAware objects, delegating concrete handling to the list of . - - - - - Creates a new empty instance. - - - - - Creates a new preconfigured instance. - - - priority value affecting order of invocation of this processor. See interface. - - - - Iterates over configured list of s until - the first provider is found that
- a) true == provider.CanProvideState( instance, name )
- b) null != provider.GetSharedState( instance, name )
-
-
- - - A NoOp for this processor - - - The new object instance. - - - The name of the object. - - - the original . - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Get/Set the (already ordererd!) list of instances. - - - If this list is not set, the containing object factory will automatically - be scanned for instances. - - - - - Implementation of that - resolves variable name against special folders (as defined by - enumeration). - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves specified special folder to its full path. - - - The name of the special folder to resolve. Should be one of the values - defined by the enumeration. - - - The folder path if able to resolve, null otherwise. - - - - - - implementation that allows for convenient registration of custom - type aliases. - - - Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of type aliases is required. -

-
- Mark Pollack - - -
- - - Registers any type aliases. The supplied - is not used since type aliases - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The type aliases to register. - - -

- The has the - contains the alias name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - the value can be the fully qualified name of the type as a string or - an actual of the class that - being aliased. -

-
-
- - - Holder for a typed value. - - -

- Can be added to object definitions to explicitly specify - a target type for a value, - for example for collection - elements. -

-

- This holder just stores the value and the target - . The actual conversion will be performed by - the surrounding object factory. -

-
- Juergen Hoeller - Rick Evans (.NET) - Bruno Baia (.NET) -
- - - Creates a new instance of the - - class. - - - - - Initializes a new instance of the class. - - The value. - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The to convert to. - - - If the supplied is - . - - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The unresolved type to convert to. - - - If the supplied is a - or an empty string. - - - - - Determine the type to convert to, resolving it from a specified type name if necessary. - - The resolved type to convert to. - - - - The value that is to be converted. - - -

- Obviously if the - - is the , no conversion - will actually be performed. -

-
-
- - - The to convert to. - - - If the setter is supplied with a value. - - - - - The unresolved type to convert to. - - - If the setter is supplied with a value or an empty string. - - - - - Gets a value indicating whether this instance has target type. - - - true if this instance has target type; otherwise, false. - - - - - Provides methods for type-safe accessing s. - - Erich Eichinger - - - - Initialize a new instance of an - - The underlying to read values from. - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - An of 's type that contains the value of the specified variable - or , if returns null. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - An of 's type that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns or . - - A that contains the value of the specified variable - or , if returns null. - - - - - Resolves placeholder values in one or more object definitions - - - The placeholder syntax follows the NAnt style: ${...}. - Placeholders values are resolved against a list of - s. In case of multiple definitions - for the same property placeholder name, the first one in the - list is used. - Variable substitution is performed on simple property values, - lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. - - - - - - - - - - If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. - - Mark Pollack - - - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Create a new instance without any variable sources - - - - - Create a new instance and initialize with the given variable source - - - - - - Create a new instance and initialize with the given list of variable sources - - - - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Apply the property replacement using the specified s for all - object in the supplied - . - - - The - used by the application context. - - - If an error occured. - - - - - Sets the list of s that will be used to resolve placeholder names. - - A list of s. - - - - Sets that will be used to resolve placeholder names. - - A instance. - - - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - Initializes a new instance of the Location class. - - - - - - - Initializes a new instance of the Location class. - - - - - - Thrown when an - encounters an internal error, and its definitions are invalid. - - -

- An example of a situation when this exception would be thrown is - in the case of an XML document containing object definitions being - malformed. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectDefinitionStoreException class. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The description of the resource associated with the object - - - - - The name of the object that trigger the exception. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Initializes a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Initializes a new instance of the class. - - The message. - The location. - - - - Initializes a new instance of the Problem class. - - - - - - - - Context that gets passed along an object definition reading process, - encapsulating all relevant configuraiton as well as state. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The resource. - - - - Gets the resource. - - The resource. - - - - Abstract superclass - that implements default object creation. - - -

- Provides object creation, initialization and wiring, supporting - autowiring and constructor resolution. Handles runtime object - references, managed collections, and object destruction. -

-

- The main template method to be implemented by subclasses is - , - used for autowiring by type. Note that this class does not implement object - definition registry capabilities - ( - does). -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Abstract superclass for - implementations. - - -

- This class provides singleton / prototype determination, singleton caching, - object definition aliasing, - handling, and object definition merging for child object definitions. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Marker object to be temporarily registered in the singleton cache, - while instantiating an object (in order to be able to detect circular references). - - - - - Used as value in hashtable that keeps track of singleton names currently in the - process of being created. Would not be necessary if we created a case insensitive implementation of - ISet. - - - - - The instance for this class. - - - - - Cache of singleton objects created by s: FactoryObject name -> product - - - - - Creates a new instance of the - class. - - -

- This constructor implicitly creates an - - that treats the names of objects in this factory in a case-sensitive fashion. -

-

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - -
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - - - Any parent object factory; may be . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - In case of errors. - -
- - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - In case of errors. - -
- - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Create instance only - suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself, - nor throw an exception. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Does this object factory contain an object definition with the - supplied ? - - -

- Does not consider any hierarchy this factory may participate in. - Invoked by - - when no cached singleton instance is found. -

-
- - The name of the object to look for. - - - if this object factory contains an object - definition with the supplied . - -
- - - Adds the supplied (object) to this factory's - singleton cache. - - -

- To be called for eager registration of singletons, e.g. to be able to - resolve circular references. -

- - If a singleton has already been registered under the same name as - the supplied , then the old singleton will - be replaced. - -
- The name of the object. - The singleton object. - - If the argument is - or consists wholly of whitespace characters; or if the - is . - -
- - - Return the object name, stripping out the factory dereference prefix if - necessary, and resolving aliases to canonical names. - - - The transformed name of the object. - - - - - Ensures, that the given name is prefixed with - if it incidentially already starts with this prefix. This avoids troubles when dereferencing - the object name during - - - - - Determines whether the specified name is defined as an alias as opposed - to the name of an actual object definition. - - The object name to check. - - true if the specified name is alias; otherwise, false. - - - - - Return a , - even by traversing parent if the parameter is a child definition. - - - The name of the object. - - - Are ancestors to be included in the merge? - - -

- Will ask the parent object factory if not found in this instance. -

-
- - A merged - with overridden properties. - -
- - - Return a , - even by traversing parent if the parameter is a child definition. - - - A merged - with overridden properties. - - - - - Creates the root object definition. - - The template definition to base root definition on. - Root object definition. - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Gets the type for the given FactoryObject. - - The factory object instance to check. - the FactoryObject's object type - - - - Gets the object type for the given FactoryObject definition, as far as possible. - Only called if there is no singleton instance registered for the target object already. - - - The default implementation creates the FactoryObject via GetObject - to call its ObjectType property. Subclasses are encouraged to optimize - this, typically by just instantiating the FactoryObject but not populating it yet, - trying whether its ObjectType property already returns a type. - If no type found, a full FactoryObject creation as performed by this implementation - should be used as fallback. - - Name of the object. - The merged object definition for the object. - The type for the object if determinable, or null otherwise - - - - Predict the eventual object type (of the processed object instance) for the - specified object. - - - Does not need to handle FactoryObjects specifically, since it is only - supposed to operate on the raw object type. - This implementation is simplistic in that it is not able to - handle factory methods and InstantiationAwareBeanPostProcessors. - It only predicts the object type correctly for a standard object. - To be overridden in subclasses, applying more sophisticated type detection. - - Name of the object. - The merged object definition to determine the type for. May be null - The type of the object, or null if not predictable - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - - The name that may include the factory dereference prefix. - - The object instance. - - The singleton instance of the object. - - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - The object instance. - - The name that may include the factory dereference prefix (=the requested name). - - - The canonical object name - - the merged object definition - - The singleton instance of the object. - - - - - Obtain an object to expose from the given IFactoryObject. - - The IFactoryObject instance. - Name of the object. - The merged object definition. - The object obtained from the IFactoryObject - If IFactoryObject object creation failed. - - - - Post-process the given object that has been obtained from the FactoryObject. - The resulting object will be exposed for object references. - - The default implementation simply returns the given object - as-is. Subclasses may override this, for example, to apply - post-processors. - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Convenience method to pull an - from this factory. - - - The name of the factory object to be retrieved. If this name is not a valid - name, it will be converted - into one. - - - The associated with the - supplied . - - - - - Is the supplied a factory object dereference? - - - - - Determines whether the type of the given object definition matches the - specified target type. - - Allows for lazy load of the actual object type, provided that the - type match can be determined otherwise. - The default implementation simply delegates to the standard - ResolveObjectType method. Subclasses may override this to use - a differnt strategy. - - Name of the object (for error handling purposes). - The merged object definition to determine the type for. - Type to match against (never null). - - true if object definition matches tye specified target type; otherwise, false. - - if we failed to load the type." - - - - Resolves the type of the object for the specified object definition resolving - an object type name to a Type (if necessary) and storing the resolved Type - in the object definition for further use. - - The merged object definition to dertermine the type for. - Name of the object (for error handling purposes). - - - - - Is the object (definition) with the supplied an - ? - - The name of the object to be checked. - - the object (definition) with the supplied - an ? - - - - - Remove the object identified by the supplied - from this factory's singleton cache. - - - The name of the object that is to be removed from the singleton - cache. - - - If the argument is or - consists wholly of whitespace characters. - - - - - Return the names of objects in the singleton cache that match the given - object type (including subclasses). - - - The class or interface to match, or for all object names. - - -

- Will not consider s - as the type of their created objects is not known before instantiation. -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of objects in the singleton cache that match the given - object type (including subclasses), or an empty array if none. - -
- - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determines the of the object with the - supplied . - - -

- More specifically, checks the of object that - would return. - For an , returns the - of object that the - creates. -

-

- Please note that (prototype) objects created via a factory method or - objects are handled - slightly differently, in that we don't want to needlessly create - instances of such objects just to determine the - of object that they create. -

-
- The name of the object to query. - - The of the object or - if not determinable. - -
- - - Determines the of the object defined - by the supplied object . - - -

- This, the default, implementation returns - to indicate that the type cannot be determined. Subclasses are - encouraged to try to determine the actual return - here, matching their strategy of resolving - factory methods in the - Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject - implementation. -

-
- - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - -
- - - Returns the names of the objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The names of the objects in the singleton cache. -
- - - Returns the number of objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The number of objects in the singleton cache. -
- - - Destroys the named singleton object. - - -

- Delegates to - - if a corresponding singleton instance is found. -

-
- - The name of the singleton object that is to be destroyed. - - -
- - - Check the supplied merged object definition for any possible - validation errors. - - - The object definition to be checked for validation errors. - - - The name of the object associated with the supplied object definition. - - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - - In the case of object validation errors. - - - - - Parent object factory, for object inheritance support - - - - - Dependency types to ignore on dependency check and autowire, as Set of - Type objects: for example, string. Default is none. - - - - - ObjectPostProcessors to apply in CreateObject - - - - - Indicates whether any IInstantiationAwareBeanPostProcessors have been registered - - - - - Indicates whether any IDestructionAwareBeanPostProcessors have been registered - - - - - Set of registered singletons, containing the bean names in registration order - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Is this object a singleton? - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Does this object factory or one of its parent factories contain an object with the given name? - - - This method scans the object factory hierarchy starting with the current factory instance upwards. - Use if you want to explicitely check just this object factory instance. - - . - - - - Return the aliases for the given object name, if defined. - - . - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Return an instance (possibly shared or independent) of the given object name. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name, - optionally injecting dependencies. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - whether to inject dependencies or not. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - - Checks, if the passed instance is of the required type. - - the name of the object - the actual instance - the type contract the given instance must adhere. - the object instance passed in via (for more fluent usage) - - if is null or not assignable to . - - - - - Creates a singleton instance for the specified object name and definition. - - - The object name (will be used as the key in the singleton cache key). - - The object definition. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The created object instance. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - - - - Destroy all cached singletons in this factory. - - - - - Ignore the given dependency type for autowiring - - . - - - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - - The - to register. - - . - - - - Given an object name, create an alias. - - . - - - - Register the given custom - for all properties of the given . - - . - - - - Register the given existing object as singleton in the object factory, - under the given object name. - - . - - - - Does this object factory contains a singleton instance with the - supplied ? - - - - - - Tries to find a cached object for the specified name. - - Teh object name to look for. - The cached object if found, otherwise. - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - Name of the object to check. - - true if is object name in use; otherwise, false. - - - - - Gets the singleton lock for a given object name. - - Name of the object. - lock object - - - - Returns, whether this factory treats object names case sensitive or not. - - - - - Gets the of - s - that will be applied to objects created by this factory. - - - - - Gets the set of classes that will be ignored for autowiring. - - -

- The elements of this are - s. -

-
-
- - - Returns, whether this object factory instance contains objects. - - - - - Returns, whether this object factory instance contains objects. - - - - - Gets the temporary object that is placed - into the singleton cache during object resolution. - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - The parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Returns the current number of registered - s. - - - The current number of registered - s. - - . - - - - Gets the names of singleton objects registered in this registry. - - The list of names as String array (never null). - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - - - - - - - Gets the number of singleton beans registered in this registry. - - The number of singleton objects. - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - - - - - - - Makes a distinction between sort order and object identity. - This is important when used with , since most - implementations assume Order == Identity - - - - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - The used during the invocation and - searching for of methods. - - - - - The instance for this class. - - - - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. -
- - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. - The parent object factory, or if none. -
- - - Predict the eventual object type (of the processed object instance) for the - specified object. - - Name of the object. - The merged object definition to determine the type for. May be null - - The type of the object, or null if not predictable - - - - - Determines the of the object defined - by the supplied object . - - - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - - - Apply any - s. - - -

- The returned instance may be a wrapper around the original. -

-
- - The of the object that is to be - instantiated. - - - The name of the object that is to be instantiated. - - - An instance to use in place of the original instance. - - - In case of errors. - -
- - - Apply the given property values, resolving any runtime references - to other objects in this object factory. - - - The object name passed for better exception information. - - - The definition of the named object. - - - The wrapping the target object. - - - The new property values. - - -

- Must use deep copy, so that we don't permanently modify this property. -

-
-
- - - Create the value resolver strategy to use for resolving raw property values - - - - - Return an array of object-type property names that are unsatisfied. - - -

- These are probably unsatisfied references to other objects in the - factory. Does not include simple properties like primitives or - s. -

-
- - An array of object-type property names that are unsatisfied. - - - The definition of the named object. - - - The wrapping the target object. - -
- - - Destroy all cached singletons in this factory. - - -

- To be called on shutdown of a factory. -

-
-
- - - Populate the object instance in the given - with the property values from the - object definition. - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Wires up any exposed events in the object instance in the given - with any event handler - values from the . - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Fills in any missing property values with references to - other objects in this factory if autowire is set to - . - - - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - - - - - Defines "autowire by type" (object properties by type) behavior. - - -

- This is like PicoContainer default, in which there must be exactly one object - of the property type in the object factory. This makes object factories simple - to configure for small namespaces, but doesn't work as well as standard Spring - behavior for bigger applications. -

-
- - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - -
- - - Ignore the given dependency type for autowiring - - - This will typically be used by application contexts to register - dependencies that are resolved in other ways, like IOjbectFactory through - IObjectFactoryAware or IApplicationContext through IApplicationContextAware. - By default, IObjectFactoryAware and IObjectName interfaces are ignored. - For further types to ignore, invoke this method for each type. - - . - - - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Add the created, but yet unpopulated singleton to the singleton cache - to be able to resolve circular references - - the name of the object to add to the cache. - the definition used to create and populated the object. - the raw object instance. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Remove the specified singleton from the singleton cache that has - been added before by a call to - - the name of the object to remove from the cache. - the definition used to create and populated the object. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Creates an instance from the passed in - using constructor - - The name of the object to create - used for error messages. - The describing the object to be created. - optional arguments to pass to the constructor - An wrapping the already instantiated object - - - - Instantiates the given object using its default constructor - - Name of the object. - The definition. - IObjectWrapper for the new instance - - - - Determines candidate constructors to use for the given object, checking all registered - - - Raw type of the object. - Name of the object. - the candidate constructors, or null if none specified - In case of errors - - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - "autowire constructor" (with constructor arguments by type) behaviour. - - The name of the object to autowire by type. - The object definition to update through autowiring. - The chosen candidate constructors. - The argument values passed in programmatically via the GetObject method, - or null if none (-> use constructor argument values from object definition) - - An for the new instance. - - - - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: in this mode, a Spring.NET - object factory is able to host components that expect constructor-based - dependency resolution. - - - - - - Perform a dependency check that all properties exposed have been set, if desired. - - -

- Dependency checks can be objects (collaborating objects), simple (primitives - and ), or all (both). -

-
- - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - The property values to be checked. - - - If all of the checked dependencies were not satisfied. - -
- - - Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding - ignored dependency types. - - The object wrapper the object was created with. - The filtered PropertyInfos - - - - Determine whether the given bean property is excluded from dependency checks. - This implementation excludes properties whose type matches an ignored dependency type - or which are defined by an ignored dependency interface. - - - - the of the object property - whether the object property is excluded - - - - Give an object a chance to react now all its properties are set, - and a chance to know about its owning object factory (this object). - - -

- This means checking whether the object implements - and / or - , and invoking the - necessary callback(s) if it does. -

-

- Custom init methods are resolved in a case-insensitive manner. -

-
- - The new object instance we may need to initialise. - - - The name the object has in the factory. Used for logging output. - - - The definition of the target object instance. - -
- - - Invoke the specified custom destroy method on the given object. - - -

- This implementation invokes a no-arg method if found, else checking - for a method with a single boolean argument (passing in "true", - assuming a "force" parameter), else logging an error. -

-

- Can be overridden in subclasses for custom resolution of destroy - methods with arguments. -

-

- Custom destroy methods are resolved in a case-insensitive manner. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself. - Should not throw any exceptions. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Destroys all of the objects registered as dependant on the - object (definition) identified by the supplied . - - - The name of the root object (definition) that is itself being destroyed. - - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - Find object instances that match the required . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The of the objects to look up. - - - An of object names and object - instances that match the required , or - if none are found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - Called by DestroyObject, to be able to destroy depending objects first. - - - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Configures object instance by injecting dependencies, satisfying Spring lifecycle - interfaces and applying object post-processors. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - A wrapped object instance that is to be so configured. - - - - - - Applies the PostProcessAfterInitialization callback of all - registered IObjectPostProcessors, giving them a chance to post-process - the object obtained from IFactoryObjects (for example, to auto-proxy them) - - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - If the supplied is not one of the - or - - values. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Cache of filtered PropertyInfos: object Type -> PropertyInfo array - - - - - Dependency interfaces to ignore on dependency check and autowire, as Set of - Class objects. By default, only the IObjectFactoryAware and IObjectNameAware - interfaces are ignored. - - - - - The - implementation to be used to instantiate managed objects. - - - - - An - implementation that provides some convenience support for - derived classes. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Permits the (re)implementation of an arbitrary method on a Spring.NET - IoC container managed object. - - -

- Encapsulates the notion of the Method-Injection form of Dependency - Injection. -

-

- Methods that are dependency injected with implementations of this - interface may be (but need not be) , in which - case the container will create a concrete subclass of the - class prior to instantiation. -

-

- Do not use this mechanism as a means of AOP. See the reference - manual for examples of appropriate usages of this interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Reimplement the supplied . - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the (re)implementation of the method call. - - - - - Creates a new instance of the - - class. - - -

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

-
- - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - -
- - - Is ; derived classes must supply an implementation. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - The result of the object lookup. - - - - Helper method for subclasses to retrieve the appropriate - for the - supplied . - - - The to use to retrieve - the appropriate - . - - - The appropriate - . - - - - - Helper method for subclasses to lookup an object from an enclosing - IoC container. - - - The name of the object that is to be looked up. - - - The named object. - - - - - Common base class for object definitions, factoring out common - functionality from - and - . - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Describes a configurable object instance, which has property values, - constructor argument values, and further information supplied by concrete - implementations. - - Rick Evans - - - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - The method overrides (if any) for this object. - - - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - - - - - Return the event handlers for any events exposed by this object. - - - - - Get or set the role hint for this object definition - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition (if any). - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The dependency check code. - - - - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The object definition used to initialise the member fields of this - instance. - - -

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

-
-
- - - Resolves the type of the object, resolving it from a specified - object type name if necessary. - - - A resolved instance. - - - If the type cannot be resolved. - - - - - Validate this object definition. - - - In the case of a validation failure. - - - - - Validates all - - - - - Validate the supplied . - - - The - to be validated. - - - - - Override settings in this object definition from the supplied - object definition. - - - The object definition used to override the member fields of this instance. - - - - - Returns a that represents the current - . - - - A that represents the current - . - - - - - The name of the parent definition of this object definition, if any. - - - - - The property values that are to be applied to the object - upon creation. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The property values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - Does this definition have any - ? - - - if this definition has at least one - . - - - - - The constructor argument values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The constructor argument values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The event handler values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The event handler values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The method overrides (if any) for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The name of the target scope for the object. - Defaults to "singleton", ootb alternative is "prototype". Extended object factories - might support further scopes. - - - - - Get or set the role hint for this object definition - - - - - Is this definition a singleton, with - a single, shared instance returned on all calls to an enclosing - container (typically an - or - ). - - -

- If , an object factory will apply the - prototype design pattern, with each caller requesting an - instance getting an independent instance. How this is defined - will depend on the object factory implementation. singletons - are the commoner type. -

-
- -
- - - Gets a value indicating whether this instance is prototype, with an independent instance - returned for each call. - - - true if this instance is prototype; otherwise, false. - - - - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup - by object factories that perform eager initialization of - singletons. -

-
-
- - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be - instantiated itself but rather just serving as a parent for concrete - child object definitions. - - - if this object definition is "abstract". - - - - - The of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - - Is the of the object definition a resolved - ? - - - - - Returns the of the - of the object definition (if any). - - - - - A description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. The default is - , - which means that no autowiring will be performed. -

-
-
- - - Gets the resolved autowire mode. - - -

- This resolves - - to one of - - or - . -

-
-
- - - The dependency checking mode. - - -

- The default is - . -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before this object definition. -

- - Dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - The name of the initializer method. - - -

- The default value is the constant, - in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default value is the constant, - in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The - method will be invoked on the specified - . -

-
-
- - - The name of the factory object to use (if any). - - - - - Does this object definition have any constructor argument values? - - - if his object definition has at least one - element in it's - - property. - - - - - Abstract base class for object definition readers. - - -

- Provides common properties like the object registry to work on. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Simple interface for object definition readers. - - Juergen Hoeller - Rick Evans - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The against which any class names - will be resolved into instances. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - Gets the resource loader to use for resource locations. - - There is also a method - available for loading object definitions from a resource location. This is - a convenience to avoid explicit ResourceLoader handling. - The resource loader. - - - - The instance for this class (and derived classes). - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - The against which any class names - will be resolved into instances. - - -

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

-
-
- - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - - The against which any class names - will be resolved into instances. - - - - - Gets or sets the resource loader to use for resource locations. - - The resource loader. - - - - Utility class that contains various methods useful for the implementation of - autowire-capable object factories. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the AutowireUtils class. - - -

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

-
-
- - - Gets those s - that are applicable for autowiring the supplied . - - - The - (definition) that is being autowired by constructor. - - - The absolute minimum number of arguments that any returned constructor - must have. If this parameter is equal to zero (0), then all constructors - are valid (regardless of their argument count), including any default - constructor. - - - Those s - that are applicable for autowiring the supplied . - - - - - Determine a weight that represents the class hierarchy difference between types and - arguments. - - -

- A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase - the result - all direct matches means weight zero (0). A match between the argument type - and a MyInteger instance argument would increase the weight by - 1, due to the superclass () being one (1) steps up in the - class hierarchy being the last one that still matches the required type. -

-

- Therefore, with an argument of type , a - constructor taking a argument would be - preferred to a constructor taking an argument - which would be preferred to a constructor taking an - argument which would in turn be preferred - to a constructor taking an argument. -

-

- All argument weights get accumulated. -

-
- - The argument s to match. - - The arguments to match. - The accumulated weight for all arguments. -
- - - Algorithm that judges the match between the declared parameter types of a candidate method - and a specific list of arguments that this method is supposed to be invoked with. - - - Determines a weight that represents the class hierarchy difference between types and - arguments. The following a an example based on the Java class hierarchy for Integer. - A direct match, i.e. type Integer -> arg of class Integer, does not increase - the result - all direct matches means weight 0. A match between type Object and arg of - class Integer would increase the weight by 2, due to the superclass 2 steps up in the - hierarchy (i.e. Object) being the last one that still matches the required type Object. - Type Number and class Integer would increase the weight by 1 accordingly, due to the - superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. - Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a - constructor (Number) which would in turn be preferred to a constructor (Object). - All argument weights get accumulated. - - The param types. - The args. - - - - - Determines whether the given object property is excluded from dependency checks. - - The PropertyInfo of the object property. - - true if is excluded from dependency check; otherwise, false. - - - - - Sorts the supplied , preferring - public constructors and "greedy" ones (that have lots of arguments). - - -

- The result will contain public constructors first, with a decreasing number - of arguments, then non-public constructors, again with a decreasing number - of arguments. -

-
- - The array to be sorted. - -
- - - Determines whether the setter property is defined in any of the given interfaces. - - The PropertyInfo of the object property - The ISet of interfaces. - - true if setter property is defined in interface; otherwise, false. - - - - - Creates the autowire candidate resolver. - - A SimpleAutowireCandidateResolver - - - - Returns the list of that are not satisfied by . - - the filtered list. Is never null - - - - Object definition for definitions that inherit settings from their - parent (object definition). - - -

- Will use the - of the parent object definition if none is specified, but can also - override it. In the latter case, the child's - - must be compatible with the parent, i.e. accept the parent's property values - and constructor argument values (if any). -

-

- A will - inherit all of the , - , and - from it's parent - object definition, with the option to add new values. If the - , - , - and / or - - properties are specified, they will override the corresponding parent settings. -

-

- The remaining settings will always be taken from the child definition: - , - , - , - , - and - -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - - class. - - - The name of the parent object. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The class of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The of the object to - instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Validate this object definition. - - -

- A common cause of validation failures is a missing value for the - - property; by - their very nature require that the - - be set. -

-
- - In the case of a validation failure. - -
- - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Helper class for resolving constructors and factory methods. - Performs constructor resolution through argument matching. - - - Operates on a and an . - Used by . - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for the given factory - and instantiation strategy. - - The object factory to work with. - The object factory as IAutowireCapableObjectFactory. - The instantiation strategy for creating objects. - the resolver to resolve property value placeholders if any - - - - "autowire constructor" (with constructor arguments by type) behavior. - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: In this mode, a Spring - object factory is able to host components that expect constructor-based - dependency resolution. - - Name of the object. - The merged object definition for the object. - The chosen chosen candidate constructors (or null if none). - The explicit argument values passed in programmatically via the getBean method, - or null if none (-> use constructor argument values from object definition) - An IObjectWrapper for the new instance - - - - Gets the constructor instantiation info given the object definition. - - Name of the object. - The RootObjectDefinition - The explicitly chosen ctors. - The explicit chose ctor args. - A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or - one based on type matching. - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - Create an array of arguments to invoke a constructor or static factory method, - given the resolved constructor arguments values. - - When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain - information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using - exceptions for flow control as in the original implementation. - - - - Resolves the - of the supplied . - - The name of the object that is being resolved by this factory. - The rod. - The wrapper. - The cargs. - Where the resolved constructor arguments will be placed. - - The minimum number of arguments that any constructor for the supplied - must have. - - -

- 'Resolve' can be taken to mean that all of the s - constructor arguments is resolved into a concrete object that can be plugged - into one of the s constructors. Runtime object - references to other objects in this (or a parent) factory are resolved, - type conversion is performed, etc. -

-

- These resolved values are plugged into the supplied - object, because we wouldn't want to touch - the s constructor arguments in case it (or any of - its constructor arguments) is a prototype object definition. -

-

- This method is also used for handling invocations of static factory methods. -

-
-
- - - Returns an array of all of those - methods exposed on the - that match the supplied criteria. - - - Methods that have this name (can be in the form of a regular expression). - - - Methods that have exactly this many arguments. - - - Methods that are static / instance. - - - The on which the methods (if any) are to be found. - - - An array of all of those - methods exposed on the - that match the supplied criteria. - - - - - Concrete implementation of the - and - - interfaces. - - -

- This class is a full-fledged object factory based on object definitions - that is usable straight out of the box. -

-

- Can be used as an object factory in and of itself, or as a superclass - for custom object factory implementations. Note that readers for - specific object definition formats are typically implemented separately - rather than as object factory subclasses. -

-

- For an alternative implementation of the - interface, - have a look at the - - class, which manages existing object instances rather than creating new - ones based on object definitions. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - - - - Creates a new instance of the - class. - - The parent object factory. - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory. - - - - Find object instances that match the . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The type of the objects to look up. - - - An of object names and object - instances that match the , or - if none is found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - - -

- Called by the - - so that dependant objects are able to be disposed of first. -

-
- - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - -
- - - Check whether the specified object matches the supplied . - - The name of the object to check. - - The to check for. - - - if the object matches the supplied , - or if the supplied is . - - - - - The instance for this class. - - - - - Whether to allow re-registration of a different definition with the - same name. - - - - - The mapping of object definition objects, keyed by object name. - - - - - List of object definition names, in registration order. - - - - - Resolver to use for checking if an object definition is an autowire candidate - - - - - IDictionary from dependency type to corresponding autowired value - - - - - Check if this registry contains a object definition with the given - name. - - - The name of the object to look for. - - - if this object factory contains an object - definition with the given name. - - - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - - If one of the singleton objects could not be created. - - - - - - Register a special dependency type with corresponding autowired value. - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the IObjectFactory interface itself. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Check whether the specified bean would need to be eagerly initialized - in order to determine its type. - - a factory-bean reference that the bean definition defines a factory method for - whether eager initialization is necessary - - - - Check whether the given bean is defined as a . - - the name of the object - the corresponding object definition - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Raises the no such object definition exception for an unresolvable dependency - - The type. - The dependency description. - The descriptor. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - Determine whether the specified object definition qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - - Name of the object definition to check. - The merged object definiton to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - - - - Should object definitions registered under the same name as an - existing object definition be allowed? - - -

- If , then the new object definition will - replace (override) the existing object definition. If - , an exception will be thrown when - an attempt is made to register an object definition under the same - name as an already existing object definition. -

-

- The default is . -

-
- - is the registration of an object definition - under the same name as an existing object definition is allowed. - -
- - - Get or set custom autowire candidate resolver for this IObjectFactory to use - when deciding whether a bean definition should be considered as a - candidate for autowiring. Never null - - - - - Return the number of objects defined in this registry. - - - The number of objects defined in this registry. - - - - - - Default implementation of the - - interface. - - -

- Does not support per - loading. -

-
- Aleksandar Seovic -
- - - Central interface for factories that can create - - instances. - - -

- Allows for replaceable object definition factories using the Strategy - pattern. -

-
- Aleksandar Seovic -
- - - Factory style method for getting concrete - - instances. - - - The FullName of the of the defined object. - - The name of the parent object definition (if any). - - The against which any class names - will be resolved into instances. It can be null to register the - object class just by name. - - - An - - instance. - - - - - Factory style method for getting concrete - - instances. - - /// If no parent is specified, a RootObjectDefinition is created, otherwise a - ChildObjectDefinition. - The of the defined object. - The name of the parent object definition (if any). - The against which any class names - will be resolved into instances. - - An - - instance. - - - - - Default implementation of the interface, deleagting to - 's GenerateObjectName. - - Note that this implementation is only able to handle - subclasses such as - and - - Juergen Hoeller - Mark Pollack (.NET) - - - - Strategy interface for generating object names for object definitions - - Juergen Hoeller - Mark Pollack (.NET) - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - An - implementation that delegates to an - that is - obtained as the result of a lookup in an associated IoC container. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by delegating to - another - looked up in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the delegated call to the looked up - . - - - - - The various modes of dependency checking. - - Rick Evans (.NET) - - - - DO not do any dependency checking. - - - - - Check object references. - - - - - Just check primitive (string, int, etc) values. - - - - - Check everything. - - - - - GenericObjectDefinition is a one-stop shop for standard object definition purposes. - Like any object definition, it allows for specifying a class plus optionally - constructor argument values and property values. Additionally, deriving from a - parent bean definition can be flexibly configured through the "parentName" property. - - In general, use this class for the purpose of - registering user-visible object definitions (which a post-processor might operate on, - potentially even reconfiguring the parent name). - Use / - where parent/child relationships happen to be pre-determined. - - - - Juergen Hoeller - Erich Eichinger - - - - Creates a new to be configured through its - object properties and configuration methods. - - - - - Creates a new as deep copy of the given - object definition. - - the original object definition to copy from - - - - Returns a representation of this - for debugging purposes. - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Strategy interface for determining whether a specific object definition - qualifies as an autowire candidate for a specific dependency. - - Mark Fisher - Juergen hoeller - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Responsible for creating instances corresponding to a - . - - Rod Johnson - Rick Evans (.NET) - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Represents an override of a method that looks up an object in the same IoC context. - - -

- Methods eligible for lookup override must not have arguments. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Represents the override of a method on a managed object by the IoC container. - - -

- Note that the override mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - -

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

-
- - The name of the method that is to be overridden. - - - If the supplied is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - -

- By 'match' one means does this particular - - instance apply to the supplied ? -

-

- This allows for argument list checking as well as method name checking. -

-
- The method to be checked. - - if this override matches the supplied - . - -
- - - The name of the method that is to be overridden. - - - - - Is the method that is ot be injected - () - to be considered as overloaded? - - -

- If (the default), then argument type matching - will be performed (because one would not want to override the wrong - method). -

-

- Setting the value of this property to can be used - to optimize runtime performance (ever so slightly). -

-
-
- - - Creates a new instance of the - class. - - -

- Methods eligible for lookup override must not have arguments. -

-
- - The name of the method that is to be overridden. - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - If either of the supplied arguments is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - - - An - implementation that simply returns the result of a lookup in an - associated IoC container. - - -

- This class is Spring.NET's implementation of Dependency Lookup via - Method Injection. -

-

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by returning the - result of an object lookup in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the object lookup. - - - - - An - implementation that supports method injection. - - -

- Classes that want to take advantage of method injection must meet some - stringent criteria. Every method that is to be method injected - must be defined as either or - . An - will be thrown if these criteria are not met. -

-
- Rick Evans -
- - - Simple object instantiation strategy for use in - implementations. - - -

- Does not support method injection, although it provides hooks for subclasses - to override to add method injection support, for example by overriding methods. -

-
- Rod Johnson - Rick Evans (.NET) - -
- - - The shared instance for this class (and derived classes). - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type does not have a zero-arg constructor. - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use a no-arg constructor. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be a - or zero length string if we're autowiring an object that - doesn't belong to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - -
- - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use the supplied - and attendant . -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - -
- - - The name of the dynamic assembly that holds dynamically created code - - - - - A cache of generated instances, keyed on - the object name for which the was generated. - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- This method dynamically generates a subclass that supports method - injection for the supplied . It then - instantiates an new instance of said type using the constructor - identified by the supplied , - passing the supplied to said - constructor. It then manually injects (generic) method replacement - and method lookup instances (of - ) into - the new instance: those methods that are 'method-injected' will - then delegate to the approriate - - instance to effect the actual method injection. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The parameter s to use to find the - appropriate constructor to invoke. - - - The aguments that are to be passed to the appropriate constructor - when the object is being instantiated. - - - A new instance of the defined by the - supplied . - -
- - - A factory that generates subclasses of those - classes that have been configured for the Method-Injection form of - Dependency Injection. - - -

- This class is designed as for one-shot usage; i.e. it must - be used to generate exactly one method injected subclass and - then discarded (it maintains state in instance fields). -

-
-
- - - The name of the generated - property (for method replacement). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - The name of the generated - property (for method lookup). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - Creates a new instance of the - class. - - - The in which - the generated is to be defined. - - - The object definition that is the target of the method injection. - - - If either of the supplied arguments is . - - - - - Builds a suitable for Method-Injection. - - - A suitable for Method-Injection. - - - - - Defines overrides for those methods that are configured with an appropriate - . - - - The overarching that is defining - the generated . - - - - - Override the supplied with the logic - encapsulated by the - - defined by the supplied . - - - The builder for the subclass that is being generated. - - - The method on the superclass that is to be overridden. - - - The field defining the - - that the overridden method will delegate to to do the 'actual' - method injection logic. - - - - - Generates the MSIL for actually returning a return value if the - supplied is not - . - - - The definition of the return value; if , it - means that no return value is to required (a void - return type). - - - The to emit - the MSIL to. - - - - - Generates the MSIL for a return value if the supplied - returns a value. - - - The method to be checked. - - - The to emit - the MSIL to. - - - The return value, or if the method does not - return a value (has a void return type). - - - - - Pushes (sets up) the arguments for a call to the - - method of an appropriate - . - - - The parameters to the original method (will be bundled - up into a generic object[] and passed as the third - argument to the - - invocation. - - - The to emit - the MSIL to. - - - - - Simply generates the IL for a write only property for the - . - - - The in which the property is defined. - - - The name of the (to be) generated property. - - - The (instance) field that the property is to 'set'. - - - - - A collection (with set semantics) of method overrides, determining which, if any, - methods on a managed object the Spring.NET IoC container will override at runtime. - - Rod Johnson - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- Deep copy constructoe. -

-
- - The instance supplying initial overrides for this new instance. - -
- - - Copy all given method overrides into this object. - - - The overrides to be copied into this object. - - - - - Adds the supplied to the overrides contained - within this instance. - - - The to be - added. - - - - - Adds the supplied to the overloaded method names - contained within this instance. - - - The overloaded method name to be added. - - - - - Returns true if the supplied is present within - the overloaded method names contained within this instance. - - - The overloaded method name to be checked. - - - True if the supplied is present within - the overloaded method names contained within this instance. - - - - - Return the override for the given method, if any. - - - The method to check for overrides for. - - - the override for the given method, if any. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - The collection of method overrides. - - - - - Returns true if this instance contains no overrides. - - - - - Programmatic means of constructing a using the builder pattern. Intended primarily - for use when implementing custom namespace parsers. - - Set methods are used instead of properties, so that chaining of methods can be used to create - 'one-liner'definitions that set multiple properties at one. - Rod Johnson - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class, private - to force use of factory methods. - - - - - Creates a new used to construct a . - - - - - Creates a new used to construct a . - - the of the object that the definition is being created for - - - - Creates a new used to construct a . - - the name of the of the object that the definition is being created for - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - The type name of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Name of the object type. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a child object definition.. - - The object definition factory. - Name of the parent object. - - - - - Adds the property value under the given name. - - The name. - The value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the specified object name under the property specified. - - The name. - Name of the object. - The current ObjectDefinitionBuilder. - - - - Adds an index constructor arg value. The current index is tracked internally and all addtions are - at the present point - - The constructor arg value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the named object as a constructor argument. - - Name of the object. - - - - - Sets the name of the factory method to use for this definition. - - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the factory object to use for this definition. - - The factory object. - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets whether or not this definition describes a singleton object. - - if set to true [singleton]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects or not this definition is abstract. - - if set to true [flag]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects for this definition should be lazily initialized or not. - - if set to true [lazy]. - The current ObjectDefinitionBuilder. - - - - Sets the autowire mode for this definition. - - The autowire mode. - The current ObjectDefinitionBuilder. - - - - Sets the dependency check mode for this definition. - - The dependency check. - The current ObjectDefinitionBuilder. - - - - Sets the name of the destroy method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the init method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the resource description for this definition. - - The resource description. - The current ObjectDefinitionBuilder. - - - - Adds the specified object name to the list of objects that this definition depends on. - - Name of the object. - The current ObjectDefinitionBuilder. - - - - Gets the current object definition in its raw (unvalidated) form. - - The raw object definition. - - - - Validate and gets the object definition. - - The object definition. - - - - Utility methods that are useful for - - implementations. - - Juergen Hoeller - Rick Evans (.NET) - - - - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Registers the supplied with the - supplied . - - -

- This is a convenience method that registers the - - of the supplied under the - - property value of said . If the - supplied has any - , - then those aliases will also be registered with the supplied - . -

-
- - The object definition holder containing the - that - is to be registered. - - - The registry that the supplied - is to be registered with. - - - If either of the supplied arguments is . - - - If the could not be registered - with the . - -
- - - Generates an object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied . - - The - that requires a generated name. - The - - that the supplied is to be - registered with (needed so that the uniqueness of any generated - name can be guaranteed). - if set to true if the given object - definition will be registed as an inner object or as a top level objener objects - verses top level objects. - - An object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied and - never . - - - If either of the or - arguments is . - - - If a unique name cannot be generated. - - - - - Generates the name of the object for a top-level object definition unique within the given object factory. - - The object definition to generate an object name for. - The registry to check for existing names. - The generated object name - if no unique name can be generated for the given - object definition - - - - Factory method for getting concrete - instances. - - - The name of the event handler method. This may be straight text, a regular - expression, , or empty. - - - The name of the event being wired. This too may be straight text, a regular - expression, , or empty. - - - A concrete - instance. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Thrown when the validation of an object definition failed. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - The detail message. - - - - Creates a new instance of the - - class. - - - The detail message. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Helper class for use in object factory implementations, - resolving values contained in object definition objects - into the actual values applied to the target object instance. - - - Used by . - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The object factory. - - - - Given a property value, return a value, resolving any references to other - objects in the factory if necessary. - - -

- The value could be : - - -

- An , - which leads to the creation of a corresponding new object instance. - Singleton flags and names of such "inner objects" are always ignored: inner objects - are anonymous prototypes. -

- - -

- A , which must - be resolved. -

-
- -

- An . This is a - special placeholder collection that may contain - s or - collections that will need to be resolved. -

-
- -

- An ordinary object or , in which case it's left alone. -

-
- -

-
- - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - -
- - - TODO - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Resolve the target type of the passed . - - The who's target type is to be resolved - The resolved target type, if any. otherwise. - - - - Resolves an inner object definition. - - - The name of the object that surrounds this inner object definition. - - - The name of the inner object definition... note: this is a synthetic - name assigned by the factory (since it makes no sense for inner object - definitions to have names). - - - The name of the property the value of which is being resolved. - - - The definition of the inner object that is to be resolved. - - - if the owner of the property is a singleton. - - - The resolved object as defined by the inner object definition. - - - - - Checks the given bean name whether it is unique. If not already unique, - a counter is added, increasing the counter until the name is unique. - - Original Name of the inner object. - The Adapted name for the inner object - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - The possible object scope values. - - Aleksandar Seovic - - - - - - - - - Application scope. - - - - - Session scope. - - - - - Request scope. - - - - - - - - - - Default scope (currently - ). - - - - - - Object definition reader for a simple properties format. - - - Provides object definition registration methods for - and - instances. Typically applied to a - . - - Rod Johnson - Juergen Hoeller - Simon White (.NET) - - - - Value of a T/F attribute that represents true. - Anything else represents false. Case seNsItive. - - - - - Separator between object name and property name. - - - - - Prefix for the class property of a root object definition. - - - - - Special string added to distinguish if the object will be - a singleton. - - -

- Default is true. -

-
- -

- owner.(singleton)=true -

-
-
- - - Special string added to distinguish if the object will be - lazily initialised. - - -

- Default is false. -

-
- -

- owner.(lazy-init)=true -

-
-
- - - Reserved "property" to indicate the parent of a child object definition. - - - - - Property suffix for references to other objects in the current - : e.g. - owner.dog(ref)=fido. - - -

- Whether this is a reference to a singleton or a prototype - will depend on the definition of the target object. -

-
-
- - - Prefix before values referencing other objects. - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the specified properties file. - - - The resource descriptor for the properties file. - - - The match or filter for object definition names, e.g. 'objects.' - - in case of loading or parsing errors - the number of object definitions found - - - - Register object definitions contained in a - , using all property keys (i.e. - not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Similar syntax as for an . - This method is useful to enable standard .NET internationalization support. -

-
- - The containing object definitions. - - - The match or filter for object definition names, e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions registered. -
- - - Register object definitions contained in an - , using all property keys - (i.e. not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Registers object definitions contained in an - using all property keys ( i.e. not filtering by prefix ) - - The containing - object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Get all property values, given a prefix (which will be stripped) - and add the object they define to the factory with the given name - - The name of the object to define. - - The containing string pairs. - - The prefix of each entry, which will be stripped. - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - - - - Name of default parent object - - - - - Gets or sets object definition factory to use. - - - - - A plain-vanilla object definition. - - -

- This is the most common type of object definition; - instances - do not derive from a parent - , and usually - (but not always - see below) have an - - and (optionally) some - and - . -

-

- Note that - instances do not have to specify an - : - This can be useful for deriving - instances - from such definitions, each with it's own - , - inheriting common property values and other settings from the parent. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - - The of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - Whether to perform a dependency check for objects (not - applicable to autowiring a constructor, thus ignored there) - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - -

- Takes an object class name to avoid eager loading of the object class. -

-
- - The assembly qualified of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - The - to be applied to a new instance of the object. - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. -

-
- - The definition that is to be copied. - -
- - - Validate this object definition. - - - In the case of a validation failure. - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Is always null for a . - - - It is safe to request this property's value. Setting any other value than null will - raise an . - - Raised on any attempt to set a non-null value on this property. - - - - A implementation to use that checks - the object definitions only (no attributes) - - Mark Fisher - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Static factory that permits the registration of existing singleton instances. - - -

- Does not have support for prototype objects, aliases, and post startup object - configuration. -

-

- Serves as a simple example implementation of the - interface, that manages existing object instances as opposed to creating new ones - based on object definitions. -

-

- The - method is not supported by this class; this class deals exclusively with - existing singleton instances, thus the methods mentioned previously make little sense in this context. -

-
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Map from object name to object instance. - - - - - This method is not supported by . - - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - is not currently supported. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - True if an object with the given name is defined. - - - - Is this object a singleton? - - -

- That is, will - or - always return the same object? -

-
- The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Determine the type of the object with the given name. - - -

- More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. -

-
- The name of the object to query. - - The of the object or if - not determinable. - -
- - - Determines whether the object with the given name matches the specified type. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Not supported. - - The name of the object. - - The registered - . - - - Always, as object definitions are not supported by this - implementation. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Will not consider s, - as the type of their created objects is not known before instantiation. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Since this implementation of the - - interface does not support the notion of ptototype objects, the - parameter is ignored. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). Ignored. - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - -
- - - Tests whether this object factory contains an object definition for the - specified object name. - - The object name to query. - - True if an object defintion is contained within this object factory. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Add a new singleton object. - - - The name to be associated with the object name. - - The singleton object. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - This feature is not currently supported. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Defines a method to release allocated unmanaged resources. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - - - - Abstract implementation providing - a number of convenience methods and a - template method - that subclasses must override to provide the actual parsing logic. - - - Use this implementation when you want - to parse some arbitrarily complex XML into one or more - ObjectDefinitions. If you just want to parse some - XML into a single IObjectDefinition, you may wish to consider - the simpler convenience extensions of this class, namely - and - - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Interface used to handle custom, top-level tags. - - Implementations are free to turn the metadata in the custom tag into as - many as required. - - Rob Harrop - Mark Pollack (.NET) - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - -

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

-
- - The element to be parsed. - - - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - - - The primary object definition. - -
- - - Constant for the ID attribute - - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Resolves the ID for the supplied . - - - When using generation, a name is generated automatically. - Otherwise, the ID is extracted from the "id" attribute, potentially with a - fallback to a generated id. - - The element that the object definition has been built from. - The object definition to be registered. - The the object encapsulating the current state of the parsing process; - provides access to a - the resolved id - - if no unique name could be generated for the given object definition - - - - - Registers the supplied with the supplied - . - - Subclasses can override this method to control whether or not the supplied - is actually even registered, or to - register even more objects. - - The default implementation registers the supplied - with the supplied only if the IsNested - parameter is false, because one typically does not want inner objects - to be registered as top level objects. - - - - The object definition to be registered. - The registry that the bean is to be registered with. - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - Gets a value indicating whether an ID should be generated instead of read - from the passed in XmlElement. - - Note that this flag is about always generating an ID; the parser - won't even check for an "id" attribute in this case. - - true if should generate id; otherwise, false. - - - - Gets a value indicating whether an ID should be generated instead if the - passed in XmlElement does not specify an "id" attribute explicitly. - - Disabled by default; subclasses can override this to enable ID generation - as fallback: The parser will first check for an "id" attribute in this case, - only falling back to a generated ID if no value was specified. - - true if should generate id if no value was specified; otherwise, false. - - - - - Convenient base class for when there exists a one-to-one mapping - between attribute names on the element that is to be parsed and - the property names on the Type being configured. - - - - - Mark Pollack - - - - Base Type for those implementations that - need to parse and define just a single IObjectDefinition. - - - Extend this parser Type when you want to create a single object definition - from an arbitrarily complex XML element. You may wish to consider extending - the when you want to create a - single Object definition from a relatively simple custom XML element. - The resulting ObjectDefinition will be automatically registered - with the ObjectDefinitionRegistry. Your job simply is to parse the - custom XML element into a single ObjectDefinition - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - - Determine the name for the parent of the currently parsed object, - in case of the current object being defined as a child object. - The default implementation returns null - indicating a root object definition. - - - the name of the parent object for the currently parsed object. - - - - Gets the type of the object corresponding to the supplied XmlElement. - - Note that, for application classes, it is generally preferable to override - GetObjectTypeName instad, in order to avoid a direct - dependence on the object implementation class. The ObjectDefinitionParser - and its IXmlObjectDefinitionParser (namespace parser) can be used within an - IDE add-in then, even if the application classses are not available in the add-ins - AppDomain. - - The element. - The Type of the class that is being defined via parsing the supplied - Element. - - - - Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. - - The element. - The type name of the object that is being defined via parsing the supplied - XmlElement. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation delegates to the DoParse version without - ParameterContext argument. - The element. - The parser context. - The builder used to define the IObjectDefinition. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation does nothing. - The element. - The builder used to define the IObjectDefinition. - - - - Default implementation of the interface. - Resolves namespace URIs to implementation types based on mappings. - - Erich Eichinger - - - - - - Used by to locate - implementations for a particular namespace URI. - - TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now - Erich Eichinger - - - - - - - Lookup a for the given namespace URI. - - the namespace URI - the located namespace handler or null - - - - Resolve the namespace URI and return the corresponding - implementation. - - the namespace URI to get the matching parser for. - the matching parser or null - - - - XML resource reader. - - -

- Navigates through an XML resource and invokes parsers registered - with the . -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - SPI for parsing an XML document that contains Spring object definitions. - Used by for actually parsing a DOM - document. - - Instantiated per document to parse: Implementations can hold state in - instance variables during the execution of the RegisterObjectDefinitions - method, for example global settings that are defined for all object definitions - in the document. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the DefaultObjectDefinitionDocumentReader class. - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - Parses object definitions starting at the given - using the passed . - - The root element to start parsing from. - The instance to use. - - in case an error happens during parsing and registering object definitions - - - - - Process an alias element. - - - - - Process the object element - - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - - If the resource could not be imported. - - - - - Parses the given alias element, registering the alias with the registry. - - The alias element. - The registry. - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The helper. - - - - - - Allow the XML to be extensible by processing any custom element types last, - after we finished processing the objct definitions. This method is a natural - extension point for any other custom post-processing of the XML. - - The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. - - - The root. - - - - Allow the XML to be extensible by processing any custom element types first, - before we start to process the object definitions. - - This method is a natural - extension point for any other custom pre-processing of the XML. -

The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. -

-
- The root element of the XML document. -
- - - Creates an instance for the given and element. - - the to create the - the root to start reading from - a new instance - - - - Gets the reader context. - - The reader context. - - - - Simple class that holds the defaults specified at the <objects> - level in a standard Spring XML object definition document: - default-lazy-init, default-autowire, etc. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Gets or sets the autowire setting for the document that's currently parsed. - - The autowire. - - - - Gets or sets the dependency-check setting for the document that's currently parsed - - The dependency check. - - - - Gets or sets the lazy-init flag for the document that's currently parsed. - - The lazy init. - - - - Gets or sets the merge setting for the document that's currently parsed. - - The merge. - - - - Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. - - -

- Used by - for actually parsing a DOM document or - fragment. -

-
- Juergen Hoeller - Rick Evans (.NET) - Sandu Turcan (.NET) -
- - - Invoked by after construction but before any - elements have been parsed. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Attribute that should be used to specify the default namespace - and schema location for a custom namespace parser. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Gets or sets the default namespace for the configuration parser. - - - The default namespace for the configuration parser. - - - - - Gets or sets the default schema location for the configuration parser. - - - The default schema location for the configuration parser. - - - If the property is set, the will always resolve to an assembly-resource - and the set will be interpreted relative to this assembly. - - - - - Gets or sets a type from the assembly containing the schema - - - If this property is set, the will always resolve to an assembly-resource - and the will be interpreted relative to this assembly. - - - - - Provides a resolution mechanism for configuration parsers. - - -

- The uses this registry - class to find the parser handling a specific namespace. -

-
- Aleksandar Seovic -
- - - Name of the .Net config section that contains definitions - for custom config parsers. - - - - - Creates a new instance of the NamespaceParserRegistry class. - - - - - Reset the list of registered parsers to "factory"-setting - - use for unit tests only - - - - Registers the type for wellknown namespaces - - true if the parser could be registered, false otherwise - - - - Constructs a "assembly://..." qualified schemaLocation url using the given type - to obtain the assembly name. - - - - - Returns a parser for the given namespace. - - - The namespace for which to lookup the parser implementation. - - - A parser for a given , or - if no parser was found. - - - - - Returns a schema collection containing validation schemas for all registered parsers. - - - A schema collection containing validation schemas for all registered parsers. - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The of the parser that will be activated - when an element in its default namespace is encountered. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The of the parser that will be activated - when the attendant is - encountered. - - - The namespace with which to associate instance of the parser. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If the is not a - that implements the - interface. - - - If is . - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The parser instance. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The namespace with which to associate instance of the parser. - - - The parser instance. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If is , or if - is not specified and parser class - does not have default value defined using . - - - - - Register a schema as well-known - - - - - - - Returns default values for the parser namespace and schema location as - defined by the . - - - A type of the parser. - - - A instance containing - default values for the parser namsepace and schema location - - - - - Resolves xml entities by using the infrastructure. - - - - - Adapts the interface to . - Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 - - - - - Support class for implementing custom namespace parsers. - - Parsing of individual elements is done via a ObjectDefintionParser. - Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser - to handle a specific element. - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Invoked by after construction but before any - elements have been parsed. - - - - - Parses an element under the root node, typically - an object definition or import statement. - - - The element to be parsed. - - - The parser context. - - - The number of object defintions created from this element. - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Register the specified for the given - - - - - Constants defining the structure and values associated with the - Spring.NET XML object definition format. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Value of a boolean attribute that represents - . - - -

- Anything else represents . -

-
-
- - - Signifies that a default value is to be applied. - - - - - Defines an external XML object definition resource. - - - - - Specifies the relative path to an external XML object definition - resource. - - - - - Defines an alias for an object definition. - - - - - Specifies the alias of an object definition. - - - - - Specifies the default lazy initialization mode. - - - - - Specifies the default dependency checking mode. - - - - - Specifies the default autowire mode. - - - - - Specifies the default collection merge mode. - - - - - Defines a single named object. - - - - - Element containing informative text describing the purpose of the - enclosing element. - - -

- Always optional. -

-

- Used primarily for user documentation of XML object definition - documents. -

-
-
- - - Specifies a . - - -

- Does not have to be fully assembly qualified, but it is recommended - that the names of one's objects are - specified explicitly. -

-
-
- - - The name or alias of the parent object definition that a child - object definition inherits from. - - - - - Objects can be identified by an id, to enable reference checking. - - -

- There are constraints on a valid XML id: if you want to reference - your object in .NET code using a name that's illegal as an XML id, - use the optional "name" attribute - (). - If neither given, the objects name is - used as id. -

-
-
- - - Can be used to create one or more aliases illegal in an id. - - -

- Multiple aliases can be separated by any number of spaces, - semicolons, or commas - (). -

-

- Always optional. -

-
-
- - - Is this object a "singleton" (one shared instance, which will - be returned by all calls to - with the id), or a - "prototype" (independent instance resulting from each call to - ). - - -

- Singletons are most commonly used, and are ideal for multi-threaded - service objects. -

-
- -
- - - Controls object scope. Only applicable to ASP.NET web applications. - - -

- Scope can be defined as either application, session or request. It - defines when "singleton" instances are initialized, but has no - effect on prototype definitions. -

-
-
- - - The names of the objects that this object depends on being - initialized. - - -

- The object factory will guarantee that these objects - get initialized before this object definition. -

- - Dependencies are normally expressed through object properties or - constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Optional attribute for the name of the custom initialization method - to invoke after setting object properties. - - -

- The method must have no arguments. -

-
-
- - - Optional attribute for the name of the custom destroy method to - invoke on object factory shutdown. - - -

- Valid destroy methods have either of the following signatures... - - void MethodName() - void MethodName(bool force) - -

- - Only invoked on singleton objects! - -
-
- - - A constructor argument : the constructor-arg tag can have an - optional type attribute, to specify the exact type of the - constructor argument - - -

- Only needed to avoid ambiguities, e.g. in case of 2 single - argument constructors that can both be converted from a - . -

-
-
- - - The constructor-arg tag can have an optional index attribute, - to specify the exact index in the constructor argument list. - - -

- Only needed to avoid ambiguities, e.g. in case of 2 arguments of - the same type. -

-
-
- - - The constructor-arg tag can have an optional named parameter - attribute, to specify a named parameter in the constructor - argument list. - - - - - Is this object "abstract", i.e. not meant to be instantiated itself - but rather just serving as parent for concrete child object - definitions? - - -

- Default is . Specify - to tell the object factory to not try to instantiate that - particular object in any case. -

-
-
- - - A property definition : object definitions can have zero or more - properties. - - -

- Spring.NET supports primitives, references to other objects in the - same or related factories, lists, dictionaries, and name value - collections. -

-
-
- - - A reference to another managed object or static - . - - - - - ID refs must specify a name of the target object. - - - - - A reference to the name of another managed object in the same - context. - - - - - A reference to the name of another managed object in the same - context. - - -

- Local references, using the "local" attribute, have to use object - ids; they can be checked by a parser, thus should be preferred for - references within the same object factory XML file. -

-
-
- - - Alternative to type attribute for factory-method usage. - - -

- If this is specified, no type attribute should be used. This should - be set to the name of an object in the current or ancestor - factories that contains the relevant factory method. This allows - the factory itself to be configured using Dependency Injection, and - an instance (rather than static) method to be used. -

-
-
- - - Optional attribute specifying the name of a factory method to use - to create this object. - - -

- Use constructor-arg elements to specify arguments to the factory - method, if it takes arguments. Autowiring does not apply to - factory methods. -

-

- If the "type" attribute is present, the factory method will be a - static method on the type specified by the "type" attribute on - this object definition. Often this will be the same type as that - of the constructed object - for example, when the factory method - is used as an alternative to a constructor. However, it may be on - a different type. In that case, the created object will *not* be - of the type specified in the "type" attribute. This is analogous - to behaviour. -

-

- If the "factory-object" attribute is present, the "type" attribute - is not used, and the factory method will be an instance method on - the object returned from a - - call with the specified object name. The factory object may be - defined as a singleton or a prototype. -

-

- The factory method can have any number of arguments. Use indexed - constructor-arg elements in conjunction with the factory-method - attribute. -

-

- Setter Injection can be used in conjunction with a factory method. - Method Injection cannot, as the factory method returns an instance, - which will be used when the container creates the object. -

-
-
- - - A list can contain multiple inner object, ref, collection, or - value elements. - - -

- Lists are untyped, pending generics support, although references - will be strongly typed. -

-

- A list can also map to an array type. The necessary conversion is - automatically performed by the - . -

-
-
- - - A set can contain multiple inner object, ref, collection, or value - elements. - - -

- Sets are untyped, pending generics support, although references - will be strongly typed. -

-
-
- - - A Spring.NET map is a mapping from a string key to object (a .NET - ). - - -

- Dictionaries may be empty. -

-
-
- - - A lookup key (for a dictionary or name / value collection). - - - - - A lookup key (for a dictionary or name / value collection). - - - - - Contains a string representation of a value. - - -

- This is used by name-value, ctor argument, and property elements. -

-
-
- - - Contains delimiters that should be used to split delimited string values. - - -

- This is used by name-value element. -

-
-
- - - A reference to another objects. - - -

- Used as a convenience shortcut on property and constructor-arg - elements to refer to other objects. -

-
-
- - - Contains a string representation of an expression. - - -

- This is used by ctor argument and property elements. -

-
-
- - - A map entry can be an inner object, ref, collection, or value. - - -

- The name of the property is given by the "key" attribute. -

-
-
- - - Contains a string representation of a property value. - - -

- The property may be a string, or may be converted to the - required using the - - machinery. This makes it possible for application developers to - write custom - implementations that can convert strings to objects. -

- - This is recommended for simple objects only. Configure more complex - objects by setting properties to references to other objects. - -
-
- - - Contains a string representation of an expression. - - - - - Denotes value. - - -

- Necessary because an empty "value" tag will resolve to an empty - , which will not be resolved to - value unless a special - does so. -

-
-
- - - 'name-values' elements differ from dictionary elements in that - values must be strings. - - -

- May be empty. -

-
-
- - - Element content is the string value of the property. - - -

- The "key" attribute is the name of the property. -

-
-
- - - The lazy initialization mode for an individual object definition. - - - - - The dependency checking mode for an individual object definition. - - - - - Defines a subscription to one or more events published by one or - more event sources. - - - - - The name of an event handling method. - - -

- Defaults to On${event}. - Note : this default will probably change before the first 1.0 - release. -

-
-
- - - The name of an event. - - - - - The autowiring mode for an individual object definition. - - - - - Shortcut alternative to specifying a key element in a - dictionary entry element with <ref object="..."/>. - - - - - Shortcut alternative to specifying a value element in a - dictionary entry element with <ref object="..."/>. - - - - - Specify if the collection values should be merged with the parent. - - - - - The string of characters that delimit object names. - - - - - A lookup method causes the IoC container to override a given method and return - the object with the name given in the attendant object attribute. - - -

- This is a form of Method Injection. -

-

- It's particularly useful as an alternative to implementing the - interface, - in order to be able to make - - calls for non-singleton instances at runtime. In this case, Method Injection - is a less invasive alternative. -

-
-
- - - The name of a lookup method. This method must take no arguments. - - - - - The name of the object in the IoC container that the lookup method - must resolve to. - - -

- Often this object will be a prototype, in which case the lookup method - will return a distinct instance on every invocation. This is useful - for single-threaded objects. -

-
-
- - - A replaced method causes the IoC container to override a given method - with an (arbitrary) implementation at runtime. - - -

- This (again) is a form of Method Injection. -

-
-
- - - Name of the method whose implementation should be replaced by the - IoC container. - - -

- If this method is not overloaded, there's no need to use arg-type - subelements. -

-

- If this method is overloaded, arg-type subelements must be - used for all override definitions for the method. -

-
-
- - - The object name of an implementation of the - interface. - - -

- This may be a singleton or prototype. If it's a prototype, a new - instance will be used for each method replacement. Singleton usage - is the norm. -

-
-
- - - Subelement of replaced-method identifying an argument for a - replaced method in the event of method overloading. - - - - - - Specification of the of an overloaded method - argument as a . - - -

- For convenience, this may be a substring of the FQN. E.g. all the following would match - : -

-

- - - System.String - - - string - - - str - - -

-
- -
- - - Check everything. - - - - - Just check primitive (string, int, etc) values. - - - - - Check object references. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Stateful class used to parse XML object definitions. - - Not all parsing code has been refactored into this class. See - BeanDefinitionParserDelegate in Java for how this class should evolve. - Rob Harrop - Juergen Hoeller - Rod Johnson - Mark Pollack (.NET) - - - - The shared instance for this class (and derived classes). - - - - - Initializes a new instance of the class. - - The reader context. - - - - Initializes a new instance of the class. - - The reader context. - The root element of the definition document to parse - - - - Initialize the default lazy-init, dependency check, and autowire settings. - - The root element - - - - Determines whether the Spring object namespace is equal to the the specified namespace URI. - - The namespace URI. - - true if is the default Spring namespace; otherwise, false. - - - - - Decorates the object definition if required. - - The element. - The holder. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The containing object definition if is a nested element. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Create an instance from the given and . - - - This method may be used as a last resort to post-process an object definition before it gets added to the registry. - - - - - Allows deriving classes to post process the name and aliases for the current element. By default - does nothing and returns the unmodified . - - - The list passed in may be modified by an implementation of this method to reflect special needs. - - the object name obtained by the default algorithm from 'id' and 'name' attributes so far. - the object aliases obtained by the default algorithm from 'name' attribute so far. - the currently processed element. - the containing object definition, may be null - the new object name to be used. - - - - Validate that the specified object name and aliases have not been used already. - - - - - Parses an element in a custom namespace. - - - the parsed object definition or null if not supported by the corresponding parser. - - - - Parses an element in a custom namespace. - - - if a nested element, the containing object definition - the parsed object definition or null if not supported by the corresponding parser. - - - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Determines whether the string represents a 'true' boolean value. - - The value. - - true if is 'true' string value; otherwise, false. - - - - - Convenience method to create a builder for a root object definition. - - Name of the object type. - A builder for a root object definition. - - - - Convenience method to create a builder for a root object definition. - - Type of the object. - a builder for a root object definition - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Report a parser error. - - - - - Gets the defaults definition object, or null if the - default have not yet been initialized. - - The defaults. - - - - Gets the reader context. - - The reader context. - - - - Creates an instance - populated with the object definitions supplied in the configuration - section. - - -

- Applications will typically want to use an - , and instantiate it - via the use of the - class (which is similar in functionality to this class). This class is - provided for those times when only an - is required. -

- Creates an instance of the class XmlObjectFactory -
- -

- -

-
- Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a - instance populated with the object definitions supplied in the - configuration section. - - - The configuration settings in a corresponding parent configuration - section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - A instance - populated with the object definitions supplied in the configuration - section. - - - - - Default implementation of the - interface. - - -

- Parses object definitions according to the standard Spring.NET schema. -

-

- This schema is typically located at - http://www.springframework.net/xsd/spring-objects.xsd. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The namespace URI for the standard Spring.NET object definition schema. - - - - - The shared instance for this class (and derived classes). - - - - - Invoked by after construction but before any - elements have been parsed. - - This is a NoOp - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - The parser context. - - If the resource could not be imported. - - - - Parses an event listener definition. - - The name associated with the object that the event handler is being defined on. - - The events being populated. - - The element containing the event listener definition. - - - The namespace-aware parser. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The parser context. - if set to true if we are processing an inner - object definition. - - The object (definition) wrapped within an - - instance. - - -

- Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. -

-

- If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. -

-
-
- - - Calculates an id for an object definition. - - -

- Called when an object definition has not been explicitly defined - with an id. -

-
- - The element containing the object definition. - - - The list of names defined for the object; may be - or even empty. - - - A calculated object definition id. - -
- - - Parse a standard object definition. - - The element containing the object definition. - The id of the object definition. - parsing state holder - The object (definition). - - - - Parse method override argument subelements of the given object element. - - - - - Parse element and add parsed element to - - - - - Parse element and add parsed element to - - - - - Parse constructor argument subelements of the given object element. - - - - - Parse event handler subelements of the given object element. - - - - - Parse property value subelements of the given object element. - - - The name of the object (definition) associated with the property element (s) - - - The element containing the top level object definition. - - - The namespace-aware parser. - - - The property (s) associated with the object (definition). - - - - - Parse a constructor-arg element. - - - The name of the object (definition) associated with the ctor arg. - - - The list of constructor args associated with the object (definition). - - - The name of the element containing the ctor arg definition. - - - The namespace-aware parser. - - - - - Parse a property element. - - - The name of the object (definition) associated with the property. - - - The list of properties associated with the object (definition). - - - The name of the element containing the property definition. - - - The namespace-aware parser. - - - - - Get the value of a property element (may be a list). - -

- Please note that even though this method is named GetPropertyValue, - it is called by both the property and constructor argument element - handlers. -

-
- The property element. - - The name of the object associated with the property. - - - The namespace-aware parser. - -
- - - Parse a value, ref or collection subelement of a property element. - - - Subelement of property element; we don't know which yet. - - - The name of the object (definition) associated with the top level property. - - - The namespace-aware parser. - - - - - Gets a list definition. - - - The element describing the list definition. - - - The name of the object (definition) associated with the list definition. - - - The namespace-aware parser. - - The list definition. - - - - Gets a set definition. - - - The element describing the set definition. - - - The name of the object (definition) associated with the set definition. - - - The namespace-aware parser. - - The set definition. - - - - Gets a dictionary definition. - - The element describing the dictionary definition. - The name of the object (definition) associated with the dictionary definition. - The namespace-aware parser. - The dictionary definition. - - - - Selects sub-elements with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child nodes to look for. - - - The child s of the supplied - with the supplied - . - -
- - - Selects a single sub-element with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child node to look for. - - - The first child of the supplied - with the supplied - . - -
- - - Gets a name value collection mapping definition. - - - The element describing the name value collection mapping definition. - - - The name of the object (definition) associated with the - name value collection mapping definition. - - the context carrying parsing state information - The name value collection definition. - - - - Returns the text of the supplied , - or the empty string value if said is empty. - - -

- If the supplied is , - then the empty string value will be returned. -

-
-
- - - Strips the dependency check value out of the supplied string. - - -

- If the supplied is an invalid dependency - checking mode, the invalid value will be logged and this method will - return the value. - No exception will be raised. -

-
- - The string containing the dependency check value. - - The dependency check value. - -
- - - Strips the autowiring mode out of the supplied string. - - -

- If the supplied is an invalid autowiring mode, - the invalid value will be logged and this method will return the - value. No exception will be raised. -

-
- - The string containing the autowiring mode definition. - - The autowiring mode. - -
- - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Context that gets passed along an object definition parsing process, encapsulating - all relevant configuraiton as well as state. - - - - - Initializes a new instance of the class. - - The parser helper. - - - - Initializes a new instance of the class. - - The parser helper. - The containing object definition. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - The containing object definition. - - - - Gets the reader context. - - The reader context. - - - - Gets the registry. - - The registry. - - - - Gets the parser helper. - - The parser helper. - - - - Gets the containing object definition. - - The containing object definition. - - - - Gets a value indicating whether this instance is nested. - - true if this instance is nested; otherwise, false. - - - - Gets a value indicating whether this instance is default lazy init. - - - true if this instance is default lazy init; otherwise, false. - - - - - Represents the replacement of a method on a managed object by the IoC - container. - - -

- Note that this mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The name of the method that is to be overridden. - - - The object name of the - instance in the surrounding IoC container. - - - If either of the supplied arguments is or - contains only whitespace character(s). - - - - - Add a fragment of a instance's - such as 'Exception or System.Excep to identify an argument - for a dependency injected method. - - - A (sub) string of a instance's . - - - If the supplied is or - contains only whitespace character(s). - - - - - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The object name of the - instance in the surrounding IoC container. - - - - - Object definition reader for Spring's default XML object definition format. - - -

- Typically applied to a - instance. -

-

- This class registers each object definition with the given object factory superclass, - and relies on the latter's implementation of the - interface. -

-

- It supports singletons, prototypes, and references to either of these kinds of object. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - the to use for creating new s - - - - Load object definitions from the supplied XML . - - - The XML resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Actually load object definitions from the specified XML file. - - The input stream to read from. - The resource for the XML data. - - - - - Validation callback for a validating XML reader. - - The source of the event. - Any data pertinent to the event. - - - - Register the object definitions contained in the given DOM document. - - The DOM document. - - The original resource from where the - was read. - - - The number of object definitions that were registered. - - - In case of parsing errors. - - - - - Creates the to use for actually - reading object definitions from an XML document. - - Default implementation instantiates the specified - or if no reader type is specified. - - - - - Creates the to be passed along - during the object definition reading process. - - The underlying that is currently processed. - A new - - - - Create a instance for handling custom namespaces. - - - TODO (EE): make protected virtual, see remarks on - - - - - The to be used for parsing. - - - - - Sets the IObjectDefinitionDocumentReader implementation to use, responsible for - the actual reading of the XML object definition document.stype of the document reader. - - The type of the document reader. - - - - Specify a to use. If none is specified a default - instance will be created by - - - - - Specify a for creating instances of . - - - - - For retrying the parse process - - - - - Convenience extension of - - that reads object definitions from an XML document or element. - - -

- Delegates to - - underneath; effectively equivalent to using a - for a - . -

- - objects doesn't need to be the root element of - the XML document: this class will parse all object definition elements in the - XML stream. - -

- This class registers each object definition with the - - superclass, and relies on the latter's implementation of the - interface. It supports - singletons, prototypes and references to either of these kinds of object. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Gets object definition reader to use. - - - - - Extension of specific to use with an XmlObjectDefinitionReader. - Provides access to configured in - - - - - The maximum length of any XML fragment displayed in the error message - reporting. - - -

- Hopefully this will display enough context so that a user - can pinpoint the cause of the error. -

-
-
- - - Initializes a new instance of the class. - - The resource. - The reader. - - - - Initializes a new instance of the class. - - The resource. - The reader. - The factory to use for creating new instances. - - - - Generates the name of the object. - - The object definition. - the generated object name - - - - Registers the name of the with generated. - - The object definition. - the generated object name - - - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - - -
- - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the error. - - - The root cause of the parse error (if any - may be ). - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - -
- - - This method can be overwritten in order to implement validators - capable of displaying a full list of errors found in the definition. - - - The node that triggered the parse error. - - - A message about the exception. - - - - - Gets the reader. - - The reader. - - - - Gets the resource loader. - - The resource loader. - - - - Gets the registry. - - The registry. - - - - Gets or sets the object definition factory. - - The object definition factory. - - - - Get the instance to lookup parsers for custom namespaces. - - - - - Exception thrown if an - is not fully - initialized, for example if it is involved in a circular reference. - - -

- This is usually indicated by any of the variants of the - - method returning . -

-

- A circular reference with an - cannot be solved by eagerly caching singleton instances (as is the - case with normal objects. The reason is that every - needs to be fully - initialized before it can return the created object, while only specific - normal objects need to be initialized - that is, if a collaborating object - actually invokes them on initialization instead of just storing the reference. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Thrown when an - encounters an error when attempting to create an object from an object - definition. - - Juergen Hoeller - Rick Evans (.NET) - - - - 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 name of the object that triggered 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. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Describes the creation failure trace of this exception. - - - - - Creates a new instance of the - FactoryObjectNotInitializedException class. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - FactoryObjectCircularReferenceException class. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectCircularReferenceException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - is asked for an object instance name for which it cannot find a definition. - - Rod Johnson - Rick Evans (.NET) - - - - 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. - - - Name of the missing object. - - - A further, detailed message describing the problem. - - - - - Initializes a new instance of the class. - - The required type of the object. - A description of the originating dependency. - A message describing the problem. - - - - Creates a new instance of the - class. - - - The of the missing object. - - - A further, detailed message describing the problem. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Return the required of object, if it was a - lookup by that failed. - - - - - Return the name of the missing object, if it was a lookup by name that - failed. - - - - - Thrown in case of a reference to an object that is currently in creation. - - -

- Typically happens when constructor autowiring matches the currently - constructed object. -

-
- Juergen Hoeller - Rick Evans -
- - - The default error message text to be used, if none is specified. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectCurrentlyInCreationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - encounters an error when attempting to parse an object - definition. - - Federico Spinazzi (.NET) - - - - Creates a new instance of the ObjectDefinitionException class. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The value of the xml class attribute thet can be resolved - as a type - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The message about the exception. - - - - - Convenience methods operating on object factories, returning object instances, - names, or counts. - - -

- The nesting hierarchy of an object factory is taken into account by the various methods - exposed by this class. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Used to dereference an - and distinguish it from managed objects created by the factory. - - -

- For example, if the managed object identified as foo is a - factory, getting &foo will return the factory, not the - instance returned by the factory. -

-
-
- - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Count all object definitions in any hierarchy in which this - factory participates. - - -

- Includes counts of ancestor object factories. -

-

- Objects that are "overridden" (specified in a descendant factory - with the same name) are counted only once. -

-
- The object factory. - - The count of objects including those defined in ancestor factories. - -
- - - Return all object names in the factory, including ancestor factories. - - The object factory. - The array of object names, or an empty array if none. - - - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s - if is set to true, - which means that s will get initialized. -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - The array of object names, or an empty array if none. - -
- - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - The array of object names, or an empty array if none. - -
- - - Return all objects of the given type or subtypes, also picking up objects - defined in ancestor object factories if the current object factory is an - . - - -

- The return list will only contain objects of this type. - Useful convenience method when we don't care about object names. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the objects could not be created. - - - The of object instances, or an - empty if none. - -
- - - Return a single object of the given type or subtypes, also picking up objects defined - in ancestor object factories if the current object factory is an - . - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If more than one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. - This version of ObjectOfType automatically includes prototypes and - instances. -

-
- The object factory. - The of object to match. - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return the object name, stripping out the factory dereference prefix if necessary. - - The name of the object. - The object name sans any factory dereference prefix. - - - - Given an (object) name, builds a corresponding factory object name such that - the return value can be used as a lookup name for a factory object. - - - The name to be used to build the resulting factory object name. - - - The transformed into its factory object name - equivalent. - - - - - - - Is the supplied a factory dereference? - - -

- That is, does the supplied begin with - the - ? -

-
- The name to check. - - if the supplied is a - factory dereference; if not, or the - aupplied is or - consists solely of the - - value. - - -
- - - Exception that an object implementation is suggested to throw if its own - factory-aware initialization code fails. - thrown by object factory methods - themselves should simply be propagated as-is. - - -

- Note that non-factory-aware initialization methods like AfterPropertiesSet () - or a custom "init-method" can throw any exception. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectInitializationException class. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectInitializationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to an attempt to lookup a factory object, and - the object identified by the lookup key is not a factory. - - -

- An object is a factory if it implements (either directly or indirectly - via inheritance) the - interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Thrown when an object doesn't match the required . - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - Name of the object requested. - - - The required of the actual object - instance that was retrieved. - - - The instance actually returned, whose class did not match the - expected . - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The actual of the actual object - instance that was retrieved. - - - - - The required of the actual object - instance that was retrieved. - - - - - The instance actually returned, whose class did not match the - expected . - - - - - The name of the object requested. - - - - - 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 name of the object that was being retrieved from the factory. - - - The object instance that was retrieved. - - - - - 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. - - - - - Exception thrown when an object depends on other objects or simple properties - that were not specified in the object factory definition, although dependency - checking was enabled. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The constructor argument index at which the dependency is - unsatisfied. - - - The of the constructor argument at - which the dependency is unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The name identifying the property on which the dependency is - unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Base class implementation for classes that describe an event handler. - - Rick Evans - - - - Describes an event handler. - - Rick Evans - - - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - The source of the event. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Returns a stringified representation of this object. - - A stringified representation of this object. - - - - The source of the event (may be unresolved, as in the case - of a - value). - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Convenience base class for implementations. - - - - - Abstracts the state sharing strategy used - by - - Erich Eichinger - - - - Indicate, whether the given instance can be served by this factory - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state can - be served for the given instance or not. - - - - - Returns the shared state for the given instance. - - the instance to obtain shared state for. - the name of this instance - a dictionary containing shared state for or null. - - - - Gets a dictionary acc. to the type of . - If no dictionary is found, create it according to - - the instance to obtain shared state for - the name of the instance. - - A dictionary containing the 's state, - or null if no state can be served by this provider. - - - - - Creates a dictionary to hold the shared state identified by . - - a key to create the dictionary for. - a dictionary according to and . - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Create the key used for obtaining the state dictionary for . - - the instance to create the key for - the name of the instance. - - the key identifying the state dictionary to be used for - or null, if this state manager doesn't serve the given instance. - - - - Implementations may choose to return null from this method to indicate, - that they won't serve state for the given instance. - - - Note:Keys returned by this method are always treated case-sensitive! - - - - - - Create shared state dictionaries case-sensitive or case-insensitive? - - - - - A number indicating the priority of this ( for more). - - - - - Base class for all - implemenations that actually perform event wiring. - - Rick Evans - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Resolves the method metadata that describes the method that is to be used - as the argument to a delegate constructor. - - - The exposing the method. - - - The of the delegate (e.g. System.EventHandler). - - - The custom binding flags to use when searching for the method. - - The method metadata. - - If the method could not be found. - - - - - Describes an implementation - that autowires events to handler methods. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Wires up the specified handler to the named event on the supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a , - etc). - - - - - The name of the method that is going to handle the event. - - - - - Performs the matching up of handler methods to one or more source events. - - -

- This class merely marshals the matching of handler methods to the events exposed - by an event source, and then delegates to a concrete - implementation (such as - or - ) to do the heavy lifting of - actually wiring a handler method to an event. -

-

- Note : the order in which handler's are wired up to events is non-deterministic. -

-
-
- - - Creates a new instance of the - class. - - - The object exposing the event (s) being wired up. - - - The name of the event that is being wired up. - - - The object exposing the method (s) being wired to the event. - - - The name of the method that is going to handle the event. - - - - - Wires up events on the source to methods exposed on the handler. - - - - - Wires up the supplied event to any handler methods that match the event - signature. - - The event being wired up. - - - - Only replaces the first occurrence of the placeholder. - - The event whose name is going to be used. - - The method name customised for the name of the supplied event. - - - - - The object exposing the event (s) being wired up. - - - - - The object exposing the method (s) being wired to an event source. - - - - - The of the object that is handling any events. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Serves shared state on a by-type basis. - - - - - Creates a new instance matching all types by default. - - - - - Creates a new instance matching only specified list of types. - - the list of types to serve. - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Returns the for the given . - - the instance to obtain the key for. - the name of the instance (ignored by this provider) - instance.GetType() if it matches the list. Null otherwise. - - This method will only be called if returned true previously. - - - - - Limit object types to be served by this state manager. - - - Only objects assignable to one of the types in this list - will be served state by this manager. - - - - - Describes an event handler for an object instance. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Definition for sorting object instances by a property. - - Juergen Hoeller - Simon White (.NET) - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Mutable implementation of the - interface that - supports toggling the ascending value on setting the same property again. - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using - the specified . - - - The to use - as a source for initial property values. - - - - - Creates a new instance of the - class. - - - The name of the property to sort by. - - - Whether upper and lower case in string values should be ignored. - - - Whether or not the sorting should be ascending or descending. - - - - - Creates a new instance of the - class. - - - Whether or not the - - property should be toggled if the same name is set on the - - property. - - - - - Overrides the default method - - - The object to test against this instance for equality. - - - True if the supplied is equal to this instance. - - - - - Overrides the default method. - - The hashcode for this instance. - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Performs a comparison of two objects, using the specified object property via - an . - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - The to use for any - sorting. - - - If the supplied is . - - - - - Compares two objects and returns a value indicating whether one is less - than, equal to or greater than the other. - - The first object to compare. - The second object to compare. - - - - - Get the 's property - value for the given object. - - The object to get the property value for. - The property value. - - - - Sort the given according to the - given sort definition. - - - The to be sorted. - - The parameters to sort by. - - In the case of a missing property name. - - - If the supplied is . - - - - - Gets the to - use for any sorting. - - - The to use for - any sorting. - - - - - Describes an event handler for a static class method. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - The central interface of Spring.NET's low-level object infrastructure. - - -

- Typically not directly used by application code but rather implicitly - via an . -

-

- Implementing classes have the ability to get and set property values - (individually or in bulk), get property descriptors and query the - readability and writability of properties. -

-

- This interface supports nested properties enabling the setting - of properties on subproperties to an unlimited depth. -

-

- If a property update causes an exception, a - will be thrown. Bulk - updates continue after exceptions are encountered, throwing an exception - wrapping all exceptions encountered during the update. -

-

- implementations can be used - repeatedly, with their "target" or wrapped object changed. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - Get the value of a property. - - The name of the property to get the value of. May be nested. - - The value of the property. - - if the property isn't readable, or if the getting the value throws - an exception. - - - - - Get the for a particular - property. - - - The property to be retrieved. - - - The for the particular - property. - - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Get all of the instances for - all of the properties of the wrapped object. - - - An array of instances. - - - - - Set a property value. - - -

- This is the preferred way to update an individual property. -

-
- The new property value. -
- - - Set a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new property value. -
- - Set a number of property values in bulk. - -

- This is the preferred way to perform a bulk update. -

-

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

- Does not allow the setting of unknown fields. Equivalent to - - with an argument of false for the second parameter. -

-
- - The collection of instances to - set on the wrapped object. - -
- - - Set a number of property values in bulk with full control over behavior. - - -

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

Does not allow the setting of unknown fields. -

-
- - The to set on the target object - - - Should we ignore unknown values (not found in the object!?) - -
- - - The object wrapped by the wrapper (cannot be ). - - -

- Implementations are required to allow the type of the wrapped - object to change. -

-
- The object wrapped by this wrapper. -
- - - Convenience method to return the - of the wrapped object. - - The of the wrapped object. - - - - A collection style container for - instances. - - Rod Johnson - Mark Pollack (.NET) - - - - Return the instance with the - given name. - - The name to search for. - the , or null if a - the with the supplied - did not exist in this collection. - - - - - Is there a instance for this - property name? - - The name to search for. - - True if there is a instance for - the supplied . - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - -

- Subclasses should also override Equals. -

-
- The old property values. - - An containing any changes, or - an empty instance if there were - no changes. - -
- - - Return an array of the objects - held in this object. - - An array of the objects held - in this object. - - - - - This interface should be implemented by classes that want to - have access to the shared state. - - -

- Shared state is very useful if you have data that needs to be shared by all instances - of e.g. the same webform (or other IHttpHandlers). -

-

- For example, Spring.Web.UI.Page class implements this interface, which allows - each page derived from it to cache localizalization resources and parsed data binding - expressions only once and then reuse the cached values, regardless of how many instances - of the page are created. -

-
-
- - - Gets or sets the that should be used - to store shared state for this instance. - - - - - Default implementation of the - interface. - - -

- Allows simple manipulation of properties, and provides constructors to - support deep copy and construction from a number of collection types such as - and - . -

-
- Rod Johnson - Mark Pollack (.NET) - Rick Evans (.NET) -
- - - The list of objects. - - - - - Creates a new instance of the - class. - - -

- The returned instance is initially empty... - s can be added with the various - overloaded , - , - , - and - methods. -

-
- - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. Guarantees - references are independent, although it can't deep copy objects currently - referenced by individual objects. -

-
-
- - - Creates a new instance of the - class. - - - The with property values - keyed by property name, which must be a . - - - - - Overloaded version of Add that takes a property name and a property value. - - - The name of the property. - - - The value of the property. - - - - - Add the supplied object, - replacing any existing one for the respective property. - - - The object to add. - - - - - Merges the value of the supplied 'new' with that of - the current if merging is supported and enabled. - - - The new pv. - The current pv. - The possibly merged PropertyValue - - - - Add all property values from the given - . - - - The map of property values, the keys of which must be - s. - - - - - Add all property values from the given - . - - - The list of s to be added. - - - - - Remove the given , if contained. - - - The to remove. - - - - - Removes the named , if contained. - - - The name of the property. - - - - - Modify a object held in this object. Indexed from 0. - - - - - Return the property value given the name. - - - The property name is checked in a case-insensitive fashion. - - - The name of the property. - - - The property value. - - - - - Does the container of properties contain one of this name. - - The name of the property to search for. - - True if the property is contained in this collection, false otherwise. - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - Another property values collection. - - The collection of property values that are different than the supplied one. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - Convert the object to a string representation. - - - A string representation of the object. - - - - - Property to retrieve the array of property values. - - - - - Default implementation of the - interface that should be sufficient for all normal uses. - - -

- will convert - and array - values to the corresponding target arrays, if necessary. Custom - s that deal with - s or arrays can be written against a - comma delimited as - arrays are converted in such a format if the array itself is not assignable. -

-
- Rod Johnson - Juergen Hoeller - Jean-Pierre Pawlak - Mark Pollack (.NET) - Aleksandar Seovic(.NET) -
- - The wrapped object. - - - - The ILog instance for this class. We'll create a lot of these objects, - so we don't want a new instance every time. - - - - - Creates a new instance of the class. - - -

- The wrapped target instance will need to be set afterwards. -

-
- -
- - - Creates a new instance of the class. - - - The object wrapped by this . - - - If the supplied is . - - - - - Creates a new instance of the class, - instantiating a new instance of the specified and using - it as the . - - -

- Please note that the passed as the - argument must have a no-argument constructor. - If it does not, an exception will be thrown when this class attempts - to instantiate the supplied using it's - (non-existent) constructor. -

-
- - The to instantiate and wrap. - - - If the is , or if the - invocation of the s default (no-arg) constructor - fails (due to invalid arguments, insufficient permissions, etc). - -
- - Gets the value of a property. - - The name of the property to get the value of. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - Gets the value of a property. - - The property expression that should be used to retrieve the property value. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - - Sets a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new value. -
- - - Sets a property value. - - - The property expression that should be used to set the property value. - - The new value. - - - - Sets a property value. - - -

- This is the preferred way to update an individual property. -

-
- - The object containing new property value. - -
- - Set a number of property values in bulk. - -

- Does not allow unknown fields. Equivalent to - - with and for - arguments. -

-
- - The to set on the target - object. - - - If an error is encountered while setting a property. - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Perform a bulk update with full control over behavior. - - -

- This method may throw a reflection-based exception, if there is a critical - failure such as no matching field... less serious exceptions will be accumulated - and thrown as a single . -

-
- - The s to set on the target object. - - - Should we ignore unknown values (not found in the object!?). - - - If an error is encountered while setting a property (only thrown if the - parameter is set to ). - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Returns PropertyInfo for the specified property - - The name of the property to search for. - The for the specified property. - If cannot be determined. - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Returns MemberInfo for the specified property or field - - The name of the property or field to search for. - The or for the specified property or field. - If does not resolve to a property or field. - - - - Get the properties of the wrapped object. - - - An array of s. - - - - - This method is expensive! Only call for diagnostics and debugging reasons, - not in production. - - - A string describing the state of this object. - - - - - Attempts to parse property expression first and falls back to full expression - if that fails. Performance optimization. - - Property expression to parse. - Parsed proeprty expression. - - - - The object wrapped by this . - - - If the object cannot be changed; or an attempt is made to set the - value of this property to . - - - - - Convenience method to return the of the wrapped object. - - -

- Do not use this (convenience) method prior to setting the - property. -

-
- - The of the wrapped object. - - - If the property - is . - -
- - - Return the collection of property descriptors. - - - - - Combined exception, composed of individual binding - s. - - -

- An object of this class is created at the beginning of the binding - process, and errors added to it as necessary. -

-

- The binding process continues when it encounters application-level - s, applying those changes - that can be applied and storing rejected changes in an instance of this class. -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) -
- - - Creates a new instance of the PropertyAccessExceptionsException class. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Create new empty PropertyAccessExceptionsException. - We'll add errors to it as we attempt to bind properties. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The IObjectWrapper wrapping the target object at the root of the exception. - - - - The list of PropertyAccessException objects. - - - - Return the - for the supplied , or - if there isn't one. - - - - - Describe the number of exceptions contained in this container class. - - A description of the instance contents. - - - - Return the that generated - this exception. - - - - - Return the object we're binding to. - - - - - If this returns zero (0), no errors were encountered during binding. - - - - - Return an array of the s - stored in this object. - - -

- Will return the empty array (not ) if there were no errors. -

-
-
- - - Describe the group of exceptions. - - - - - Holds information and value for an individual property. - - -

- Using an object here, rather than just storing all properties in a - map keyed by property name, allows for more flexibility, and the - ability to handle indexed properties in a special way if necessary. -

-

- Note that the value doesn't need to be the final required - : an - implementation must - handle any necessary conversion, as this object doesn't know anything - about the objects it will be applied to. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - - If the supplied is or - contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - Pre-parsed property name. - - If the supplied or - is , or if the name contains only whitespace characters. - - - - - Print a string representation of the property. - - A string representation of the property. - - - - Determines whether the supplied - is equal to the current . - - The other instance. - - if they are equal in content. - - - - - 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 name of the property. - The name of the property. - - - - Parsed property expression. - - - - - Return the value of the property. - - -

- Note that type conversion will not have occurred here. - It is the responsibility of the - implementation to - perform type conversion. -

-
- The (possibly unresolved) value of the property. -
- - - A simple pool implementation - - -

- Based on the implementation found in Concurrent Programming in Java, - 2nd ed., by Doug Lea. -

-
- Doug Lea - Federico Spinazzi - Mark Pollack -
- - - A simple pooling interface for managing and monitoring a pool - of objects. - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - Obtain an instance from the pool. - - -

- By contract, clients must return the borrowed - instance using - or a related method as defined in an implementation or - sub-interface. -

-
- An instance from the pool. - - In case the pool is unusable. - - -
- - - Return an instance to the pool. - - -

- By contract, the object must have been obtained using - - or a related method as defined in an implementation or sub-interface. -

-
- The instance to be returned to the pool. - -
- - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This is an optional operation. AddObject is useful for "pre-loading" a - pool with idle objects. -

-
- - If the implementation does not support the operation. - -
- - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently borrowed from the pool. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently idle in the pool. - - -

- This is an optional operation. -

-

- This may be considered an approximation of the number of objects - that can be borrowed without creating any new instances. -

-
- - If the implementation does not support the operation. - -
- - - Set the factory used to create new instances. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Set of permits - - - - - Creates a new instance of the - class. - - - The factory used to instantiate and manage the lifecycle of pooled objects. - - The initial size of the pool. - - If the supplied is . - - - If the supplied is less than or equal to zero. - - - - - Obtain an instance from the pool. - - - In case the pool is unusable. - - - - - - - Return an instance to the pool. - - The instance to be returned to the pool. - - - - - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Synchronized borrow logic. - - - - - - Synchronized release logic. - - - The object to release to the pool. - - - if the object was not a busy one. - - - - - Instantiates the supplied number of instances and adds - them to the pool. - - - The initial number of objects to build. - - - If the supplied number of is - less than or equal to zero. - - - - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Change the state of the pool to unusable. - - - - - Gets the number of instances currently borrowed from the pool. - - - If the implementation does not support the operation. - - - - - - Gets the number of instances currently idle in the pool. - - - If the implementation does not support the operation. - - - - - - Set the factory used to create new instances. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Defines lifecycle methods for objects that are to be used in an - implementation. - - -

- The following methods summarize the contract between an - and an - an . -

- - - - is called whenever a new instance is needed. - - - - is invoked on every instance before it is returned from - the pool. - - - - is invoked on every instance when it is returned to the pool. - - - - is invoked on every instance when it is being dropped from the - pool (see - - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - 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. - - -

- Invoked on every instance when it is being "dropped" - from the pool (whether due to the return value from a call to the - - method, or for reasons specific to the pool implementation.) -

-
- 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. - - -

- Invoked in an implementation-specific fashion to determine if an - instance is still valid to be returned by the pool. - It will only be invoked on an "activated" instance. -

-
- 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. - - -

- Invoked on every instance before it is returned from the pool. -

-
- The instance to be activated. -
- - - Uninitialize an instance to be returned to the pool. - - -

- Invoked on every instance when it is returned to the pool. -

-
- The instance returned to the pool. -
- - - Base class for all pooling exceptions. - - Federico Spinazzi - - - - 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. - - - - - Base class for method builders that contains common functionalities. - - Bruno Baia - - - - Defines interface that proxy method builders have to implement. - - Aleksandar Seovic - Bruno Baia - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - The type builder to use. - - - - - The implementation to use. - - - - - Indicates whether interfaces should be implemented explicitly. - - - - - 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 . - - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Defines proxy method for the target object. - - The method to proxy. - - The interface definition of the method, if applicable. - - - if the supplied is to be - implemented explicitly; otherwise . - - - The for the proxy method. - - - - - Defines generic method parameters based on proxied method metadata. - - - The to use. - - The method to proxy. - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Calls target method directly. - - The IL generator to use. - The method to invoke. - - - - Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. - - The IL generator to use. - The method to test for - the name of the target to be used in error messages - - - - Calls base method directly. - - The IL generator to use. - The method to proxy. - - - - Replaces a raw reference with a reference to a proxy. - - -

- If the target object returns reference to itself -- 'this' -- - we need to treat it as a special case and return a reference - to a proxy object instead. -

-
- The IL generator to use. - The location of the return value. -
- - - Generates code that throws . - - IL generator to use. - the type of the exception to throw - Error message to use. - - - - Base class for proxy builders that can be used - to create a proxy for any class. - - -

- This class provides a set of template - methods that derived classes can override to provide custom behaviour - appropriate to the type of proxy that is being generated (one of - inheritance or composition-based proxying). -

-
- Aleksandar Seovic - Bruno Baia -
- - - Describes the operations for a generic proxy type builder that can be - used to create a proxy type for any class. - - Aleksandar Seovic - - - - Creates the proxy type. - - The generated proxy class. - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - - - - Gets or sets the list of interfaces proxy should implement. - - - - - Should we proxy target attributes? - - - by default. - Target type attributes, method attributes, method's return type attributes - and method's parameter attributes are copied to the proxy. - - - - - The list of custom s that the proxy - class must be decorated with. - - -

- Note that the list is composed of instances of the actual - s that are to be applied, not the - s of the s. -

-
- -

- The following code snippets show examples of how to decorate the - the proxied class with one or more s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary typeAtts = new Hashtable(); - builder.TypeAttributes = typeAtts; - - // applies a single Attribute to the proxied class... - typeAtts = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to the proxied class... - typeAtts = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - The custom s that the proxy - members must be decorated with. - - -

- This dictionary must use simple s for keys - (denoting the member names that the attributes are to be applied to), - with the corresponding values being - s. -

-

- The key may be wildcarded using the '*' character... if so, - then those proxy members that match against the key will be - decorated with the attendant list of - s. This naturally implies that using - the '*' character as a key will result in the attendant list - of s being applied to every member of - the proxied class. -

-
- -

- The following code snippets show examples of how to decorate the - members of a proxied class with one or more - s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary memAtts = new Hashtable(); - builder.MemberAttributes = memAtts; - - // applies a single Attribute to all members of the proxied class... - memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to all members of the proxied class... - memAtts ["*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - - // applies a single Attribute to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - Describes the operations that generates IL instructions - used to build the proxy type. - - Bruno Baia - - - - Generates the IL instructions that pushes - the proxy 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. - - - - The shared instance for this class (and derived classes). - - - - - Creates the proxy type. - - The generated proxy class. - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Creates an appropriate type builder. - - The name to use for the proxy type name. - The type to extends if provided. - The type builder to use. - - - - Applies attributes to the proxy class. - - The type builder to use. - The proxied class. - - - - - - Applies attributes to the proxied method. - - The method builder to use. - The proxied method. - - - - - - Applies attributes to the proxied method's return type. - - The method builder to use. - The proxied method. - - - - - Applies attributes to proxied method's parameters. - - The method builder to use. - The proxied method. - - - - - Calculates and returns the list of attributes that apply to the - specified type. - - The type to find attributes for. - - A list of custom attributes that should be applied to type. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method. - - The method to find attributes for. - - A list of custom attributes that should be applied to method. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method's return type. - - The method to find attributes for. - - A list of custom attributes that should be applied to method's return type. - - - - - - Calculates and returns the list of attributes that apply to the - specified method's parameters. - - The method to find attributes for. - The method's parameter to find attributes for. - - A list of custom attributes that should be applied to the specified method's parameter. - - - - - - Check that the specified object is matching the passed attribute type. - - -

- The specified object can be of different type : -

- - - - - - System.Reflection.CustomAttributeData (Only with .NET 2.0) - - - - - -
- The object instance to check. - The attribute type to test against. - - if the object instance matches the attribute type; - otherwise . - -
- - - Defines the types of the parameters for the specified constructor. - - The constructor to use. - The types for constructor's parameters. - - - - Implements constructors for the proxy class. - - - The builder to use. - - - - - Generates the proxy constructor. - - The constructor builder to use. - The IL generator to use. - The constructor to use. - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - if target virtual methods should not be proxied; - otherwise . - - - - - Gets the mapping of the interface to proxy - into the actual methods on the target type - that does not need to implement that interface. - - -

- If the target type does not implement the interface, - we return the interfaces methods as the target methods for many reasons : -

    -
  • - The target object can change for an object that implements the interface. - (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' - implementation in the Spring AOP framework for an example) -
  • -
  • - Allow Transparent proxies to be proxied. - (See Spring Remoting framework for an example) -
  • -
  • - Allow null target to be proxied. - (See Spring AOP framework which avoid calls to the target object - by intercepting all methods. Think "dynamic mock") - (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) -
  • -
-

-
- - The of the target object. - - The interface to implement. - - An interface mapping for the interface to proxy. - -
- - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - if only members declared at the level - of the supplied 's hierarchy should be proxied; - otherwise . - - - - - Implements the specified . - - The type builder to use. - The type the property is defined on. - The property to proxy. - The implemented methods map. - - - - Implements the specified event. - - The type builder to use. - The type the event is defined on. - The event to proxy. - The implemented methods map. - - - - Returns an array of s that represent - the proxiable interfaces. - - - An interface is proxiable if it's not marked with the - . - - - The array of interfaces from which - we want to get the proxiable interfaces. - - - An array containing the interface s. - - - - - Checks if specified interface is of a special type - that should never be proxied (i.e. ISerializable). - - Interface type to check. - - true if it is, false otherwise. - - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - -

- The default value of this property is the - . -

-
-
- - - Gets or sets the list of interfaces proxy should implement. - - - The default value of this property is all the interfaces - implemented or inherited by the target type. - - - - - Should we proxy target attributes? - - - - - - The list of custom s that the proxy - class must be decorated with. - - - - - - The custom s that the proxy - members must be decorated with. - - - - - - Implementation of IProxyMethodBuilder that delegates method calls to the base class. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Builds a proxy type using composition. - - - - In order for this builder to work, the target must implement - one or more interfaces. - - - Aleksandar Seovic - Bruno Baia - - - - Target instance calls should be delegated to. - - - - - Creates a new instance of the - class. - - - - - Creates a proxy that delegates calls to an instance of the - target object. - - -

- Only interfaces can be proxied using composition, so the target - must implement one or more interfaces. -

-
- The generated proxy class. - - If the - does not implement any interfaces. - -
- - - Create an to create interface implementations - - - - - Allows subclasses to generate additional code - - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Deaclares a field that holds the target object instance. - - - The builder to use for code generation. - - - - - Generates the proxy constructor. - - -

- This implementation creates instance of the target object for delegation - using constructor arguments. -

-
- The constructor builder to use. - The IL generator to use. - The constructor to delegate the creation to. -
- - - Gets or sets a value indicating whether interfaces should be implemented explicitly. - - - if they should be; otherwise, . - - - - - Allows easy access to existing and creation of new dynamic proxies. - - Aleksandar Seovic - Bruno Baia - - - - The name of the assembly that defines proxy types created. - - - - - The attributes of the proxy type to generate. - - - - - Creates an appropriate type builder. - - The proxy type name. - The type to extends if provided. - The type builder to use. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Builds a proxy type using inheritance. - - - - In order for this builder to work, target methods have to be either - , or belong to an interface. - - - Aleksandar Seovic - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Creates a proxy that inherits the proxied object's class. - - -

- Only (non-final) methods can be proxied, - unless they are members of one of the interfaces that target class - implements. In that case, methods will be proxied using explicit - interface implementation, which means that client code will have - to cast the proxy to a specific interface in order to invoke the - methods. -

-
- 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 proxy constructor. - - -

- This implementation delegates the call to a base class constructor. -

-
- The constructor builder to use. - The IL generator to use. - - The base class constructor to delegate the call to. - -
- - - Gets or sets a value indicating whether inherited members should be proxied. - - - if they should be; otherwise, . - - - - - This attribute can be used to mark interfaces that should not be proxied - - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Implementation of IProxyMethodBuilder that delegates method calls to target object. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Base class for dynamic members. - - Aleksandar Seovic - - - - Method attributes constant. - - - - - Sets up target instance for invocation. - - IL generator to use. - Type of target instance. - - - - Sets up invocation argument. - - IL generator to use. - Argument type. - Argument position. - - - - Generates method invocation code. - - IL generator to use. - Flag specifying whether method is static. - Flag specifying whether method is on the value type. - Method to invoke. - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Defines constructors that dynamic constructor class has to implement. - - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Safe wrapper for the dynamic constructor. - - - will attempt to use dynamic - constructor if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached constructor info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe constructor wrapper. - - Constructor to wrap. - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Factory class for dynamic constructors. - - Aleksandar Seovic - - - - Creates dynamic constructor instance for the specified . - - Constructor info to create dynamic constructor for. - Dynamic constructor for the specified . - - - - Defines methods that dynamic field class has to implement. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Safe wrapper for the dynamic field. - - - will attempt to use dynamic - field if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached fieldInfo or creates a new entry, if none is found. - - - - - Creates a new instance of the safe field wrapper. - - Field to wrap. - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Holds cached Getter/Setter delegates for a Field - - - - - Factory class for dynamic fields. - - Aleksandar Seovic - - - - Creates dynamic field instance for the specified . - - Field info to create dynamic field for. - Dynamic field for the specified . - - - - Defines methods that dynamic indexer class has to implement. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Safe wrapper for the dynamic indexer. - - - will attempt to use dynamic - indexer if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe indexer wrapper. - - Indexer to wrap. - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Internal PropertyInfo accessor. - - - - - Factory class for dynamic indexers. - - Aleksandar Seovic - - - - Prevent instantiation - - - - - Creates dynamic indexer instance for the specified . - - Indexer info to create dynamic indexer for. - Dynamic indexer for the specified . - - - - Defines methods that dynamic method class has to implement. - - - - - Invokes dynamic method on the specified target object. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Safe wrapper for the dynamic method. - - - will attempt to use dynamic - method if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe method wrapper. - - Method to wrap. - - - - Invokes dynamic method. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Gets the class, that declares this method - - - - - Factory class for dynamic methods. - - Aleksandar Seovic - - - - Creates dynamic method instance for the specified . - - Method info to create dynamic method for. - Dynamic method for the specified . - - - - Defines methods that dynamic property class has to implement. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Safe wrapper for the dynamic property. - - - will attempt to use dynamic - property if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached property info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe property wrapper. - - Property to wrap. - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Internal PropertyInfo accessor. - - - - - Holds cached Getter/Setter delegates for a Property - - - - - Factory class for dynamic properties. - - Aleksandar Seovic - - - - Creates safe dynamic property instance for the specified . - - -

This factory method will create a dynamic property with a "safe" wrapper.

-

Safe wrapper will attempt to use generated dynamic property if possible, - but it will fall back to standard reflection if necessary.

-
- Property info to create dynamic property for. - Safe dynamic property for the specified . - -
- - - Creates dynamic property instance for the specified . - - Property info to create dynamic property for. - Dynamic property for the specified . - - - - Represents a Get method - - the target instance when calling an instance method - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - Represents an Indexer Get method - - the target instance when calling an instance method - - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - - Represents a method - - the target instance when calling an instance method - arguments to be passed to the method - the value return by the method. null when calling a void method - - - - Represents a constructor - - arguments to be passed to the method - the new object instance - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Allows easy access to existing and creation of new dynamic relection members. - - Aleksandar Seovic - - - - The name of the assembly that defines reflection types created. - - - - - The attributes of the reflection type to generate. - - - - - Cache for dynamic property types. - - - - - Cache for dynamic field types. - - - - - Cache for dynamic indexer types. - - - - - Cache for dynamic method types. - - - - - Cache for dynamic constructor types. - - - - - Creates an appropriate type builder. - - - The base name to use for the reflection type name. - - The type builder to use. - - - - Returns dynamic property if one exists. - - Property to look up. - callback function that will be called to create the dynamic property - An for the given property info. - - - - Returns dynamic field if one exists. - - Field to look up. - callback function that will be called to create the dynamic field - An for the given field info. - - - - Returns dynamic indexer if one exists. - - Indexer to look up. - callback function that will be called to create the dynamic indexer - An for the given indexer. - - - - Returns dynamic method if one exists. - - Method to look up. - callback function that will be called to create the dynamic method - An for the given method. - - - - Returns dynamic constructor if one exists. - - Constructor to look up. - callback function that will be called to create the dynamic constructor - An for the given constructor. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG mode, per ConditionalAttribute rules. - - - - - Create a new Get method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field - - - - Create a new Set method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field. - - If the field's returns true, the returned method - will throw an when called. - - - - - Create a new Get method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to read the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new Set method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to write the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new method delegate for the specified method using - - the method to create the delegate for - a delegate that can be used to invoke the method. - - - - Creates a new delegate for the specified constructor. - - the constructor to create the delegate for - delegate that can be used to invoke the constructor. - - - - Creates a instance with the highest possible code access security. - - - If allowed by security policy, associates the method with the s declaring type. - Otherwise associates the dynamic method with . - - - - - Delegates a Method(object target, params object[] args) call to the actual underlying method. - - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Converts to an instance of if necessary to - e.g. avoid e.g. double/int cast exceptions. - - - - This method mimics the behavior of the compiler that - automatically performs casts like int to double in "Math.Sqrt(4)".
- See about implicit, widening type conversions on MSDN - Type Conversion Tables -
- - Note: is expected to be a value type! - -
-
- - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Indicates that an annotated class is a "component". - Such classes are considered as candidates for future features such - as auto-detection when using attribute-based configuration and assembly scanning. - - Other class-level annotations may be considered as identifying - a component as well, typically a special kind of component: - e.g. the Repository attribute. - - Mark Fisher - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the component. - - - - Gets or sets the name of the component - - The name of the component. - - - - Indicates that an annotated class is a "Repository" (or "DAO"). - - - A class with this attribute is eligible for Spring DataAccessException translation. A class - with the Repository attribute is also clarified as to its role in the overall application - architecture for the purpose of tools, aspects, etc. - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Rod Johnson - Jueren Hoeller - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the repository. - - - - Indicates that an annotated class is a "Service" (e.g. a business service facade). - - - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - - - - Implements by using . - - Erich Eichinger - - - - Specifies the contract a strategy must be implement to store and - retrieve data that is specific to the executing thread. - - - All implementations of this interface must treat keys case-sensitive. - - Erich Eichinger - - - - Retrieves an object with the specified . - - The name of the item. - - The object in the current thread's context associated with the - specified or null if no object has been stored previously - - - - - Stores a given object and associates it with the specified . - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - - If the object with the specified is not found, the method does nothing. - - The name of the object to remove. - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - - Acquire/Release protocol, base of many concurrency utilities. - - - -

objects isolate waiting and notification for particular logical - states, resource availability, events, and the like that are shared - across multiple threads.

- -

Use of s sometimes (but by no means always) adds - flexibility and efficiency compared to the use of plain - .Net monitor methods and locking, and are sometimes (but by no means - always) simpler to program with.

- -

Used for implementation of a

-
- - Doug Lea - Federico Spinazzi (.Net) -
- - Wait (possibly forever) until successful passage. - Fail only upon interuption. Interruptions always result in - `clean' failures. On failure, you can be sure that it has not - been acquired, and that no - corresponding release should be performed. Conversely, - a normal return guarantees that the acquire was successful. - - - - - Potentially enable others to pass. -

- Because release does not raise exceptions, - it can be used in `finally' clauses without requiring extra - embedded try/catch blocks. But keep in mind that - as with any java method, implementations may - still throw unchecked exceptions such as Error or NullPointerException - when faced with uncontinuable errors. However, these should normally - only be caught by higher-level error handlers. -

-
-
- - - Wait at most msecs to pass; report whether passed. -

- The method has best-effort semantics: - The msecs bound cannot - be guaranteed to be a precise upper bound on wait time in Java. - Implementations generally can only attempt to return as soon as possible - after the specified bound. Also, timers in Java do not stop during garbage - collection, so timeouts can occur just because a GC intervened. - So, msecs arguments should be used in - a coarse-grained manner. Further, - implementations cannot always guarantee that this method - will return at all without blocking indefinitely when used in - unintended ways. For example, deadlocks may be encountered - when called in an unintended context. -

-
- the number of milleseconds to wait - An argument less than or equal to zero means not to wait at all. - However, this may still require - access to a synchronization lock, which can impose unbounded - delay if there is a lot of contention among threads. - - true if acquired -
- - A latch is a boolean condition that is set at most once, ever. - Once a single release is issued, all acquires will pass. -

- Sample usage. Here are a set of classes that use - a latch as a start signal for a group of worker threads that - are created and started beforehand, and then later enabled. -

- - class Worker implements IRunnable { - private readonly Latch startSignal; - Worker(Latch l) - { - startSignal = l; - } - - public void Run() { - startSignal.acquire(); - DoWork(); - } - - void DoWork() { ... } - } - - class Driver { // ... - void Main() { - Latch go = new Latch(); - for (int i = 0; i < N; ++i) // make threads - new Thread(new ThreadStart(new Worker(go)).Start(); - DoSomethingElse(); // don't let run yet - go.Release(); // let all threads proceed - } - } - -
- Doug Lea - Federico Spinazzi (.Net) -
- - - can acquire ? - - - - - Method mainly used by clients who are trying to get the latch - - - - Wait at most msecs millisconds for a permit - - - - Enable all current and future acquires to pass - - - - - An abstraction to safely store "ThreadStatic" data. - - - By default, is used to store thread-specific data. - You may switch the storage strategy by calling .

- NOTE: Access to the underlying storage is not synchronized for performance reasons. - You should call only once at application startup! - - Erich Eichinger - - -

- Holds the current strategy. - - - Access to this variable is not synchronized on purpose for performance reasons. - Setting a different strategy should happen only once - at application startup. - -
- - - Set the new strategy. - - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - -

Base class for counting semaphores based on Semaphore implementation - from Doug Lea.

-
- - -

Conceptually, a semaphore - maintains a set of permits. Each acquire() blocks if - necessary until a permit is available, and then takes it.

- -

Each release adds a permit. However, no actual permit objects are used; - the Semaphore just keeps a count of the number available - and acts accordingly.

- -

A semaphore initialized to 1 can serve as a mutual exclusion lock.

- - Used for implementation of a -
- Doug Lea - Federico Spinazzi (.Net) -
- - - current number of available permits - - - - -

Create a Semaphore with the given initial number of permits.

-

Using a seed of 1 makes the semaphore act as a mutual - exclusion lock.

- -

Negative seeds are also allowed, - in which case no acquires will proceed until the number of - releases has pushed the number of permits past 0.

-
-
- - - Release a permit - - - - - Acquire a permit - - - - - Wait at most msecs millisconds for a permit - - number of ms to wait - true if aquired - - - Release N permits. release(n) is - equivalent in effect to: -
-            for (int i = 0; i < n; ++i) release();
-            
- But may be more efficient in some semaphore implementations. -
- if n is negative. - - -
- - Return the current number of available permits. - Returns an accurate, but possibly unstable value, - that may change immediately after returning. - - - - - Utility class to use an with the - C# using () {} idiom - - - - - Creates a new trying to the given - - - the to be held - - - - Creates a new trying to the given - - - the to be held - millisecond to try to acquire the lock - - - - Releases the held - - - - - initializes and acquire access to the - - - - - - Implements by using a hashtable. - - Erich Eichinger - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - Thrown by synchronization classes that report - timeouts via exceptions. The exception is treated - as a form (subclass) of InterruptedException. This both - simplifies handling, and conceptually reflects the fact that - timed-out operations are artificially interrupted by timers. - - - - - The approximate time that the operation lasted before - this timeout exception was thrown. - - - - - - 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. - - - 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. - - - - - Override of GetObjectData to allow for private serialization - - serialization info - streaming context - - - Constructs a TimeoutException with given duration value. - - - - - Constructs a TimeoutException with the - specified duration value and detail message. - - - - - Gets the approximate time that the operation lasted before - this timeout exception was thrown. - - - - A TimeoutSync is an adaptor class that transforms all - calls to acquire to instead invoke attempt with a predetermined - timeout value. - - - - - - the adapted sync - - - - - timeout value - - - - Create a TimeoutSync using the given Sync object, and - using the given timeout value for all calls to acquire. - - - - - Try to acquire the sync before the timeout - - In case a time out occurred - - - - - - - - - - - - - - Support to account for differences between java nad .NET: -
    -
-
-
- - - .NET threads have not a method to check if they have been interrupted. - Moreover, differently from java threads, when entering locked - blocks, Monitor, Sleep, SpinWait and so on, a - will be raised by the runtime. -

Spring.Threading classes usually call this method before entering a lock block, to mirror java code -

Usually this is non issue because the same exception will be raised entering the monitor - associated with the lock () -

-
- if the thread has been interrupted -
- - - Normalize the given so that - is is comparable with . - - Date. - - - - - - - - - the difference between millisecodns of the first and second date - - - - Returns the number of nanoseconds for the current value of - - Current number of nanoseconds - - - - Returns the number of nano seconds represented by the - - to use - Number of nano seconds for - - - - Returns a representing the number of nanoseconds passed in via . - - Number of nanoseconds. - representing the number of nanoseconds passed in. - - - - Placeholder for java.lang.System.currentTimeMillis - - The current machine time in milliseconds - - - - Has been interrupted this thread - - - - - Miscellaneous generic collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Various utility methods relating to the manipulation of arrays. - - Aleksandar Seovic - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Use this sort method instead of to overcome - bugs in Mono. - - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Tests equality of two single-dimensional arrays by checking each element - for equality. - - The first array to be checked. - The second array to be checked. - True if arrays are the same, false otherwise. - - - - Returns hash code for an array that is generated based on the elements. - - - Hash code returned by this method is guaranteed to be the same for - arrays with equal elements. - - - Array to calculate hash code for. - - - A hash code for the specified array. - - - - - Returns string representation of an array. - - - Array to return as a string. - - - String representation of the specified . - - - - - Concatenates 2 arrays of compatible element types - - - If either of the arguments is null, the other array is returned as the result. - The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. - - - - - Assertion utility methods that simplify things such as argument checks. - - -

- Not intended to be used directly by applications. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Checks, whether may be invoked on . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the method to test for - - if is null - - - if it is not possible to invoke on - - - - - checks, whether supports the methods of . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the type to test for - - if is null - - - if it is not possible to invoke methods of - type on - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - If the supplied is . - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is . - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - An arbitrary message that will be passed to any thrown . - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is , contains no elements or only null elements. - - The array or collection to check. - The argument name. - - If the supplied is , - contains no elements or only null elements. - - - - - Checks whether the specified can be cast - into the . - - - The argument to check. - - - The name of the argument to check. - - - The required type for the argument. - - - An arbitrary message that will be passed to any thrown - . - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - The exception message to use if the assertion fails. - - if expression is false - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - - if expression is false - - - - - Assert a bool expression, throwing InvalidOperationException - if the expression is false. - - a boolean expression. - The exception message to use if the assertion fails - if expression is false - - - - Creates a new instance of the class. - - -

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

-
-
- - - General utility methods for working with annotations - - - - - Find a single Attribute of the type 'attributeType' from the supplied class, - traversing it interfaces and super classes if no attribute can be found on the - class iteslf. - - - This method explicitly handles class-level attributes which are not declared as - inherited as well as attributes on interfaces. - - The class to look for attributes on . - Type of the attribibute to look for. - the attribute of the given type found, or null - - - - Miscellaneous collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Adds the specified to the specified . - - The collection to add the element to. - The object to add to the collection. - - - - Adds the specified to the specified . - - The enumerable to add the element to. - The object to add to the collection. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Converts an instance to an instance. - - The instance to be converted. - An instance in which its elements are the elements of the instance. - if the is null. - - - - Copies the elements of the to a - new array of the specified element type. - - The instance to be converted. - The element of the destination array to create and copy elements to - An array of the specified element type containing copies of the elements of the . - - - - Returns the first element contained in both, and . - - The implementation assumes that <<< - the source enumerable. may be null - the list of candidates to match against elements. may be null - the first element found in both enumerables or null - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a value of the given type found, or null if none. - If more than one value of the given type is found - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a collection of matching values of the given type found, empty if none found, or null if the input collection was null. - - - - Find a value of one of the given types in the given Collection, - searching the Collection for a value of the first type, then - searching for a value of the second type, etc. - - The collection to search. - The types to look for, in prioritized order. - a value of the given types found, or null if none - If more than one value of the given type is found - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified dictionary is null empty. - - The dictionary to check. - - true if the specified dictionary is empty or null; otherwise, false. - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A callback method used for comparing to items. - - - - the first object to compare - the second object to compare - Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. - - - - - - Utility class containing helper methods for object comparison. - - Aleksandar Seovic - - - Compares two objects. - First object. - Second object. - - 0, if objects are equal; - less than zero, if the first object is smaller than the second one; - greater than zero, if the first object is greater than the second one. - - - - Utility class for .NET configuration files management. - - Aleksandar Seovic - - - - Avoid BeforeFieldInit pitfall - - - - - Parses the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. - Object created by a corresponding . -
- - - Refresh the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. -
- - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Configuration exception. - - - - Creates the configuration exception. - - Configuration exception. - - - - Determines whether the specified exception is configuration exception. - - The exception to check. - - true if the specified exception is configuration exception; otherwise, false. - - - - - Returns the line number of the specified node. - - Node to get the line number for. - The line number of the specified node. - - - - Returns the name of the file specified node is defined in. - - Node to get the file name for. - The name of the file specified node is defined in. - - - - Sets the current to be used by . - - - íf implements , this method invokes - on the new configSystem to chain them.
- Note, that this method requires reflection on internals of -
- the configuration system to set - bypasses the check if the current system has already been initialized - the previous config system, if any -
- - - Resets the global configuration system instance. Use for unit testing only! - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Gets a string specifying the file/resource name related to the configuration details. - - - - - Gets an integer specifying the line number related to the configuration details. - - - - - Gets an integer specifying the line position related to the configuration details. - - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - An implementation, who's elements retain information - about their location in the original XML text document the were read from. - - - When loading a document, the used must implement . - Typical XmlReader implementations like support this interface. - - Erich Eichinger - - - - Overridden to create a retaining the current - text position information. - - - - - Overridden to create a retaining the current - text position information. - - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store null as their property. - - The XML source - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store as their property. - - - The new XmlNode or null if no more nodes exist. - - the name of the resource - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store null as their property. - - - The new XmlNode or null if no more nodes exist. - - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Get info about the current text position during loading a document. - Outside loading a document, the properties of - will always be null. - - - - - Holds the current text position during loading a document - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - Collects information on the constructor to use to create the instance and the argument instances to pass into the - constructor. - - - - - Initializes a new instance of the class. - - The constructor info. - The arg instances. - - - - Gets the constructor info. - - The constructor info. - - - - Gets the arg instances. - - The arg instances. - - - - Discovers the attributes of a - and provides access to the - s metadata. - - Rick Evans - - - - The method name associated with a delegate invocation. - - - - - Creates a new instance of the - class. - - - The event used to extract the delegate - from. - - - if the supplied is - . - - - - - Creates a new instance of the - class. - - - The delegate . - - - If the supplied is not a subclass of the - class, or is . - - - - - Checks to see if the method encapsulated by the supplied method - metadata is compatible with the method signature associated with - this delegate type. - - The method to be checked. - - if the method signature is compatible with - the signature of this delegate; if not, or - if the supplied parameter is - . - - - - - Gets the s of the parameters of the - method signature associated with this delegate type. - - -

- This method will never return ; the returned - array may be empty, but it most certainly - will not be . -

-
- - A array of the parameter - s; or the - array if the method signature has no parameters. - -
- - - Gets the return of the - method signature associated with this delegate type. - - The return . - - - - Gets the metadata about the method signature associated - with this delegate type. - - - The metadata about the method signature associated - with this delegate type. - - - - - Determines whether the supplied - is a type. - - - The to be checked. - - - if the supplied - is a ; - if not or the supplied - is . - - - - - Checks if the signature of the supplied - is compatible with the signature expected by the supplied - . - - The event to be checked against. - - The method signature to check for compatibility. - - - if the signature of the supplied - is compatible with the signature - expected by the supplied ; - if not or either of the supplied - parameters is . - - - - - - The of the delegate. - - - - - Use this class for obtaining instances for dynamic code generation. - - -

- The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. -

- - Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. - -
- -

The following excerpt from demonstrates usage:

- - public class DynamicProxyManager - { - public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; - - public static TypeBuilder CreateTypeBuilder(string name, Type baseType) - { - // Generates type name - string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); - ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); - return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); - } - } - -
- Erich Eichinger - - - -
- - - prevent instantiation - - - - - Returns the for the dynamic module within the specified assembly. - - - If the assembly does not exist yet, it will be created.
- This factory caches any dynamic assembly it creates - calling GetModule() twice with - the same name will *not* create 2 distinct modules! -
- The assembly-name of the module to be returned - the that can be used to define new types within the specified assembly -
- - - Persists the specified dynamic assembly to the file-system - - the name of the dynamic assembly to persist - - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Removes all registered s. - - - - - A utility class for raising events in a generic and consistent fashion. - - Rick Evans - - - - Create a new EventRaiser instance - - - - - Raises the event encapsulated by the supplied - , passing the supplied - to the event. - - The event to be raised. - The arguments to the event. - a map of sink/exception entries that occurred during event raising - - - - Invokes the supplied , passing the supplied - to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Raises events defensively. - - -

- Raising events defensively means that as the raised event is passed to each handler, - any thrown by a handler will be caught and silently - ignored. -

-
- Rick Evans -
- - - Defensively invokes the supplied , passing the - supplied to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Implement this interface to create your own, delegating - and set them using - - - - - - - - - - - A strategy for handling errors. This is especially useful for handling - errors that occur during asynchronous execution as in such cases it may not be - possible to throw the error to the original caller. - - Mark Fisher - Mark Pollack (.NET) - - - - Handles the error. - - The exception. - - - - Utility methods for IO handling - - - - - Copies one stream into another. - (Don't forget to call on the destination stream!) - - - Does not close the input stream! - - - - - Reads a stream into a byte array. - - - Does not close the input stream! - - - - - Various utility methods relating to numbers. - - -

- Mainly for internal use within the framework. -

-
- Aleksandar Seovic -
- - - Determines whether the supplied is an integer. - - The object to check. - - if the supplied is an integer. - - - - - Determines whether the supplied is a decimal number. - - The object to check. - - if the supplied is a decimal number. - - - - - Determines whether the supplied is of numeric type. - - The object to check. - - true if the specified object is of numeric type; otherwise, false. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to a number. - - The object to check. - - true if the specified object is decimal number; otherwise, false. - - - - - Is the supplied equal to zero (0)? - - The number to check. - - id the supplied is equal to zero (0). - - - - - Negates the supplied . - - The number to negate. - The supplied negated. - - If the supplied is not a supported numeric type. - - - - - Returns the bitwise not (~) of the supplied . - - The number. - The value of ~. - - If the supplied is not a supported numeric type. - - - - - Bitwise ANDs (&) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise ORs (|) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise XORs (^) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Adds the specified numbers. - - The first number. - The second number. - - - - Subtracts the specified numbers. - - The first number. - The second number. - - - - Multiplies the specified numbers. - - The first number. - The second number. - - - - Divides the specified numbers. - - The first number. - The second number. - - - - Calculates remainder for the specified numbers. - - The first number (dividend). - The second number (divisor). - - - - Raises first number to the power of the second one. - - The first number. - The second number. - - - - Coerces the types so they can be compared. - - The right. - The left. - - - - Creates a new instance of the class. - - -

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

-
-
- - - Helper methods with regard to objects, types, properties, etc. - - -

- Not intended to be used directly by applications. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The instance for this class. - - - - - An empty object array. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Instantiates the type using the assembly specified to load the type. - - This is a convenience in the case of needing to instantiate a type but not - wanting to specify in the string the version, culture and public key token. - The assembly. - Name of the type. - - - If the or is - - - If cannot load the type from the assembly or the call to InstantiateType(Type) fails. - - - - - Convenience method to instantiate a using - its no-arg constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The to instantiate* - - A new instance of the . - - If the is - - - If the is an abstract class, an interface, - an open generic type or does not have a public no-argument constructor. - -
- - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. - - - - - Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains - open generic type parameters. - - The type. - - - - Convenience method to instantiate a using - the given constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The constructor to use for the instantiation. - - - The arguments to be passed to the constructor. - - A new instance. - - If the is - - - If the 's declaring type is an abstract class, - an interface, an open generic type or does not have a public no-argument constructor. - -
- - - Checks whether the supplied is not a transparent proxy and is - assignable to the supplied . - - -

- Neccessary when dealing with server-activated remote objects, because the - object is of the type TransparentProxy and regular is testing for assignable - types does not work. -

-

- Transparent proxy instances always return when tested - with the 'is' operator (C#). This method only checks if the object - is assignable to the type if it is not a transparent proxy. -

-
- The target to be checked. - The value that should be assigned to the type. - - if the supplied is not a - transparent proxy and is assignable to the supplied . - -
- - - Determine if the given is assignable from the - given value, assuming setting by reflection and taking care of transparent proxies. - - -

- Considers primitive wrapper classes as assignable to the - corresponding primitive types. -

-

- For example used in an object factory's constructor resolution. -

-
- The target . - The value that should be assigned to the type. - True if the type is assignable from the value. -
- - - Check if the given represents a - "simple" property, - i.e. a primitive, a , a - , or a corresponding array. - - -

- Used to determine properties to check for a "simple" dependency-check. -

-
- - The to check. - -
- - - Check if the given class represents a primitive array, - i.e. boolean, byte, char, short, int, long, float, or double. - - - - - Determines whether the specified array is null or empty. - - The array to check. - - true if the specified array is null empty; otherwise, false. - - - - - Determine if the given objects are equal, returning - if both are respectively - if only one is . - - The first object to compare. - The second object to compare. - - if the given objects are equal. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - If the supplied is . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - If the supplied is . - - - - - Gets the qualified name of the given method, consisting of - fully qualified interface/class name + "." method name. - - The method. - qualified name of the method. - - - - Return a String representation of an object's overall identity. - - The object (may be null). - The object's identity as String representation, - or an empty String if the object was null - - - - - Gets a hex String form of an object's identity hash code. - - The obj. - The object's identity code in hex notation - - - - Support matching of file system paths in a manner similar to that of the - NAnt FileSet. - - -

- Any (back)slashes are converted to forward slashes. -

-
- - - // true - PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); - PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); - PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); - // false - PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); - - - Federico Spinazzi -
- - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - should the match consider the case - - if the path is matched by the pattern; - otherwise . - - - - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - - if the path is matched by the pattern; - otherwise . - - - - - Replaces back(slashes) with forward slashes. - - - The path or the pattern to modify. - - A forward-slashed string. - - - - Helper method to convert a NAnt-like pattern into the - appropriate pattern for a regular expression. - - The NAnt-like pattern. - A regex-compatible pattern. - - - - Creates a new instance of the class. - - -

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

-
-
- - Utility methods for simple pattern matching, in particular for - Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. - - Juergen Hoeller - Mark Pollack - - - Match a String against the given pattern, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the pattern to match against - - the String to match - - whether the String matches the given pattern - - - - Match a String against the given patterns, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the patterns to match against - - the String to match - - whether the String matches any of the given patterns - - - - - An implementation of the Java Properties class. - - - For the complete syntax see java.util.Properties JavaDoc. - This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. - - - key1 = value - key2: - key3 - - will result in the name/value pairs: - - key1:="value" - key2:=string.Empty - key3:=<null> - - note, that to specify a null value, the key must not be followed by any character except newline. - - - Simon White - - - - Creates an empty property list with no default values. - - - - - Creates a property list with the specified initial properties. - - The initial properties. - - - - Reads a property list (key and element pairs) from the input stream. - - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - The text reader to load from. - - - - Reads a property list (key and element pairs) from the input stream. - - the dictionary to put it in - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - the dictionary to put it in - The text reader to load from. - - - - Strips whitespace from the front of the specified string. - - The string. - The string with all leading whitespace removed. - - - - Splits the specified string into a key / value pair. - - The line to split. - An array containing the key / value pair. - - - - Searches for the property with the specified key in this property list. - - The key. - The property, or null if the key was not found. - - - - Searches for the property with the specified key in this property list. - - The key. - - The default value to be returned if the key is not found. - - The property, or the default value. - - - - Writes this property list out to the specified stream. - - The stream to write to. - - - - Sets the specified property key / value pair. - - The key. - The value. - - - - Writes the properties in this instance out to the supplied stream. - - The stream to write to. - Arbitrary header information. - - - - Removes the key / value pair identified by the supplied key. - - - The key identifying the key / value pair to be removed. - - - - - Adds the specified key / object pair to this collection. - - The key. - The value. - - - - Adds the specified key / object pair to this collection. - - - - - Various reflection related methods that are missing from the standard library. - - Rod Johnson - Juergen Hoeller - Aleksandar Seovic (.NET) - Stan Dvoychenko (.NET) - Bruno Baia (.NET) - - - - Convenience value that will - match all private and public, static and instance members on a class - in a case inSenSItivE fashion. - - - - - Avoid BeforeFieldInit problem - - - - - Checks, if the specified type is a nullable - - - - - Returns signature for the specified , method name and argument - s. - - The the method is in. - The method name. - - The argument s. - - The method signature. - - - - Returns method for the specified , method - name and argument - s. - - - Searches with BindingFlags - When dealing with interface methods, you probable want to 'normalize' method references by calling - . - - - - The target to find the method on. - - The method to find. - - The argument s. May be - if the method has no arguments. - - The target method. - - - - - Resolves a given to the representing the actual implementation. - - - see article How To Get an Explicit Interface Implementation Method. - - a - the type to lookup - the representing the actual implementation method of the specified - - - - Returns an array of parameter s for the specified method - or constructor. - - The method (or constructor). - An array containing the parameter s. - - If is . - - - - - Returns an array of parameter s for the - specified parameter info array. - - The parameter info array. - An array containing parameter s. - - If is or any of the - elements is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The method. - An array containing the parameter names. - - If is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The parameter info array. - An array containing parameter names. - - If is or any of the - elements is . - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the type of method (used for exception reporting only) - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of constructors, selects the constructor having an exact match on the given ' types. - - the list of constructors to choose from - the arguments to the method - the constructor matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - Packages arguments into argument list containing parameter array as a last argument. - - Argument vaklues to package. - Total number of oarameters. - Type of the param array element. - Packaged arguments. - - - - Convenience method to convert an interface - to a array that contains - all the interfaces inherited and the specified interface. - - The interface to convert. - An array of interface s. - - If the specified is not an interface. - - - If is . - - - - - Is the supplied the default indexer for the - supplied ? - - - The name of the property on the supplied to be checked. - - - The to be checked. - - - if the supplied is the - default indexer for the supplied . - - - If the supplied is . - - - - - Is the supplied declared on one of these interfaces? - - The method to check. - The array of interfaces we want to check. - - if the method is declared on one of these interfaces. - - - If any of the s specified is not an interface. - - - If or any of the specified interfaces is - . - - - - - Returns the default value for the specified - - -

- Follows the standard .NET conventions for default values where - relevant; for example, all numeric types default to the value - 0. -

-
- - The to return default value for. - - - The default value for the specified . - - - If the supplied is an enumerated type that - has no values. - -
- - - Returns an array consisting of the default values for the supplied - . - - - The array of s to return default values for. - - - An array consisting of the default values for the supplied - . - - - If any of the elements in the supplied - array is an enumerated type that has no values. - - - - - - Checks that the parameter s of the - supplied match the parameter - s of the supplied - . - - The method to be checked. - - The array of parameter s to check against. - - - if the parameter s - match. - - - - - Returns an array containing the s of the - objects in the supplied array. - - - The objects array for which the corresponding s - are needed. - - - An array containing the s of the objects - in the supplied array; this array will be empty (but not - if the supplied - is null or has no elements. - - -

- [C#]
- Given an array containing the following objects, - [83, "Foo", new object ()], the - array returned from this method call would consist of the following - elements... - [Int32, String, Object]. -

-
-
- - - Given the return its representation as - it would appear in the source code files. - - - Largely intended to handle generic types where .ToString() will typically return: - "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" - and this method will instead return: - "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" - - The type. - Friendly string representing the Type - - - - Does the given and/or it's superclasses - have at least one or more methods with the given name (with any - argument types)? - - -

- Includes non-public methods in the methods searched. -

-
- - The to be checked. - - - The name of the method to be searched for. Case inSenSItivE. - - - if the given or / and it's - superclasses have at least one or more methods (with any argument types); - if not, or either of the parameters is . - -
- - - Within , counts the number of overloads for the method with the given (case-insensitive!) - - The type to be searched - the name of the method for which overloads shall be counted - The number of overloads for method within type - - - - Creates a . - - -

- Note that if a non- - is supplied, any read write properties exposed by the - will be used to overwrite values that may have been passed in via the - . That is, the will be used - to initialize the custom attribute, and then any read-write properties on the - will be plugged in. -

-
- - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - If the parameter is . - - - If the parameter is not a - that derives from the class. - - -
- - - Creates a . - - - The desired . - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - - - Creates a . - - - The source attribute to copy properties from. - - A custom attribute builder. - - If the supplied is - . - - - - - Creates a . - - - The desired . - - A custom attribute builder. - - - - Creates a . - - - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - A custom attribute builder. - - - - Creates a . - - - The to create - the custom attribute builder from. - - A custom attribute builder. - - - - Calculates and returns the list of attributes that apply to the - specified type or method. - - The type or method to find attributes for. - - A list of custom attributes (CustomAttributeData or Attribute instances) - that should be applied to type or method. - - - - - Tries to find matching methods in the specified - for each method in the supplied list. - - - The to look for matching methods in. - - The methods to match. - - A flag that specifies whether to throw an exception if a matching - method is not found. - - A list of the matched methods. - - If either of the or - parameters are . - - - - - Returns the of the supplied - . - - -

- If the is a - instance, the return value of this method call with be the - parameter cast to a - . If the is - anything other than a , the return value - will be the result of invoking the 's - method. -

-
- - A or instance. - - - The argument if it is a - or the result of invoking - on the argument if it - is an . - - - If the is . - -
- - - Unwraps the supplied - and returns the inner exception preserving the stack trace. - - - The to unwrap. - - The unwrapped exception. - - - - Is the supplied can be accessed outside the assembly ? - - The type to check. - - if the type can be accessed outside the assembly; - Otherwise . - - - - - Determines whether the specified type is nullable. - - The type. - - true if the specified type is ullable]; otherwise, false. - - - - - Is the supplied can be accessed - from the supplied friendly assembly ? - - The type to check. - The friendly assembly name. - - if the type can be accessed - from the supplied friendly assembly; Otherwise . - - - - - Gets all of the interfaces implemented by - the specified . - - - The object to get the interfaces of. - - - All of the interfaces implemented by the - . - - - - - Returns the explicit that is the root cause of an exception. - - - If the InnerException property of the current exception is a null reference - or a , returns the current exception. - - The last exception thrown. - - The first explicit exception thrown in a chain of exceptions. - - - - - Copies all fields from one object to another. - - - The types of both objects must be related. This means, that either of the following is true: - - fromObject.GetType() == toObject.GetType() - fromObject.GetType() is derived from toObject.GetType() - toObject.GetType() is derived from fromObject.GetType() - - - The source object - The object, who's fields will be populated with values from the source object - If the object's types are not related - - - - Convenience method that uses reflection to return the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to retrieve the field value. - Name of the field on the object from which to retrieve the value. - - - - - Convenience method that uses reflection to set the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to set the field value. - Name of the field on the object to which to set the value. - The field value to set. - - - - Creates a . - - Bruno Baia - - - - Creates a new instance of the - class. - - The custom attribute type. - - - - Creates a new instance of the - class. - - The custom attribute type. - The custom attribute constructor arguments. - - - - Adds the specified values to the constructor argument list - used to create the custom attribute. - - An array of argument values. - - - - Adds a property value to the custom attribute. - - The property name. - The property value. - - - - Creates the . - - The created . - - - - Utility class to be used from within this assembly for executing security critical code - NEVER EVER MAKE THIS PUBLIC! - - Erich Eichinger - - - - Miscellaneous utility methods. - - -

- Mainly for internal use within the framework. -

-
- Rod Johnson - Juergen Hoeller - Keith Donald - Aleksandar Seovic (.NET) - Mark Pollack (.NET) - Rick Evans (.NET) - Erich Eichinger (.NET) -
- - - The string that signals the start of an Ant-style expression. - - - - - The string that signals the end of an Ant-style expression. - - - - - An empty array of instances. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - An array of the tokens. -
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - - - Pairs of quote characters. within a pair of quotes are ignored - - An array of the tokens. -
- - - Convert a CSV list into an array of s. - - - Values may also be quoted using doublequotes. - - A CSV list. - - An array of s, or the empty array - if is . - - - - - Take a which is a delimited list - and convert it to a array. - - -

- If the supplied is a - or zero-length string, then a single element - array composed of the supplied - will be - eturned. If the supplied - is , then an empty, - zero-length array will be returned. -

-
- - The to be parsed. - - - The delimeter (this will not be returned). Note that only the first - character of the supplied is used. - - - An array of the tokens in the list. - -
- - - Convenience method to return an - as a delimited - (e.g. CSV) . - - - The to parse. - - - The delimiter to use (probably a ','). - - The delimited string representation. - - - - Convenience method to return an - as a CSV - . - - - The to display. - - The delimited string representation. - - - - Convenience method to return an array as a CSV - . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - - - Convenience method to return a - array as a delimited (e.g. CSV) . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - The delimiter to use (probably a ','). - - - - Checks if a string has length. - - The string to check, may be . - - - if the string has length and is not - . - - - - StringUtils.HasLength(null) = false - StringUtils.HasLength("") = false - StringUtils.HasLength(" ") = true - StringUtils.HasLength("Hello") = true - - - - - - Checks if a has text. - - -

- More specifically, returns if the string is - not , it's is > - zero (0), and it has at least one non-whitespace character. -

-
- - The string to check, may be . - - - if the is not - , - > zero (0), and does not consist - solely of whitespace. - - - - StringUtils.HasText(null) = false - StringUtils.HasText("") = false - StringUtils.HasText(" ") = false - StringUtils.HasText("12345") = true - StringUtils.HasText(" 12345 ") = true - - -
- - - Checks if a is - or an empty string. - - -

- More specifically, returns if the string is - , it's is equal - to zero (0), or it is composed entirely of whitespace - characters. -

-
- - The string to check, may (obviously) be . - - - if the is - , has a length equal to zero (0), or - is composed entirely of whitespace characters. - - - - StringUtils.IsNullOrEmpty(null) = true - StringUtils.IsNullOrEmpty("") = true - StringUtils.IsNullOrEmpty(" ") = true - StringUtils.IsNullOrEmpty("12345") = false - StringUtils.IsNullOrEmpty(" 12345 ") = false - - -
- - - Returns , if it contains non-whitespaces. null otherwise. - - - - - Strips first and last character off the string. - - The string to strip. - The stripped string. - - - - Returns a list of Ant-style expressions from the specified text. - - The text to inspect. - - A list of expressions that exist in the specified text. - - - If any of the expressions in the supplied - is empty (${}). - - - - - Replaces Ant-style expression placeholder with expression value. - - -

- -

-
- The string to set the value in. - The name of the expression to set. - The expression value. - - A new string with the expression value set; the - value if the supplied - is , has a length - equal to zero (0), or is composed entirely of whitespace - characters. - -
- - - Surrounds (prepends and appends) the string value of the supplied - to the supplied . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The prefix and suffix that respectively will be prepended and - appended to the target . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - The surrounded string. -
- - - Surrounds (prepends and appends) the string values of the supplied - and to the supplied - . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The value that will be prepended to the . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - - The value that will be appended to the . If this value - is not a value, it's attendant - value will be used. - - The surrounded string. -
- - - Converts escaped characters (for example "\t") within a string - to their real character. - - The string to convert. - The converted string. - - - - Utility class containing miscellaneous system-level functionality. - - Aleksandar Seovic - - - - Registers assembly resolver that iterates over the - assemblies loaded into the current - in order to find an assembly that cannot be resolved. - - - This method has to be called if you need to serialize dynamically - generated types in transient assemblies, such as Spring AOP proxies, - because standard .NET serialization engine always tries to load - assembly from the disk. - - - - - Returns true if running on Mono - - Tests for the presence of the type Mono.Runtime - - - - Returns true if running on CLR 4.0 under InProc SxS mode - - - - - Gets the thread id for the current thread. Use thread name is available, - otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and - CurrentThread.ManagedThreadId otherwise. - - The thread id. - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Creates a new TextPositionInfo instance. - - - - - Creates a new TextPositionInfo instance, copying values from another instance. - - - - - The filename related to this text position - - - - - The line number related to this text position - - - - - The line position related to this text position - - - - - UniqueKey allows for generating keys unique to a type or particular instance and a partial name, - that can e.g. be used as keys in . - - - // shows usage type-scoped keys - UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); - UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); - - HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; - Assert.AreEqual( "some value unique for class A having key 'myKey'", value); - - HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; - Assert.AreEqual( "some value unique for class B having key 'myKey'", value); - - - - - Initialize a new instance of from its string representation. - See and See for details. - - The string representation of the new instance. - - - - Compares this instance to another. - - - - - Compares this instance to another. - - - - - Returns the hash code for this key. - - - - - - Returns a string representation of this key. - - - - - Creates a new key instance unique to the given instance. - - The instance the key shall be unique to - The partial key to be made unique - - - If is of type - - - - Creates a new key instance unique to the given type. - - The type the key shall be unique to - The partial key to be made unique - - - - Returns a key unique for the given instance. - - The instance the key shall be unique to - The partial key to be made unique - A key formatted as typename[instance-id].partialkey - - - - Returns a key unique for the given type. - - The type the key shall be unique to - The partial key to be made unique - A key formatted as typename.partialkey - - - - XML utility methods. - - Aleksandar Seovic - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - to be used for resolving external references - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - - A non-validating implementation. - - - - - Implementation of that adds error message - to the validation errors container. - - Aleksandar Seovic - - - - Abstract base class that should be extended by all - validation actions. - - -

- This class implements template Execute method - and defines OnValid and OnInvalid methods that - can be overriden - by specific validation actions. -

-
- Aleksandar Seovic -
- - - An action that should be executed after validator is evaluated. - - -

- This interface allows us to define the actions that should be executed - after validation in a generic fashion. -

-

- For example, addition of error messages to validation errors collection - is performed by one specific implementation of this interface, . -

-
- Aleksandar Seovic -
- - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Initializes a new instance of the class. - - - - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is not valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Evaluates 'when' expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - Error message resource identifier. - Names of the error providers this message should be added to. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Resolves the error message. - - Validation context to resolve message parameters against. - Additional context parameters. - Resolved error message - - - - Resolves the message parameters. - - List of parameters to resolve. - Validation context to resolve parameters against. - Additional context parameters. - Resolved message parameters. - - - - Sets the expressions that should be resolved to error message parameters. - - The expressions that should be resolved to error message parameters. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression that defines the exception to throw when the validator is not valid. - - - - Initializes a new instance of the class with an expression - that defines the exception to throw. - - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the exception to throw - - The throws. - - - - Implementation of that allows you - to define Spring.NET expressions that should be evaluated after - validation. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression to execute when validator is valid. - - The expression to execute when validator is valid. - - - - Gets or sets the expression to execute when validator is not valid. - - The expression to execute when validator is not valid. - - - - Implementation of the custom configuration parser for validator definitions. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parses the validator definition. - - Validator's identifier. - The element to parse. - The parser helper. - Validator object definition. - - - - Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with - the parsed value. - - - - - Parses and potentially registers a validator. - - - Only validators that have id attribute specified are registered - as separate object definitions within application context. - - Validator XML element. - The parser helper. - Validator object definition. - - - - Gets the name of the object type for the specified element. - - The element. - The name of the object type. - - - - Creates an error message action based on the specified message element. - - The message element. - The parser helper. - The error message action definition. - - - - Creates a generic action based on the specified element. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Creates object definition for the validator reference. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Evaluates validator test using condition evaluator. - - Aleksandar Seovic - - - - Base class that defines common properties for all single validators. - - -

- Custom single validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class that defines common properties for all validators. - - -

- Custom validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - An object that can validate application-specific objects. - - -

- The primary motivation for this interface is to enable validation to be - decoupled from the (user) interface and placed in business objects. -

-

- Application developers writing their own custom - implementations will - typically not implement this interface directly. In most cases, custom - validators woud be better served deriving from the - class, with the - custom validation ligic being implemented in an override of the - - - template method. -

-
- Aleksandar Seovic - -
- - - Validates the specified object. - - The object to validate. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Evaluates when expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Processes the error messages. - - Whether validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Gets or sets the validation actions. - - The actions that should be executed after validation. - - - - Creates a new instance of the validator without any - and criteria - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates test object. - - Object to validate. - True if specified object is valid, False otherwise. - - - - Evaluates test expression. - - Root context to use for expression evaluation. - Additional context parameters. - Result of the test expression evaluation, or validation context if test is null. - - - - Gets or sets the test expression. - - The test expression. - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Evaluates the test using condition evaluator. - - -

- Test can be any logical expression that is supported by the Spring.NET logical - expression evaluation engine, and can use any variables that can be resolved - by the variable resolver used by the validation engine. -

-
- The object to validate. - - if the supplied is valid. - -
- - - Perform credit card validations. - - - By default, all supported card types are allowed. You can specify - which credit card type validator should be used by setting - the value of property to a concrete - instance. - - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid credit card number. - - The object to validate. - - if the supplied is valid - credit card number. - - - - - Checks if the is a valid credit card number. - - - The card number to validate. - - - true if the card number is valid. - - - - - Validates card number with the specified validator. - - - Credit card number to validate. - - - true if credit card number is a valid number of credit card type specified. - - - - - Checks for a valid credit card number. - - - Credit Card Number. - - - true if the card number passes the LuhnCheck. - - - - - Credit card type validator to use. - - - Can be concrete implementations of - interface. The following are available implementations: - , , , - . - - - - - CreditCardType interface defines how validation is performed - for one type/brand of credit card. - - - - - Returns true if the card number matches this type of - credit card. - - - The card number, never null. - - - true if the number matches. - - - - - Visa credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a visa number. - - - - - American Express credit card type validation support. - - - - - Indicates, wheter the given credit card number matches an amex number. - - - - - Discover credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a discover number. - - - - - Mastercard credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a mastercard number. - - - - - Perform email validations. - - -

- This implementation is not guaranteed to catch all possible errors in an - email address. For example, an address like nobody@noplace.nowhere will - pass validator, even though there is no TLD "nowhere". - - Goran Milosavljevic - - -

- Creates a new instance of the EmailValidator class. - -
- - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid e-mail address. - - The object to validate. - - if the supplied is valid - e-mail address. - - - - - Regular expression used for validation of object passed to this . - - - - - Validates that the object is valid ISBN-10 or ISBN-13 value. - - Goran Milosavljevic - - - - Creates a new instance of the ISBNValidator class. - - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the ISBN-10 or - ISBN-13 validation rules. - - The object to validate. - - if the supplied is valid ISBN. - - - - - Validates against ISBN-10 or ISBN-13 validation - rules. - - - ISBN string to validate. - - - true if is a valid ISBN-10 or ISBN-13 code. - - - - - ISBN-10 consists of 4 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 1-5 characters, second 1-7, third 1-6, - and fourth is 1 digit or an X. - - - - - ISBN-13 consists of 5 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 978 or 979, the second group is - 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. - - - - - Validates that object matches specified regular expression. - - -

- The test expression must evaluate to a ; - otherwise, an exception is thrown. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Validates an object. - - Object to validate. - - if the supplied - object is valid. - - - If the supplied is not a - - - - - - The regular expression text to match against. - - The regular expression text. - - - - Gets or sets a value indicating whether to do a partial match instead of a full match. - Default is false. - - - - - The for the regular expression evaluation. - - The regular expression evaluation options. - - - - - Validates that required value is not empty. - - -

- This validator uses following rules to determine if target value is valid: - - - - - - - - - - - - - - - - - - - - - - - - - -
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
-

-

- You cannot use this validator to validate any value types other than the ones - specified in the table above. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a variable expression that will be evaluated and the object - obtained as a result of this evaluation will be tested using the rules described - in the class overview of the - class. - - The object to validate. - - if the supplied is valid. - - - - - Validates that the value is valid URL. - - Goran Milosavljevic - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the URL validation rules. - - The object to validate. - - if the supplied is valid. - - - - - Regular expression used for validation of object passed to this . - - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one or more of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

Note, that defaults to true for this validator type!

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class for composite validators - - - - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the child validators. - - The validators. - - - - When set true, shortcircuits evaluation. - - - Setting this property true causes the evaluation process to prematurely abort - if the end result is known. Any remaining child validators will not be considered then. - Setting this value false causes implementations to evaluate all child validators, regardless - of the potentially already known result. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - implementation that supports validating collections. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid for all of the objects in the specified collection. -

-

- You can specify if you want to validate all of the collection elements regardless of the errors by - setting the property to false. -

-

Note, that defaults to true for this validator type!

-

- If you set the IncludeElementErrors property to true, - ValidationErrors collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. -

-
- Damjan Tomic - Aleksandar Seovic -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The bool that determines if all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Validates the specified collection of objects. - If the IncludeElementErrors property was set to true, - collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. - - The collection to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the value that indicates whether to validate all elements of the collection - regardless of the errors. - - This is just an alias for property - - - - Gets or sets the value that indicates whether to capture all the errors of the specific - elements of the collection - - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one and only one of the validators in the Validators collection are valid -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

- By default, this validator group uses == true semantics. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - An interface that validation errors containers have to implement. - - Aleksandar Seovic - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied error . - - -

- If there are no errors for the supplied , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all error providers. - - - - - Allows developers to specify which validator should be used - to validate method argument. - - Damjan Tomic - Aleksandar Seovic - - - - Creates an attribute instance. - - - The name of the validator to use (must be defined within - Spring application context). - - - - - Gets the name of the validator to use. - - The name of the validator to use. - - - - A container for validation errors. - - -

- This class groups validation errors by validator names and allows - access to both the complete errors collection and to the errors for a - certain validator. -

-
- Aleksandar Seovic - Goran Milosavljevic -
- - - Default constructor. - - - - - This property is reserved, apply the - - to the class instead. - - - An that describes the - XML representation of the object that is produced by - the - method and consumed by the - - method. - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all providers. - - - - - Thrown by the validation advice if the method parameters validation fails. - - Aleksandar Seovic - - - - Creates a new instance of the ValidationException class. - - - - - Creates a new instance of the ValidationException class with - specified validation errors. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the ValidationException class with the - specified message and validation errors. - - - A message about the exception. - - - Validation errors. - - - - - Creates a new instance of the ValidationException 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 ValidationException class with the - specified message, root cause and validation errors. - - - A message about the exception. - - - The root exception that is being wrapped. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Implements object serialization. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Gets validation errors. - - Validation errors. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Represents a reference to an externally defined validator object - - -

- This class allows validation groups to reference validators that - are defined outside of the group itself. -

-

- It also allows users to narrow the context for the referenced validator - by specifying value for the Context property. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the name of the referenced validator. - - The name of the referenced validator. - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - 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. - -
- - + + + + Spring.Core + + + + + An abstract implementation that can + be used as base class for concrete implementations. + + Aleksandar Seovic + Erich Eichinger + + + + Defines a contract that all cache implementations have to fulfill. + + Aleksandar Seovic + Erich Eichinger + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method have no expiration time + and default cache priority. + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method use the default + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + If equals , + or is true, this cache + instance's value will be applied. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Actually does the cache implementation specific insert operation into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Gets/Set the Default time-to-live (TTL) for items inserted into this cache. + Used by + + + + + Gets/Sets a value, whether the this cache instance's + shall be applied to all items, regardless of their individual TTL + when is called. + + + + + Gets the number of items in the cache. + + + May be overridden by subclasses for cache-specific efficient implementation. + + + + + Gets a collection of all cache item keys. + + + + + Abstract base class containing shared properties for all cache attributes. + + Aleksandar Seovic + + + + The instance used to parse values. + + + + + + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + The cache key cannot evaluate be null or an empty string. + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the cache key for the item. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + Gets an expression instance that should be evaluated in order + to determine the cache key for the item. + + + An expression instance that should be evaluated in order to determine + the cache key for the item. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether the item should be cached. + + + An expression string that should be evaluated in order to determine + whether the item should be cached. + + + + + Gets an expression instance that should be evaluated in order + to determine whether the item should be cached. + + + An expression instance that should be evaluated in order to determine + whether the item should be cached. + + + + + The amount of time an object should remain in the cache. + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache + formatted to be recognizable by . + + + + + The amount of time an object should remain in the cache (in seconds). + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache (in seconds). + + + + + This attribute should be used to mark methods whose argument(s) + need to be cached. + + +

+ This attribute allows application developers to specify that an argument + of the method should be cached, but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheParameterAdvice to + all of the members that have this attribute defined. +

+

+ You can specify this attribute multiple times on the same method in order to + cache several method parameters. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark methods whose result + needs to be cached. + + +

+ This attribute allows application developers to mark that a result + of the method invocation should be cached, but it will not do any + caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used with methods that return an + in order to cache each item separately. + + +

+ This attribute allows application developers to specify that each item + from the collection returned by the method should be cached, + but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark method that should + invalidate one or more cache items when invoked. + + +

+ This attribute allows application developers to specify that some + cache items should be evicted from cache when the method is invoked, + but it will not do any eviction by itself. +

+

+ In order to actually evict cache items, an application developer + must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression string that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether items should be evicted. + + + An expression string that should be evaluated in order to determine + whether items should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine whether items should be evicted. + + + An expression instance that should be evaluated in order to determine + whether items should be evicted. + + + + + A simple implementation backed by a dictionary that + never expires cache items. + + Aleksandar Seovic + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL) in milliseconds. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + +

DictionarySet is an abstract class that supports the creation of new Set + types where the underlying data store is an IDictionary instance.

+ +

You can use any object that implements the IDictionary interface to hold set data. + You can define your own, or you can use one of the objects provided in the Framework. + The type of IDictionary you choose will affect both the performance and the behavior + of the Set using it.

+ +

To make a Set typed based on your own IDictionary, simply derive a + new class with a constructor that takes no parameters. Some Set implmentations + cannot be defined with a default constructor. If this is the case for your class, + you will need to override Clone() as well.

+ +

It is also standard practice that at least one of your constructors takes an ICollection or + an ISet as an argument.

+
+
+ +

A collection that contains no duplicate elements. This class models the mathematical + Set abstraction, and is the base class for all other Set implementations. + The order of elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + Operator + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + | + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + & + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + ^ + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + - + + +
+
+ + +

A collection that contains no duplicate elements. This interface models the mathematical + Set abstraction. + The order of elements in a set is dependent on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guaranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns if this set contains no elements. + + + + + A collection that contains no duplicate elements. + + +

+ This interface models the mathematical + abstraction. The order of + elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various + methods, and thus is not + guaranteed. +

+

+ overrides the + method to test for "equivalency": + whether the two sets contain the same elements. The "==" and "!=" + operators are not overridden by design, since it is often desirable to + compare object references for equality. +

+

+ Also, the method is not + implemented on any of the set implementations, since none of them are + truly immutable. This is by design, and it is the way almost all + collections in the .NET framework function. So as a general rule, don't + store collection objects inside + instances. You would typically want to use a keyed + instead. +

+

+ None of the implementations in + this library are guaranteed to be thread-safe in any way unless wrapped + in a . +

+

+ The following table summarizes the binary operators that are supported + by the class. +

+ + + Operation + Description + Method + + + Union (OR) + + Element included in result if it exists in either A OR + B. + + Union() + + + Intersection (AND) + + Element included in result if it exists in both A AND + B. + + InterSect() + + + Exclusive Or (XOR) + + Element included in result if it exists in one, but not both, + of A and B. + + ExclusiveOr() + + + Minus (n/a) + + Take all the elements in A. Now, if any of them exist in + B, remove them. Note that unlike the other operators, + A - B is not the same as B - A. + + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + +

+ That is, the element is included if it is in either + or this set. Neither this set nor the input + set are modified during the operation. The return value is a + clone of this set with the extra elements added in. +

+
+ A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included if it exists in both sets. The + Intersect() operation does not modify the input sets. It + returns a clone of this set with the appropriate elements + removed. +

+
+ A set of elements. + + The intersection of this set with . + +
+ + + Performs a "minus" of this set from the + set. + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + this set. The original sets are not modified during this operation. + The result set is a clone of this + containing the elements from + the operation. +

+
+ A set of elements. + + A set containing the elements from this set with the elements in + removed. + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of this set containing the elements + from the exclusive-or operation. +

+
+ A set of elements. + + A set containing the result of + ^ this. + +
+ + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains no elements. + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns a clone of the Set instance. This will work for derived Set + classes if the derived class implements a constructor that takes no arguments. + + A clone of this object. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the Set is synchronized across threads. Note that + enumeration is inherently not thread-safe. Use the SyncRoot to lock the + object during enumeration. + + + + + An object that can be used to synchronize this collection to make it thread-safe. + When implementing this, if your object uses a base object, like an IDictionary, + or anything that has a SyncRoot, return that object instead of "this". + + + + + Indicates whether the given instance is read-only or not + + + if the ISet is read-only; otherwise, . + In the default implementation of Set, this property always returns false. + + + + + Provides the storage for elements in the Set, stored as the key-set + of the IDictionary object. Set this object in the constructor + if you create your own Set class. + + + + + Adds the specified element to this set if it is not already present. + + The to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. Needed for + non-generic ISet methods implementation + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + The placeholder object used as the value for the IDictionary instance. + + + There is a single instance of this object globally, used for all Sets. + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + None of the objects based on DictionarySet are synchronized. Use the + SyncRoot property instead. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates wether the Set is read-only or not + + + + + Implements a Set based on a Dictionary (which is equivalent of + non-genric HashTable) This will give the best lookup, add, and remove + performance for very large data-sets, but iteration will occur in no particular order. + + + + + Creates a new set instance based on a Dictinary. + + + + + Creates a new set instance based on a Dictinary and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + +

Implements an immutable (read-only) Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + basisSet can still change the data-set. So GetHashCode() is not implemented + for this Set, as is the case for all Set implementations in this library. + This design decision was based on the efficiency of not having to Clone() the + basisSet every time you wrap a mutable Set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + nothing + is always thrown + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + nothing + is always thrown + + + + Removes all objects from the set. + + is always thrown + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + nothing + is always thrown + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + nothing + is always thrown + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + nothing + is always thrown + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns an object that can be used to synchronize use of the Set across threads. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates that the given instance is read-only + + + + + Implements an ordered Set based on a dictionary. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + A collection of elements that defines the initial set contents. + + + + Represents a read only wrapper around a generic IDictionary. The design pattern + mirrors ReadOnlyCollection, and follows the apparent pattern that write operations + do not throw an exception, but simply make no change to the underlying collection. + + Originally put into the public domain. + http://www.simple-talk.com/community/forums/thread/2263.aspx + + + + Original from Public Domain + Mark Pollack (.NET) + + + + Inner storage for ReadOnlyDictionary + + + + + Easy access to non-generic dictionary API + + + + + Initializes a new instance of the class. + + The dictionary to wrap. + + + + Add does not change a read only Dictionary + + The object to use as the key of the element to add. + The object to use as the value of the element to add. + The is read-only. + + + + Determines whether the contains an element with the specified key. + + The key to locate in the . + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Remove does not change a read only Dictionary, will throw an exception. + + The is read-only. + + + + Tries the get value. + + The key. + The value. + + + + + Add does not change a read only Dictionary + + The object to add to the . + The is read-only. + + + + Clear does not change a read only Dictionary. + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if item is found in the ; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + arrayIndex is less than 0. + array is null. + array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. + + + + Remove does not change a read only Dictionary. Throws an exception + + The object to remove from the . + + true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . + + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Add does not change a read only Dictionary. Throws an exception. + + The to use as the key of the element to add. + The to use as the value of the element to add. + The is read-only.-or- The has a fixed size. + + + + Determines whether the object contains an element with the specified key. + + The key to locate in the object. + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Returns an object for the object. + + + An object for the object. + + + + + Remove does not change a read only Dictionary. Throws an exception. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. + + + + Runs when the entire object graph has been deserialized. + + The object that initiated the callback. The functionality for this parameter is not currently implemented. + + + + Populates a with the data needed to serialize the target object. + + The to populate with data. + The destination (see ) for this serialization. + The caller does not have the required permission. + + + + Gets a read only containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the value with the specified key. + Set will throw an exception + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + Gets an containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the with the specified key. Set throws an exception. + + + The is read-only. + if try to set value + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + Implements a Set based on a sorted tree. This gives good performance for operations on very + large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration + occurs in order. Elements that you put into this type of collection must implement IComparable, + and they must actually be comparable. You can't mix string and int values, for example. + + + + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree. + + The to use for sorting. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + The to use for sorting. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe Set wrapper. + + The Set object that this object will wrap. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot + to synchronize the entire enumeration process. + + + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns , indicating that this object is thread-safe. The exception to this + is enumeration, which is inherently not thread-safe. Use the SyncRoot object to + lock this object for the entire duration of the enumeration. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates whether given instace is read-only or not + + + + + This class provides skeletal implementations of some + operations. + + +

+ The implementations in this class are appropriate when the base + implementation does not allow elements. The methods + , + , and + are based on + the , + , and + methods + respectively but throw exceptions instead of indicating failure via + or returns. +

+ An implementation that extends this class must + minimally define a method + which does + not permit the insertion of elements, along with methods + , and + . Typically, + additional methods will be overridden as well. If these requirements + cannot be met, consider instead subclassing + }. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + A collection designed for holding elements prior to processing. + + +

+ Besides basic operations, + queues provide additional insertion, extraction, and inspection + operations. +

+

+ Each of these methods exists in two forms: one throws + an exception if the operation fails, the other returns a special + value (either or , depending on the + operation). The latter form of the insert operation is designed + specifically for use with capacity-restricted + implementations; in most implementations, insert operations cannot + fail. +

+

+ Queues typically, but do not necessarily, order elements in a + FIFO (first-in-first-out) manner. Among the exceptions are + priority queues, which order elements according to a supplied + comparator, or the elements' natural ordering, and LIFO queues (or + stacks) which order the elements LIFO (last-in-first-out). + Whatever the ordering used, the head of the queue is that + element which would be removed by a call to + or + . In a FIFO queue, all new + elements are inserted at the tail of the queue. Other kinds of queues may + use different placement rules. Every implementation + must specify its ordering properties. +

+

+ The method inserts an + element if possible, otherwise returning . This differs from the + method, which can fail to + add an element only by throwing an exception. The + method is designed for + use when failure is a normal, rather than exceptional occurrence, for example, + in fixed-capacity (or "bounded" queues. +

+

+ The + methods remove and + return the head of the queue. Exactly which element is removed from the + queue is a function of the queue's ordering policy, which differs from + implementation to implementation. The + and + methods differ only in their + behavior when the queue is empty: the + method throws an exception, + while the method returns + . +

+

+ The and + methods return, but do + not remove, the head of the queue. +

+

+ The interface does not define the blocking queue + methods, which are common in concurrent programming. +

+

+ implementations generally do not allow insertion + of elements, although some implementations, such as + a linked list, do not prohibit the insertion of . + Even in the implementations that permit it, should + not be inserted into a , as is also + used as a special return value by the + method to + indicate that the queue contains no elements. +

+

+ implementations generally do not define + element-based versions of methods + and , but instead inherit the + identity based versions from the class object, because element-based equality + is not always well-defined for queues with the same elements but different + ordering properties. +

+

+ Based on the back port of JCP JSR-166. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the class of the supplied prevents it + from being added to this queue. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue + + if this queue is empty +
+ + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue. + + If this queue is empty. +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Returns if there are no elements in the , otherwise. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Inserts the specified element into this queue if it is possible + to do so immediately without violating capacity restrictions. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that + it throws an exception if this queue is empty. +

+
+ + The head of this queue + + + If this queue is empty. + +
+ + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+

+ ALso note that this implementation returns the result of + unless the queue + is empty. +

+
+ The head of this queue. + + If this queue is empty. + +
+ + + Removes all of the elements from this queue. + + +

+ The queue will be empty after this call returns. +

+

+ This implementation repeatedly invokes + until it + returns . +

+
+
+ + + Adds all of the elements in the supplied + to this queue. + + +

+ Attempts to + + of a queue to itself result in . + Further, the behavior of this operation is undefined if the specified + collection is modified while the operation is in progress. +

+

+ This implementation iterates over the specified collection, + and adds each element returned by the iterator to this queue, in turn. + An exception encountered while trying to add an element (including, + in particular, a element) may result in only some + of the elements having been successfully added when the associated + exception is thrown. +

+
+ + The collection containing the elements to be added to this queue. + + + if this queue changed as a result of the call. + + + If the supplied or any one of its elements are . + + + If the collection is the current or + the collection size is greater than the queue capacity. + +
+ + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Returns if there are no elements in the , otherwise. + + + + + Returns the current capacity of this queue. + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. + + Erich Eichinger + + + + Creates a case-insensitive hashtable using . + + + + + Creates a case-insensitive hashtable using the given . + + the to calculate the hashcode + + + + Creates a case-insensitive hashtable using the given , initially + populated with entries from another dictionary. + + the dictionary to copy entries from + the to calculate the hashcode + + + + Initializes a new, empty instance of the class that is serializable using the specified and objects. + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the object. + info is null. + + + + Implements the interface and returns the data needed to serialize the . + + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the . + info is null. + + + + Calculate the hashcode of the given string key, using the configured culture. + + + + + + + Compares two keys + + + + + Creates a shallow copy of the current instance. + + + + + is an + class that supports the creation of new + types where the underlying data + store is an instance. + + +

+ You can use any object that implements the + interface to hold set + data. You can define your own, or you can use one of the objects + provided in the framework. The type of + you + choose will affect both the performance and the behavior of the + using it. +

+

+ This object overrides the method, + but not the method, because + the class is mutable. + Therefore, it is not safe to use as a key value in a dictionary. +

+

+ To make a typed based on your + own , simply derive a new + class with a constructor that takes no parameters. Some + implmentations cannot be defined + with a default constructor. If this is the case for your class, you + will need to override clone as well. +

+

+ It is also standard practice that at least one of your constructors + takes an or an + as an argument. +

+
+ +
+ + + A collection that contains no duplicate elements. + + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs a "union" of two sets, where all the elements in both are + present. + + +

+ That is, the element is included if it is in either + or . The return + value is a clone of one of the sets ( + if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. +

+
+ A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + +
+ + + Performs a "union" of two sets, where all the elements in both are + present. + + A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included only if it exists in both + and . Neither input + object is modified by the operation. The result object is a + clone of one of the input objects ( + if it is not ) containing the elements from + the intersect operation. +

+
+ A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs a "minus" of set from set + . + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + set . The original sets are not modified + during this operation. The result set is a clone of set + containing the elements from the operation. +

+
+ A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + +
+ + + Performs a "minus" of set from set + . + + A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of one of the sets ( + if it is not ) + containing the elements from the exclusive-or operation. +

+
+ A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Returns a clone of the + instance. + + +

+ This will work for derived + classes if the derived class implements a constructor that takes no + arguments. +

+
+ A clone of this object. +
+ + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + This method will test the + against another for + "equality". + + +

+ In this case, "equality" means that the two sets contain the same + elements. The "==" and "!=" operators are not overridden by design. + If you wish to check for "equivalent" + instances, use + Equals(). If you wish to check to see if two references are + actually the same object, use "==" and "!=". +

+
+ + A object to compare to. + + + if the two sets contain the same elements. + +
+ + + Gets the hashcode for the object. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + +

+ When implementing this, if your object uses a base object, like an + , or anything that has + a SyncRoot, return that object instead of "this". +

+
+ + An object that can be used to synchronize this collection to make + it thread-safe. + +
+ + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Provides the storage for elements in the + , stored as the key-set + of the object. + + +

+ Set this object in the constructor if you create your own + class. +

+
+
+ + + The placeholder object used as the value for the + instance. + + + There is a single instance of this object globally, used for all + s. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Implements an based on a + hash table. + + +

+ This will give the best lookup, add, and remove performance for very + large data-sets, but iteration will occur in no particular order. +

+
+ +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class, and + initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an that automatically + changes from a list based implementation to a hashtable based + implementation when the size reaches a certain threshold. + + +

+ This is good if you are unsure about whether you data-set will be tiny + or huge. +

+ + Because this uses a dual implementation, iteration order is not + guaranteed! + +
+ +
+ + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size, and initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an immutable (read-only) + wrapper. + + +

+ Although this class is advertised as immutable, it really isn't. + Anyone with access to the wrapped + can still change the data. So + is not implemented for this , as + is the case for all + implementations in this library. This design decision was based on the + efficiency of not having to clone the wrapped + every time you wrap a mutable + . +

+
+
+ + + Constructs an immutable (read-only) + wrapper. + + + The that is to be wrapped. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + + Removes all objects from this set. + + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the + instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + Simple linked list implementation. + + Simon White + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class that contains all + elements of the specified list. + + + A list of elements that defines the initial contents. + + + + + Removes the object at the specified index. + + The lookup index. + + If the specified is greater than the + number of objects within the list. + + + + + Inserts an object at the specified index. + + The lookup index. + The object to be inserted. + + If the specified is greater than the + number of objects within the list. + + + + + Removes the first instance of the specified object found. + + The object to remove + + + + Returns if this list contains the specified + element. + + The element to look for. + + if this list contains the specified element. + + + + + Removes all objects from the list. + + + + + Returns the index of the first instance of the specified + found. + + The object to search for + + The index of the first instance found, or -1 if the element was not + found. + + + + + Adds the specified object to the end of the list. + + The object to add + The index that the object was added at. + + + + Adds all of the elements of the supplied + list to the end of this list. + + The list of objects to add. + + + + Checks whether the list can be modified. + + + If the list cannot be modified. + + + + + Validates the specified index. + + The lookup index. + + If the index is invalid. + + + + + Returns the node at the specified index. + + The lookup index. + The node at the specified index. + + If the specified is greater than the + number of objects within the list. + + + + + Returns the node (and index) of the first node that contains + the specified value. + + The value to search for. + + The node, or if not found. + + + + + Removes the specified node. + + The node to be removed. + + + + Copies the elements in this list to an array. + + +

+ The type of array needs to be compatible with the objects in this + list, obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + + + If the supplied is . + + + If the supplied is less than zero + or is greater than the length of . + + + If the supplied is of insufficient size. + +
+ + + Gets an enumerator for the elements in the + . + + +

+ Enumerators are fail fast. +

+
+ + An over the elements + in the . + +
+ + + Is list read only? + + + if the list is read only. + + + + + Returns the node at the specified index. + + +

+ This is the indexer for the + class. +

+
+ +
+ + + Is the list a fixed size? + + + if the list is a fixed size list. + + + + + Returns if the list is synchronized across + threads. + + + + This implementation always returns . + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + The number of objects within the list. + + + + + An object that can be used to synchronize this + to make it thread-safe. + + + An object that can be used to synchronize this + to make it thread-safe. + + + + + Implements a based on a list. + + +

+ Performance is much better for very small lists than either + or . + However, performance degrades rapidly as the data-set gets bigger. Use a + instead if you are not sure your data-set + will always remain very small. Iteration produces elements in the order they were added. + However, element order is not guaranteed to be maintained by the various + mathematical operators. +

+
+
+ + + Creates a new set instance based on a list. + + + + + Creates a new set instance based on a list and initializes it based on a + collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Thrown when an element is requested from an empty . + + Griffin Caprio + + + + Creates a new instance of the + class. + + + + + 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. + + + + + 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. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + An unbounded priority based on a priority + heap. This queue orders elements according to an order specified + at construction time, which is specified either according to their + natural order (see , or according to a + , depending on which constructor is + used. A priority queue does not permit elements. + A priority queue relying on natural ordering also does not + permit insertion of non-comparable objects (doing so will result + . + +

+ The head of this queue is the lowest element + with respect to the specified ordering. If multiple elements are + tied for lowest value, the head is one of those elements -- ties are + broken arbitrarily. + +

+ A priority queue is unbounded, but has an internal + capacity governing the size of an array used to store the + elements on the queue. It is always at least as large as the queue + size. As elements are added to a priority queue, its capacity + grows automatically. The details of the growth policy are not + specified. + +

+ This class and its enumerator implement all of the + optional methods of the and + interfaces. + The enumerator provided in method + is not guaranteed to traverse the elements of the PriorityQueue in any + particular order. + +

+ Note that this implementation is NOT synchronized. + Multiple threads should not access a + instance concurrently if any of the threads modifies the list + structurally. Instead, use the thread-safe PriorityBlockingQueue. +

+ Josh Bloch + Griffin Caprio (.NET) +
+ + + Priority queue represented as a balanced binary heap: the two children + of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is + ordered by comparator, or by the elements' natural ordering, if + comparator is null: For each node n in the heap and each descendant d + of n, n <= d. + + The element with the lowest value is in queue[1], assuming the queue is + nonempty. (A one-based array is used in preference to the traditional + zero-based array to simplify parent and child calculations.) + + queue.length must be >= 2, even if size == 0. + + + + The number of elements in the priority queue. + + + + The comparator, or null if priority queue uses elements' + natural ordering. + + + + + The number of times this priority queue has been + structurally modified. + + + + + Creates a with the default initial capacity + (11) that orders its elements according to their natural + ordering (using ). + + + + + Creates a with the specified initial capacity + that orders its elements according to their natural ordering + (using ). + + the initial capacity for this priority queue. + + if is less than 1. + + + + Creates a with the specified initial capacity + that orders its elements according to the specified comparator. + + the initial capacity for this priority queue. + the comparator used to order this priority queue. + If then the order depends on the elements' natural ordering. + + if is less than 1. + + + + Creates a containing the elements in the + specified collection. The priority queue has an initial + capacity of 110% of the size of the specified collection or 1 + if the collection is empty. If the specified collection is an + instance of a , the priority queue will be sorted + according to the same comparator, or according to its elements' + natural order if the collection is sorted according to its + elements' natural order. Otherwise, the priority queue is + ordered according to its elements' natural order. + + the collection whose elements are to be placed into this priority queue. + if elements of cannot be + compared to one another according to the priority queue's ordering + if or any element with it is + + + + + + Common code to initialize underlying queue array across + constructors below. + + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Amount of bits to shift + The resulting number from the shift operation + + + + Establishes the heap invariant assuming the heap + satisfies the invariant except possibly for the leaf-node indexed by k + (which may have a nextExecutionTime less than its parent's). + + + This method functions by "promoting" queue[k] up the hierarchy + (by swapping it with its parent) repeatedly until queue[k] + is greater than or equal to its parent. + + + + + Establishes the heap invariant (described above) in the subtree + rooted at k, which is assumed to satisfy the heap invariant except + possibly for node k itself (which may be greater than its children). + + + This method functions by "demoting" queue[k] down the hierarchy + (by swapping it with its smaller child) repeatedly until queue[k] + is less than or equal to its children. + + + + + Establishes the heap invariant in the entire tree, + assuming nothing about the order of the elements prior to the call. + + + + + Returns the of or - 1, + whichever is smaller. + + base size + percentage to return + of + + + + Initially fill elements of the queue array under the + knowledge that it is sorted or is another , in which + case we can just place the elements in the order presented. + + + + + Initially fill elements of the queue array that is not to our knowledge + sorted, so we must rearrange the elements to guarantee the heap + invariant. + + + + + Removes and returns element located at from queue. (Recall that the queue + is one-based, so 1 <= i <= size.) + + + Normally this method leaves the elements at positions from 1 up to i-1, + inclusive, untouched. Under these circumstances, it returns . + Occasionally, in order to maintain the heap invariant, it must move + the last element of the list to some index in the range [2, i-1], + and move the element previously at position (i/2) to position i. + Under these circumstances, this method returns the element that was + previously at the end of the list and is now at some position between + 2 and i-1 inclusive. + + + + Resize array, if necessary, to be able to hold given index + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + and this queue does not permit + elements. + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + + + Removes a single instance of the specified element from this + queue, if it is present. + + + + + Returns an over the elements in this queue. + The enumerator does not return the elements in any particular order. + + an enumerator over the elements in this queue. + + + + Removes all elements from the priority queue. + The queue will be empty after this call returns. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Queries the queue to see if it contains the specified + + element to look for. + if the queue contains the , + otherwise. + + + Returns the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering + (using ). + + + the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering. + + + + + Save the state of the instance to a stream (that + is, serialize it). + + The length of the array backing the instance is + emitted (int), followed by all of its elements (each an + ) in the proper order. + + the stream + the context + + + + Reconstitute the instance from a stream (that is, + deserialize it). + + the stream + the context + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Copies the elements of the to an , starting at index 0. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Gets the Capacity of this queue. Will equal + + + + + Returns the queue count. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Returns if there are no elements in the , otherwise. + + + + + Index (into queue array) of element to be returned by subsequent call to next. + + + + + Implements an based on a sorted + tree. + + +

+ This gives good performance for operations on very large data-sets, + though not as good - asymptotically - as a + . However, iteration occurs + in order. +

+

+ Elements that you put into this type of collection must implement + , and they must actually be comparable. + You can't mix and + values, for example. +

+

+ This implementation does + not support elements that are . +

+
+ +
+ + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree using for ordering. + + + + + Creates a new set instance based on a sorted tree and initializes + it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Synchronized that should be returned by synchronized + dictionary implementations in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that should be returned by synchronized + collections in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that, unlike hashtable created + using method, synchronizes + reads from the underlying hashtable in addition to writes. + + +

+ In addition to synchronizing reads, this implementation also fixes + IEnumerator/ICollection issue described at + http://msdn.microsoft.com/en-us/netframework/aa570326.aspx + (search for SynchronizedHashtable for issue description), by implementing + interface explicitly, and returns thread safe enumerator + implementations as well. +

+

+ This class should be used whenever a truly synchronized + is needed. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of + + + + + Initializes a new instance of + + + + + Initializes a new instance of , copying initial entries from + handling keys depending on . + + + + + Creates a instance that + synchronizes access to the underlying . + + the hashtable to be synchronized + + + + Creates a wrapper that synchronizes + access to the passed . + + the hashtable to be synchronized + + + + Adds an element with the provided key and value to the object. + + The to use as the value of the element to add. + The to use as the key of the element to add. + An element with the same key already exists in the object. + key is null. + The is read-only.-or- The has a fixed size. 2 + + + + Removes all elements from the object. + + The object is read-only. 2 + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + + Determines whether the object contains an element with the specified key. + + + true if the contains an element with the key; otherwise, false. + + The key to locate in the object. + key is null. 2 + + + + Returns, whether this contains an entry with the specified . + + The key to look for + , if this contains an entry with this + + + + Returns, whether this contains an entry with the specified . + + The value to look for + , if this contains an entry with this + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + The type of the source cannot be cast automatically to the type of the destination array. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 + + + + Returns an object for the object. + + + An object for the object. + + + + + Removes the element with the specified key from the object. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + key is null. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Gets a value indicating whether the object is read-only. + + + true if the object is read-only; otherwise, false. + + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Gets an object containing the keys of the object. + + + An object containing the keys of the object. + + + + + Gets an object containing the values in the object. + + + An object containing the values in the object. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets or sets the element with the specified key. + + + The element with the specified key. + + The key of the element to get or set. + The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. + key is null. 2 + + + + Implements a thread-safe wrapper. + + +

+ The implementation is extremely conservative, serializing critical + sections to prevent possible deadlocks, and locking on everything. The + one exception is for enumeration, which is inherently not thread-safe. + For this, you have to lock the SyncRoot object for the + duration of the enumeration. +

+
+ +
+ + + Constructs a thread-safe + wrapper. + + + The object that this object + will wrap. + + + If the supplied ecposes a + SyncRoot value. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the instance. + + A clone of this object. + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Abstract Type Filter that provides methods to load a required type from assembly. + + + + + Represents the base interface for all component-scan type filters + + + + + Determine a match based on the given type object. + + + true if there is a match; false is there is no match + + + + Required Type to compare against provided Type + + + + + Determine a match based on the given type object. + + + true if there is a match; false is there is no match + + + + Is loading a Type from a string passed to method in the form [Type.FullName], [Assembly.Name] + + + + + A simple filter which matches classes that are assignable to a given type. + + + + + Create a Type Filter with required type + + type name including assembly name + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + A simple filter which matches classes with a given attribute, + checking inherited annotations as well. + + + + + Creates a Type Filter with required type attribute + + + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + Creates a new instance of a given type string + + + + + Creates a new instance of given type filter type string + + Custom type filter to create + An instance of ITypeFilter or NULL if no instance can be created + + + + Creates a new instance of given name generator type string + + Custom type name generator string to create + An instance of IObjectNameGenerator or NULL if no instance can be created + + + + A simple filter for matching a fully-qualified class name with a regex + + + + + Creates a type filter with provided pattern + + Regex pattern + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + AssemblyTypeScanner that only accepts types that also meet the requirements of being ObjectDefintions. + + + + + AssemblyTypeScanner that provides for applying a final hard-coded Required Constraint to all types found in the the scanned assemblies + in addition to respecting the constraints passed to it during its configuration. + + + + + Scans Assebmlies for Types that satisfy a given set of constraints. + + + + + Scanner that can filter types from assemblies based on constraints. + + + + + Add the Assembly containing the specified . + + + + + + + Adds the predicate to the assembly filter constraints. + + The assembly predicate. + + + + + Adds the predicte to the include filter for . + + The predicate. + + + + + Adds the predicte to the exclude filter for . + + The predicate. + + + + + Includes the specific types. + + The types. + + + + + Includes the type. + + The to include. + + + + + Excludes the type. + + The to exclude. + + + + + Perform the Scan, applying all provided + + + + + + Logger Instance. + + + + + Names of Assemblies to exclude from being loaded for scanning. + + + + + Names of Assemblies to include for scanning. + + + + + Assembly Inclusion Predicates. + + + + + Type Exclusion Predicates. + + + + + Type Exclusion Predicates. + + + + + Type Inclusion Predicates. + + + + + Type Inclusion TypeFilters. + + + + + Assemblies to scan. + + + + + Stores the object default definitons defined in the XML configuration documnet + + + + + Assemblies the type of the having. + + + + + + + Excludes the type. + + + + + + + Includes the type. + + + + + + + Includes the types. + + The type source. + + + + + Performs the Scan, respecting all filter settings. + + + + + + Adds the assembly filter. + + The assembly predicate. + + + + + Adds the exclude filter. + + The predicate. + + + + + Adds the exclude filter. + + The type filter. + + + + + Adds the include filter. + + The predicate. + + + + + Adds the include filter. + + The filter type. + + + + + Applies the assembly filters to the assembly candidates. + + The assembly candidates. + + + + + Determines whether the compound predicate is satisfied by the specified type. + + The type. + + true if the compound predicate is satisfied by the specified type; otherwise, false. + + + + + Determines whether [is excluded type] [the specified type]. + + The type. + + true if [is excluded type] [the specified type]; otherwise, false. + + + + + Determines whether [is included assembly] [the specified assembly]. + + The assembly. + + true if [is included assembly] [the specified assembly]; otherwise, false. + + + + + Determines whether [is included type] [the specified type]. + + The type. + + true if [is included type] [the specified type]; otherwise, false. + + + + + Sets the default filters. + + + + + Loads the assemblies found. + + The folder path. + The extension. + + + + Stores the object default definitons defined in the XML configuration documnet + + + + + Determines whether the compound predicate is satisfied by the specified type. + + The type. + + true if the compound predicate is satisfied by the specified type; otherwise, false. + + + + + Determines whether the required constraint is satisfied by the specified type. + + The type. + + true if the required constraint is satisfied by the specified type; otherwise, false. + + + + + Registers the defintions for types. + + The registry. + The types to register. + + + + Applies the assembly filters to the assembly candidates. + + The assembly candidates. + + + + + Determines whether the specified candidate is and excluded assembly. + + The candidate. + + true if the specified candidate is an excluded assembly ; otherwise, false. + + + + + Determines whether the required constraint is satisfied by the specified type. + + The type. + + true if the required constraint is satisfied by the specified type; otherwise, false. + + + + + Sets the default filters. + + + + + Scans the and register types. + + The registry within which to register the types. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The assemblies to include predicates. + + + + Initializes a new instance of the class. + + The names of assemblies to include. + + + + Provides the name generator for all scanned objects. + Default is + + + + + Represents a collection of Types. + + + + + Logger Instance. + + + + + Initializes a new instance of the class. + + The assembly. + + + + Gets the enumerator. + + + + + + Utility class that allows for convenient registration of common + and definitions for attribute based configuration + + + + + Mark Pollack (.NET) + Mark Fisher + Juergen Hoeller + Chris Beams + + + + The object name of the internally managed Configuration attribute processor. + + + + + The object name of the internally managed Autowire attribute processor + + + + + The object name of the internally managed Required attribute processor. + + + + + The object name of the internally managed InitDestroy attribute processor. + + + + + Registers the attribute config processors. + + The registry. + + + + Default Name Generator for attribute driven component scan. + + First choice is the provided name of the Component attribute. + Fallback is the short type name. + + + + + Strategy interface for generating object names for object definitions + + Juergen Hoeller + Mark Pollack (.NET) + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + + the generated object name + + + + + Indicates that a class declares one or more methods and may be processed + by the Spring container to generate object definitions and service requests for those objects + at runtime. + + Configuration is meta-annotated as a , therefore Configuration + classes are candidates for component-scanning. + + May be used in conjunction with the attribute to indicate that all object + methods declared within this class are by default lazily initialized. + +

Constraints

+
    +
  • Configuration classes must be non-sealed
  • +
  • Configuration classes must have a default/no-arg constructor
  • +
+
+
+ + + Indicates that an annotated class is a "component". + Such classes are considered as candidates for future features such + as auto-detection when using attribute-based configuration and assembly scanning. + + Other class-level annotations may be considered as identifying + a component as well, typically a special kind of component: + e.g. the Repository attribute. + + Mark Fisher + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the component. + + + + Gets or sets the name of the component + + The name of the component. + + + + Initializes a new instance of the ConfigurationAttribute class. + + + + + Initializes a new instance of the Configuration class. + + + + + + Represents an instance of the metadata that has been parsed from a class with the applied to it. + + + + + Initializes a new instance of the ConfigurationClass class. + + + + + + + Adds the imported resource. + + The imported resource. + The reader class capable of interpreting the imported resource. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Validates the specified and reports all discovered violations to the provided problem reporter for appropriate action. + + The problem reporter. + + + + Gets the type of the configuration class. + + The type of the configuration class. + + + + Gets the imported resources. + + The imported resources. + + + + Gets the methods. + + The methods. + + + + Gets or sets the name of the object. + + The name of the object. + + + + Gets the resource. + + The resource. + + + + Gets the SimpleName of the object. + + The simple name. + + + + Initializes a new instance of the class. + + The message. + The location. + + + + Initializes a new instance of the Problem class. + + + + + + + + Implementation of the IResource that represents an assembly containing one or more resources. + + + + + The central abstraction for Spring.NET's access to resources such as + s. + + +

+ This interface encapsulates a resource descriptor that abstracts away + from the underlying type of resource; possible resource types include + files, memory streams, and databases (this list is not exhaustive). +

+

+ A can definitely be opened and accessed + for every such resource; if the resource exists in a physical form (for + example, the resource is not an in-memory stream or one that has been + extracted from an assembly or ZIP file), a or + can also be accessed. The actual + behavior is implementation-specific. +

+

+ This interface, when used in tandem with the + interface, forms the backbone of + Spring.NET's resource handling. Third party extensions or libraries + that want to integrate external resources with Spring.NET's IoC + container are encouraged expose such resources via this abstraction. +

+

+ Interfaces cannot obviously mandate implementation, but derived classes + are strongly encouraged to expose a constructor that takes a + single as it's sole argument (see example). + Exposing such a constructor will make your custom + implementation integrate nicely + with the class. +

+
+ Juergen Hoeller + Rick Evans (.NET) + + +
+ + + Simple interface for objects that are sources for + s. + + +

+ This is the base interface for the abstraction encapsulated by + Spring.NET's interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Return an for this resource. + + + + Clients of this interface must be aware that every access of this + property will create a fresh ; + it is the responsibility of the calling code to close any such + . + + + + An . + + + If the stream could not be opened. + + + + + Creates a resource relative to this resource. + + + The path (always resolved as relative to this resource). + + + The relative resource. + + + If the relative resource could not be created from the supplied + path. + + + If the resource does not support the notion of a relative path. + + + + + Does this resource represent a handle with an open stream? + + +

+ If , the + cannot be read multiple times, and must be read and then closed to + avoid resource leaks. +

+

+ Will be for all usual resource descriptors. +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + +
+ + + Returns a handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available on a filesystem, or cannot be + exposed as a handle. + + + +
+ + + Returns a description for this resource. + + +

+ The description is typically used for diagnostics and other such + logging when working with the resource. +

+

+ Implementations are also encouraged to return this value from their + method. +

+
+ + A description for this resource. + +
+ + + Does this resource actually exist in physical form? + + +

+ An example of a resource that physically exists would be a + file on a local filesystem. An example of a resource that does not + physically exist would be an in-memory stream. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + Initializes a new instance of the class. + + The type. + + + + Creates a resource relative to this resource. + + The path (always resolved as relative to this resource). + The relative resource. + + If the relative resource could not be created from the supplied + path. + + + If the resource does not support the notion of a relative path. + + + + + Does this resource represent a handle with an open stream? + + + if this resource represents a handle with an + open stream. + + +

+ If , the + cannot be read multiple times, and must be read and then closed to + avoid resource leaks. +

+

+ Will be for all usual resource descriptors. +

+
+ +
+ + + Returns the handle for this resource. + + The handle for this resource. + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + If the resource is not available or cannot be exposed as a + . + + + +
+ + + Returns a handle for this resource. + + + The handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + If the resource is not available on a filesystem, or cannot be + exposed as a handle. + + + +
+ + + Returns a description for this resource. + + A description for this resource. + +

+ The description is typically used for diagnostics and other such + logging when working with the resource. +

+

+ Implementations are also encouraged to return this value from their + method. +

+
+
+ + + Does this resource actually exist in physical form? + + + if this resource actually exists in physical + form (for example on a filesystem). + + +

+ An example of a resource that physically exists would be a + file on a local filesystem. An example of a resource that does not + physically exist would be an in-memory stream. +

+
+ + +
+ + + Return an for this resource. + + An . + + + Clients of this interface must be aware that every access of this + property will create a fresh + ; + it is the responsibility of the calling code to close any such + . + + + + If the stream could not be opened. + + + + + Enhances Configuration classes by generating a dynamic proxy capable of + interacting with the Spring container to respect object semantics. + + Chris Beams + Juergen Hoeller + Bruno Baia (.NET) + + + + + Creates a new instance of the class. + + + The supplied ObjectFactory to check for the existence of object definitions. + + + + + Generates a dynamic subclass of the specified Configuration class with a + container-aware interceptor capable of respecting scoping and other bean semantics. + + The Configuration class. + The enhanced subclass. + + + + Intercepts the invocation of any -decorated methods in order + to ensure proper handling of object semantics such as scoping and AOP proxying. + + + + + Process the -decorated method to check + for the existence of this object. + + The method providing the object definition. + When this method returns true, contains the object definition. + true if the object exists; otherwise, false. + + + + Builds a proxy type using inheritance. + + + + In order for this builder to work, target methods have to be either + , or belong to an interface. + + + Aleksandar Seovic + Bruno Baia + + + + Base class for proxy builders that can be used + to create a proxy for any class. + + +

+ This class provides a set of template + methods that derived classes can override to provide custom behaviour + appropriate to the type of proxy that is being generated (one of + inheritance or composition-based proxying). +

+
+ Aleksandar Seovic + Bruno Baia +
+ + + Describes the operations for a generic proxy type builder that can be + used to create a proxy type for any class. + + Aleksandar Seovic + + + + Creates the proxy type. + + The generated proxy class. + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + + + + Gets or sets the list of interfaces proxy should implement. + + + + + Should we proxy target attributes? + + + by default. + Target type attributes, method attributes, method's return type attributes + and method's parameter attributes are copied to the proxy. + + + + + The list of custom s that the proxy + class must be decorated with. + + +

+ Note that the list is composed of instances of the actual + s that are to be applied, not the + s of the s. +

+
+ +

+ The following code snippets show examples of how to decorate the + the proxied class with one or more s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary typeAtts = new Hashtable(); + builder.TypeAttributes = typeAtts; + + // applies a single Attribute to the proxied class... + typeAtts = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to the proxied class... + typeAtts = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + The custom s that the proxy + members must be decorated with. + + +

+ This dictionary must use simple s for keys + (denoting the member names that the attributes are to be applied to), + with the corresponding values being + s. +

+

+ The key may be wildcarded using the '*' character... if so, + then those proxy members that match against the key will be + decorated with the attendant list of + s. This naturally implies that using + the '*' character as a key will result in the attendant list + of s being applied to every member of + the proxied class. +

+
+ +

+ The following code snippets show examples of how to decorate the + members of a proxied class with one or more + s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary memAtts = new Hashtable(); + builder.MemberAttributes = memAtts; + + // applies a single Attribute to all members of the proxied class... + memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to all members of the proxied class... + memAtts ["*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + + // applies a single Attribute to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + Describes the operations that generates IL instructions + used to build the proxy type. + + Bruno Baia + + + + Generates the IL instructions that pushes + the proxy 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. + + + + The shared instance for this class (and derived classes). + + + + + Creates the proxy type. + + The generated proxy class. + + + + Generates the IL instructions that pushes + the proxy 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. + + + + Creates an appropriate type builder. + + The name to use for the proxy type name. + The type to extends if provided. + The type builder to use. + + + + Applies attributes to the proxy class. + + The type builder to use. + The proxied class. + + + + + + Applies attributes to the proxied method. + + The method builder to use. + The proxied method. + + + + + + Applies attributes to the proxied method's return type. + + The method builder to use. + The proxied method. + + + + + Applies attributes to proxied method's parameters. + + The method builder to use. + The proxied method. + + + + + Calculates and returns the list of attributes that apply to the + specified type. + + The type to find attributes for. + + A list of custom attributes that should be applied to type. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method. + + The method to find attributes for. + + A list of custom attributes that should be applied to method. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method's return type. + + The method to find attributes for. + + A list of custom attributes that should be applied to method's return type. + + + + + + Calculates and returns the list of attributes that apply to the + specified method's parameters. + + The method to find attributes for. + The method's parameter to find attributes for. + + A list of custom attributes that should be applied to the specified method's parameter. + + + + + + Check that the specified object is matching the passed attribute type. + + +

+ The specified object can be of different type : +

+ + + + + + System.Reflection.CustomAttributeData (Only with .NET 2.0) + + + + + +
+ The object instance to check. + The attribute type to test against. + + if the object instance matches the attribute type; + otherwise . + +
+ + + Defines the types of the parameters for the specified constructor. + + The constructor to use. + The types for constructor's parameters. + + + + Implements constructors for the proxy class. + + + The builder to use. + + + + + Generates the proxy constructor. + + The constructor builder to use. + The IL generator to use. + The constructor to use. + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + if target virtual methods should not be proxied; + otherwise . + + + + + Gets the mapping of the interface to proxy + into the actual methods on the target type + that does not need to implement that interface. + + +

+ If the target type does not implement the interface, + we return the interfaces methods as the target methods for many reasons : +

    +
  • + The target object can change for an object that implements the interface. + (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' + implementation in the Spring AOP framework for an example) +
  • +
  • + Allow Transparent proxies to be proxied. + (See Spring Remoting framework for an example) +
  • +
  • + Allow null target to be proxied. + (See Spring AOP framework which avoid calls to the target object + by intercepting all methods. Think "dynamic mock") + (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) +
  • +
+

+
+ + The of the target object. + + The interface to implement. + + An interface mapping for the interface to proxy. + +
+ + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + if only members declared at the level + of the supplied 's hierarchy should be proxied; + otherwise . + + + + + Implements the specified . + + The type builder to use. + The type the property is defined on. + The property to proxy. + The implemented methods map. + + + + Implements the specified event. + + The type builder to use. + The type the event is defined on. + The event to proxy. + The implemented methods map. + + + + Returns an array of s that represent + the proxiable interfaces. + + + An interface is proxiable if it's not marked with the + . + + + The array of interfaces from which + we want to get the proxiable interfaces. + + + An array containing the interface s. + + + + + Checks if specified interface is of a special type + that should never be proxied (i.e. ISerializable). + + Interface type to check. + + true if it is, false otherwise. + + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + +

+ The default value of this property is the + . +

+
+
+ + + Gets or sets the list of interfaces proxy should implement. + + + The default value of this property is all the interfaces + implemented or inherited by the target type. + + + + + Should we proxy target attributes? + + + + + + The list of custom s that the proxy + class must be decorated with. + + + + + + The custom s that the proxy + members must be decorated with. + + + + + + Creates a new instance of the + class. + + + + + Creates a proxy that inherits the proxied object's class. + + +

+ Only (non-final) methods can be proxied, + unless they are members of one of the interfaces that target class + implements. In that case, methods will be proxied using explicit + interface implementation, which means that client code will have + to cast the proxy to a specific interface in order to invoke the + methods. +

+
+ 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 proxy constructor. + + +

+ This implementation delegates the call to a base class constructor. +

+
+ The constructor builder to use. + The IL generator to use. + + The base class constructor to delegate the call to. + +
+ + + Gets or sets a value indicating whether inherited members should be proxied. + + + if they should be; otherwise, . + + + + + Base class for method builders that contains common functionalities. + + Bruno Baia + + + + Defines interface that proxy method builders have to implement. + + Aleksandar Seovic + Bruno Baia + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + The type builder to use. + + + + + The implementation to use. + + + + + Indicates whether interfaces should be implemented explicitly. + + + + + 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 . + + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + Generates the IL instructions that pushes + the proxy 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. + + + + Defines proxy method for the target object. + + The method to proxy. + + The interface definition of the method, if applicable. + + + if the supplied is to be + implemented explicitly; otherwise . + + + The for the proxy method. + + + + + Defines generic method parameters based on proxied method metadata. + + + The to use. + + The method to proxy. + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Calls target method directly. + + The IL generator to use. + The method to invoke. + + + + Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. + + The IL generator to use. + The method to test for + the name of the target to be used in error messages + + + + Calls base method directly. + + The IL generator to use. + The method to proxy. + + + + Replaces a raw reference with a reference to a proxy. + + +

+ If the target object returns reference to itself -- 'this' -- + we need to treat it as a special case and return a reference + to a proxy object instead. +

+
+ The IL generator to use. + The location of the return value. +
+ + + Generates code that throws . + + IL generator to use. + the type of the exception to throw + Error message to use. + + + + Represents a class method marked with the . + + + + + Initializes a new instance of the ConfigurationClassMethod class. + + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Validates the specified problem reporter. + + The problem reporter. + + + + Gets the configuration class. + + The configuration class. + + + + Gets the method metadata. + + The method metadata. + + + + Gets the resource location. + + The resource location. + + + + Reads the class with the applied and converts it into an instance. + + + + + Initializes a new instance of the ConfigurationClassObjectDefinitionReader class. + + + + + + + Loads the object definitions. + + The configuration model. + + + + Checks the class to see if it is a candidate to be a source. + + The object definition. + + + + + A plain-vanilla object definition. + + +

+ This is the most common type of object definition; + instances + do not derive from a parent + , and usually + (but not always - see below) have an + + and (optionally) some + and + . +

+

+ Note that + instances do not have to specify an + : + This can be useful for deriving + instances + from such definitions, each with it's own + , + inheriting common property values and other settings from the parent. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Common base class for object definitions, factoring out common + functionality from + and + . + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Extension of , + holding attributes as objects in order + to keep track of the definition source. + + + + + Support class for , providing + a base implementation of all methods. To be extended by subclasses. + + + + + Interface defining a generic contract for attaching and accessing metadata + to/from arbitrary objects. + + + + + Set the attribute defined by name to the supplied value. + In general, users should take care to prevent overlaps with other + metadata attributes by using fully-qualified names, perhaps using + class or package names as prefix. + + the unique attribute key + the attribute value to be attached + + + + Get the value of the attribute identified by name. + Return null if the attribute doesn't exist. + + the unique attribute key + the current value of the attribute, if any + + + + Remove the attribute identified by name and return its value. + Return null if no attribute under name is found. + + the unique attribute key + The last value of the attribute, if any + + + + Checks weather a specific attributes exists + + The unique attribute key + + true if the attribute identified by name exists. + Otherwise return false + + + + + Return the names of all attributes. + + + + Map with String keys and Object values + + + Copy the attributes from the supplied AttributeAccessor to this accessor. + @param source the AttributeAccessor to copy from + + + + Interface to be implemented by bean metadata elements + that carry a configuration source object. + + + + + Return the configuration source Object for this metadata element + (may be null). + + + + + Add the given BeanMetadataAttribute to this accessor's set of attributes. + + The BeanMetadataAttribute object to register + + + + Look up the given BeanMetadataAttribute in this accessor's set of attributes. + + the name of the attribute + the corresponding BeanMetadataAttribute object, + or null if no such attribute defined + + + + + Set the configuration source object for this metadata element. +

The exact type of the object will depend on the configuration mechanism used.

+
+
+ + + Describes a configurable object instance, which has property values, + constructor argument values, and further information supplied by concrete + implementations. + + Rick Evans + + + + Describes an object instance, which has property values, constructor + argument values, and further information supplied by concrete implementations. + + +

+ This is just a minimal interface: the main intention is to allow + + (like PropertyPlaceholderConfigurer) to access and modify property values. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + Return the event handlers for any events exposed by this object. + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The name of the parent definition of this object definition, if any. + + + + + The target scope for this object. + + + + + Get the role hint for this object definition + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition. + + Note that this does not have to be the actual type name used at runtime, + in case of a child definition overrding/inheriting the the type name from its + parent. It can be modifed during object factory post-processing, typically + replacing the original class name with a parsed variant of it. + Hence, do not consider this to be the definitive bean type at runtime + but rather only use it for parsing purposes at the individual object + definition level. + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Return whether this bean is a primary autowire candidate. + If this value is true for exactly one bean among multiple + matching candidates, it will serve as a tie-breaker. + + + + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + The method overrides (if any) for this object. + + + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + + + + + Return the event handlers for any events exposed by this object. + + + + + Get or set the role hint for this object definition + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition (if any). + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The dependency check code. + + + + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + + The object definition used to initialise the member fields of this + instance. + + +

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

+
+
+ + + Register a qualifier to be used for autowire candidate resolution, + keyed by the qualifier's type name. + + + + + + Return whether this bean has the specified qualifier. + + + + + Return the qualifier mapped to the provided type name. + + + + + Return all registered qualifiers. + + the Set of objects. + + + + Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition. + + the AbstractBeanDefinition to copy from + + + + Resolves the type of the object, resolving it from a specified + object type name if necessary. + + + A resolved instance. + + + If the type cannot be resolved. + + + + + Validate this object definition. + + + In the case of a validation failure. + + + + + Validates all + + + + + Validate the supplied . + + + The + to be validated. + + + + + Override settings in this object definition from the supplied + object definition. + + + The object definition used to override the member fields of this instance. + + + + + Returns a that represents the current + . + + + A that represents the current + . + + + + + The name of the parent definition of this object definition, if any. + + + + + The property values that are to be applied to the object + upon creation. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The property values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + Does this definition have any + ? + + + if this definition has at least one + . + + + + + The constructor argument values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The constructor argument values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The event handler values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The event handler values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The method overrides (if any) for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The name of the target scope for the object. + Defaults to "singleton", ootb alternative is "prototype". Extended object factories + might support further scopes. + + + + + Get or set the role hint for this object definition + + + + + Is this definition a singleton, with + a single, shared instance returned on all calls to an enclosing + container (typically an + or + ). + + +

+ If , an object factory will apply the + prototype design pattern, with each caller requesting an + instance getting an independent instance. How this is defined + will depend on the object factory implementation. singletons + are the commoner type. +

+
+ +
+ + + Gets a value indicating whether this instance is prototype, with an independent instance + returned for each call. + + + true if this instance is prototype; otherwise, false. + + + + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup + by object factories that perform eager initialization of + singletons. +

+
+
+ + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be + instantiated itself but rather just serving as a parent for concrete + child object definitions. + + + if this object definition is "abstract". + + + + + The of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + + Is the of the object definition a resolved + ? + + + + + Returns the of the + of the object definition (if any). + + + + + A description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. The default is + , + which means that no autowiring will be performed. +

+
+
+ + + Gets the resolved autowire mode. + + +

+ This resolves + + to one of + + or + . +

+
+
+ + + The dependency checking mode. + + +

+ The default is + . +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before this object definition. +

+ + Dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Set whether this bean is a primary autowire candidate. + If this value is true for exactly one bean among multiple + matching candidates, it will serve as a tie-breaker. + + + + + The name of the initializer method. + + +

+ The default value is the constant, + in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default value is the constant, + in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The + method will be invoked on the specified + . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Does this object definition have any constructor argument values? + + + if his object definition has at least one + element in it's + + property. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + + The of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + Whether to perform a dependency check for objects (not + applicable to autowiring a constructor, thus ignored there) + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + +

+ Takes an object class name to avoid eager loading of the object class. +

+
+ + The assembly qualified of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + The + to be applied to a new instance of the object. + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. +

+
+ + The definition that is to be copied. + +
+ + + Validate this object definition. + + + In the case of a validation failure. + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Is always null for a . + + + It is safe to request this property's value. Setting any other value than null will + raise an . + + Raised on any attempt to set a non-null value on this property. + + + + Parses classes with the applied to them. + + + + + Initializes a new instance of the ConfigurationClassParser class. + + + + + + Parses the specified type. + + The type. + Name of the object. + + + + Validates this instance. + + + + + Processes the configuration class. + + The configuration class. + + + + Gets all methods with custom attribute for class. + + The class. + The custom attribute. + + + + + Gets the configuration classes. + + The configuration classes. + + + + Postprocesses the applied types registered with the . + + + + + Allows for custom modification of an application context's object + definitions, adapting the object property values of the context's + underlying object factory. + + +

+ Application contexts can auto-detect + IObjectFactoryPostProcessor objects in their object definitions and + apply them before any other objects get created. +

+

+ Useful for custom config files targeted at system administrators that + override object properties configured in the application context. +

+

+ See PropertyResourceConfigurer and its concrete implementations for + out-of-the-box solutions that address such configuration needs. +

+
+ Juergen Hoeller + Rick Evans (.Net) +
+ + + Modify the application context's internal object factory after its + standard initialization. + + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + The object factory used by the application context. + + + In case of errors. + +
+ + + Interface that can be implemented by objects that should be orderable, e.g. in an + . + + +

+ The actual order can be interpreted as prioritization, the first object (with the + lowest order value) having the highest priority. +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Postsprocesses the object definition registry. + + The registry. + + + + Postprocesses the object factory. + + The object factory. + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Sets the problem reporter. + + The problem reporter. + + + + objects on which the current object depends. Any objects specified are guaranteed to be + created by the container before this object. Used infrequently in cases where a object + does not explicitly depend on another through properties or constructor arguments, + but rather depends on the side effects of another object's initialization. + Note: This attribute will not be inherited by child object definitions, + hence it needs to be specified per concrete object definition. + + Using at the class level has no effect unless component-scanning + is being used. If a -attributed class is declared via XML, + attribute metadata is ignored, and + <object depends-on="..."/> is respected instead. + + + + + + Initializes a new instance of the DependsOn class. + + + + + Initializes a new instance of the DependsOn class. + + + + + Gets or sets the name. + + The name. + + + + Indicates one or more classes to import. + + Provides functionality equivalent to the <import/> element in Spring XML. + Only supported for actual -attributed classes. + + + If XML or other non- object definition resources need to be + imported, use + + + + + + Initializes a new instance of the Import class. + + + + + Initializes a new instance of the Import class. + + + + + + The class or classes to import. + + The type. + + + + Supports providing one or more implementations to import when creating s. + + + + + Initializes a new instance of the ImportResourceAttribute class. + + + + + + Initializes a new instance of the ImportResourceAttribute class. + + + + + + implementation to use when processing resources specified + by the attribute. + + The . + + + + Resource paths to import. Resource-loading prefixes such as assembly:// and + file://, etc may be used. + + The resources. + + + + Indicates whether a object is to be lazily initialized. + + If this attribute is not present on a Component or object definition, eager + initialization will occur. If present and set to true, the + object/Component will not be initialized until referenced by another object or + explicitly retrieved from the enclosing . + If present and set to false, the object will be instantiated on startup by object factories + that perform eager initialization of singletons. + + + If Lazy is present on a class, this indicates that all + methods within that should be lazily + initialized. If Lazy is present and false on a object method within a + Lazy-annotated Configuration class, this indicates overriding the 'default + lazy' behavior and that the object should be eagerly initialized. + + + + + + Initializes a new instance of the LazyAttribute class. + + + + + + Initializes a new instance of the LazyAttribute class. + + + + + Whether lazy initialization should occur. + + true if [lazy initialize]; otherwise, false. + + + + Identifies the Method as providing and Object Definition. + + + + + The optional name of a method to call on the Object instance upon closing the + application context, for example a Close() method on a DataSource. + The method must have no arguments but may throw any exception. + + Note: Only invoked on objects whose lifecycle is under the full control of the + factory, which is always the case for singletons but not guaranteed + for any other scope. + + + + The destroy method. + + + + The optional name of a method to call on the object instance during initialization. + Not commonly used, given that the method may be called programmatically directly + within the body of a Object-annotated method. + + The init method. + + + + The name of this object, or if multiple, aliases for this object. If left unspecified + the name of the object is the name of the attributed method. If specified, the method + name is ignored. + + The name. + + + + Gets the comma-delimited list of names/aliases as an array. + + The array of names. + + + + Utilities to provide support for manipulating ReflectionOnly types in the . + + + + + Load the into the ReflectionsOnly context based on its partial name. + + The partial name. + The matching + + + + A GenericObjectDefinition that provides attribute driven propulation + of properties like LazyInit, Scope or Qualifier + + + + + GenericObjectDefinition is a one-stop shop for standard object definition purposes. + Like any object definition, it allows for specifying a class plus optionally + constructor argument values and property values. Additionally, deriving from a + parent bean definition can be flexibly configured through the "parentName" property. + + In general, use this class for the purpose of + registering user-visible object definitions (which a post-processor might operate on, + potentially even reconfiguring the parent name). + Use / + where parent/child relationships happen to be pre-determined. + + + + Juergen Hoeller + Erich Eichinger + + + + Creates a new to be configured through its + object properties and configuration methods. + + + + + Creates a new as deep copy of the given + object definition. + + the original object definition to copy from + + + + Returns a representation of this + for debugging purposes. + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Name provided by the Component Attribute + + + + + Creates a GenericObjectDefinition that applies the default values provided + in the XML Spring config document. Additionally parses the specific class + attributesthat allows the definition of LazyInit, Scope or Qualifier + + Type of scanned component + Defualts provided in Spring Config document + + + + Provides the name of the object scanned + + return the provided attribute name of the full object type name + + + + When used as a type-level attribute, indicates the name of a scope to use + for instances of the attributed type. + + When used as a method-level attribute in conjunction with the + attribute, indicates the name of a scope to use for + the instance returned from the method. + + In this context, scope means the lifecycle of an instance, such as + singleton, prototype, and so forth. + + + + + + Initializes a new instance of the Scope class. + + + + + + Specifies the scope to use for the annotated object. + + The scope. + + + + Object Defintion Parser for interpreting classes when primary configuration is peformed via XML. + + + + + Interface used to handle custom, top-level tags. + + Implementations are free to turn the metadata in the custom tag into as + many as required. + + Rob Harrop + Mark Pollack (.NET) + + + + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the IObjectDefinitionRegistry + embedded in the supplied + + +

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

+
+ + The element to be parsed. + + + The object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry + + + The primary object definition. + +
+ + + 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 ObjectDefinitions from classes identified by an . + + + + + 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. +

+
+
+ + + Configures the scanner. + + The parser context. + The element. + + + + + NamespaceParser allowing for the configuration of + declarative transaction management using either XML or using attributes. + This namespace handler is the central piece of functionality in the + Spring transaction management facilities and offers two appraoches + to declaratively manage transactions. + One approach uses transaction semantics defined in XML using the + <tx:advice> elements, the other uses attributes + in combination with the <tx:annotation-driven> element. + Both approached are detailed in the Spring reference manual. + + + + + Support class for implementing custom namespace parsers. + + Parsing of individual elements is done via a ObjectDefintionParser. + Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser + to handle a specific element. + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. + + +

+ Used by + for actually parsing a DOM document or + fragment. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Sandu Turcan (.NET) +
+ + + Invoked by after construction but before any + elements have been parsed. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Invoked by after construction but before any + elements have been parsed. + + + + + Parses an element under the root node, typically + an object definition or import statement. + + + The element to be parsed. + + + The parser context. + + + The number of object defintions created from this element. + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Register the specified for the given + + + + + Register the for the 'advice' and + 'attribute-driven' tags. + + + + + Simple listener that logs application events to the console. + + +

+ Intended for use during debugging only. +

+
+ Rod Johnson + Griffin Caprio (.NET) + +
+ + + A listener for application events. + + Rod Johnson + Griffin Caprio (.NET) + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Creates a new instance of the + class. + + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle events. + + Griffin Caprio (.NET) + + + + + + + Encapsulates the data associated with an event raised by an + . + + Rod Johnson + Mark Pollack (.NET) + Griffin Caprio (.NET) + + + + + Creates a new instance of the + class. + + + + + The date and time when the event occured. + + + The date and time when the event occured. + + + + + The system time in milliseconds when the event happened. + + + The system time in milliseconds when the event happened. + + + + + Creates a new instance of the ContextEventArgs class to represent the + supplied context event. + + The type of context event. + + + + Returns a string representation of this object. + + A string representation of this object. + + + + The event type. + + + + + The various context event types. + + + + + The event type when the context is refreshed or created. + + + + + The event type when the context is closed. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Extensions to enable scanning on any AbstractApplicationContext-derived type. + + + + + Scans for types using the provided scanner. + + The context. + The scanner. + + + + Scans for types that satisfy specified predicates located in the specified scan path. + + The context. + The assembly scan path. + The assembly predicate. + The type predicate. + + + + Scans the specified context. + + The context. + The assembly scan path. + The assembly predicate. + The type predicate. + The assemblies to scan. + + + + Scans for types that satisfy specified predicates. + + The context. + The assembly predicate. + The type predicate. + + + + Scans for types using the default scanner. + + The context. + + + + Scans the with assembly filter. + + The context. + The assembly predicate. + + + + Scans the with type filter. + + The context. + The type predicate. + + + + Partial implementation of the + interface. + + +

+ Does not mandate the type of storage used for configuration, but does + implement common functionality. Uses the Template Method design + pattern, requiring concrete subclasses to implement + methods. +

+

+ In contrast to a plain vanilla + , an + is supposed + to detect special objects defined in its object factory: therefore, + this class automatically registers + s, + s + and s that are + defined as objects in the context. +

+

+ An may be also supplied as + an object in the context, with the special, well-known-name of + "messageSource". Else, message resolution is delegated to the + parent context. +

+
+ Rod Johnson + Juergan Hoeller + Griffin Caprio (.NET) + + +
+ + + Configurable implementation of the + interface. + + +

+ This implementation + supports the configuration of resource access protocols and the + corresponding .NET types that know how to handle those protocols. +

+

+ Basic protocol-to-resource type mappings are also defined by this class, + while others can be added either internally, by application contexts + extending this class, or externally, by the end user configuring the + context. +

+

+ Only one resource type can be defined for each protocol, but multiple + protocols can map to the same resource type (for example, the + "http" and "ftp" protocols both map to the + type. The protocols that are + mapped by default can be found in the following list. +

+

+ + + assembly + + + config + + + file + + + http + + + https + + +

+
+ Aleksandar Seovic + + + +
+ + + Describes an object that can load + s. + + +

+ An implementation is + generally required to support the functionality described by this + interface. +

+

+ The class is a + standalone implementation that is usable outside an + ; the aforementioned + class is also used by the + class. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Return an handle for the + specified resource. + + +

+ The handle should always be a reusable resource descriptor; this + allows one to make repeated calls to the underlying + . +

+

+

    +
  • + Must support fully qualified URLs, e.g. "file:C:/test.dat". +
  • +
  • + Should support relative file paths, e.g. "test.dat" (this will be + implementation-specific, typically provided by an + implementation). +
  • +
+

+ + An handle does not imply an + existing resource; you need to check the value of an + 's + property to determine + conclusively whether or not the resource actually exists. + +
+ The resource location. + + An appropriate handle. + + + + +
+ + + The separator between the protocol name and the resource name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified default protocol for unqualified resources. + + + + + Returns a that has been + mapped to the protocol of the supplied . + + The name of the resource. + + A new instance for the + supplied . + + + If a + mapping does not exist for the supplied . + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + + Checks that the supplied starts + with one of the protocol names currently mapped by this + instance. + + The name of the resource. + + if the supplied + starts with one of the known + protocols; if not, or if the supplied + is itself . + + + + + Extracts the protocol name from the supplied + . + + The name of the resource. + + The extracted protocol name or if the + supplied is unqualified (or + is itself ). + + + + + The default protocol to use for unqualified resources. + + +

+ The initial value is "file". +

+
+
+ + + Provides the means to configure an application context in addition to + the methods exposed on the + interface. + + +

+ This interface is to be implemented by most (if not all) + implementations. +

+

+ Configuration and lifecycle methods are encapsulated here to avoid + making them obvious to + client code. +

+

+ Calling will close this + application context, releasing all resources and locks that the + implementation might hold. This includes disposing all cached + singleton objects. +

+ + does not invoke the + attendant on any parent + context. + +
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + The central interface to Spring.NET's IoC container. + + +

+ implementations + provide: + + + + Object factory functionality inherited from the + + and + interfaces. + + + + + The ability to resolve messages, supporting internationalization. + Inherited from the + interface. + + + + + The ability to load file resources in a generic fashion. + Inherited from the + interface. + + + + + Acts an an event registry for supporting loosely coupled eventing + between objecs. Inherited from the + interface. + + + + + The ability to raise events related to the context lifecycle. Inherited + from the + interface. + + + + + Inheritance from a parent context. Definitions in a descendant context + will always take priority. + + + +

+

+ In addition to standard object factory lifecycle capabilities, + implementations need + to detect + , + , and + objects and supply + their attendant dependencies accordingly. +

+

+ This interface is the central client interface in Spring.NET's IoC + container implementation. As such it does inherit a quite sizeable + number of interfaces; implementations are strongly encouraged to use + composition to satisfy each of the inherited interfaces (where + appropriate of course). +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + +
+ + + Extension of the interface + to be implemented by object factories that can enumerate all their object instances, + rather than attempting object lookup by name one by one as requested by clients. + + +

+ implementations that preload + all their objects (for example, DOM-based XML factories) may implement this + interface. This interface is discussed in + "Expert One-on-One J2EE Design and Development", by Rod Johnson. +

+

+ If this is an , + the return values will not take any + hierarchy into account, but + will relate only to the objects defined in the current factory. + Use the helper class to + get all objects. +

+

+ With the exception of + , + the methods and properties in this interface are not designed for frequent + invocation. Implementations may be slow. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + The root interface for accessing a Spring.NET IoC container. + + + + This is the basic client view of a Spring.NET IoC container; further interfaces + such as and + + are available for specific purposes such as enumeration and configuration. + + + This is the root interface to be implemented by objects that can hold a number + of object definitions, each uniquely identified by a + name. An independent instance of any of these objects can be obtained + (the Prototype design pattern), or a single shared instance can be obtained + (a superior alternative to the Singleton design pattern, in which the instance is a + singleton in the scope of the factory). Which type of instance + will be returned depends on the object factory configuration - the API is the same. + The Singleton approach is more useful and hence more common in practice. + + + The point of this approach is that the IObjectFactory is a central registry of + application components, and centralizes the configuring of application components + (no more do individual objects need to read properties files, for example). + See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a + discussion of the benefits of this approach. + + + Normally an IObjectFactory will load object definitions stored in a configuration + source (such as an XML document), and use the + namespace to configure the objects. However, an implementation could simply return + .NET objects it creates as necessary directly in .NET code. There are no + constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties + file etc. Implementations are encouraged to support references amongst objects, + to either Singletons or Prototypes. + + + In contrast to the methods in + , all of the methods + in this interface will also check parent factories if this is an + . If an object is + not found in this factory instance, the immediate parent is asked. Objects in + this factory instance are supposed to override objects of the same name in any + parent factory. + + + Object factories are supposed to support the standard object lifecycle interfaces + as far as possible. The maximum set of initialization methods and their standard + order is: + + + + + + 's + property. + + + + + 's + property. + + + + + + (only applicable if running within an ). + + + + + The + + method of + s. + + + + + 's + method. + + + + + A custom init-method definition. + + + + + The + + method of + s. + + + + +

+ + On shutdown of an object factory, the following lifecycle methods apply: + + + + + + 's + method. + + + + + A custom destroy-method definition. + + + + + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + +

+ Is this object a singleton? + + + + That is, will + always return the same object? + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Does this object factory contain an object with the given name? + + + + The concrete lookup strategy depends on the implementation. E.g. s + will also search their parent factory if a name isn't found . + + + The name of the object to query. + True if an object with the given name is defined. + + + + Return the aliases for the given object name, if defined. + + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + Provides a measure of type safety by throwing an exception if the object is + not of the required . + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + Determine the type of the object with the given name. + + + + More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. + + + The name of the object to query. + + The type of the object or if not determinable. + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + In addition to being generally useful, typically this method is used to provide + dependency injection functionality for objects that are instantiated outwith the + control of a developer. A case in point is the way that the current (1.1) + ASP.NET classes instantiate web controls... the instantiation takes place within + a private method of a compiled page, and thus cannot be hooked into the + typical Spring.NET IOC container lifecycle for dependency injection. + + + + The following code snippet assumes that the instantiated factory instance + has been configured with an object definition named + 'ExampleNamespace.BusinessObject' that has been configured to set the + Dao property of any ExampleNamespace.BusinessObject instance + to an instance of an appropriate implementation... + + namespace ExampleNamespace + { + public class BusinessObject + { + private IDao _dao; + + public BusinessObject() {} + + public IDao Dao + { + get { return _dao; } + set { _dao = value; } + } + } + } + + with the corresponding driver code looking like so... + + IObjectFactory factory = GetAnIObjectFactoryImplementation(); + BusinessObject instance = new BusinessObject(); + factory.ConfigureObject(instance, "object_definition_name"); + // at this point the dependencies for the 'instance' object will have been resolved... + + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + If there is no object definition for the supplied . + + + If any of the target object's dependencies could not be created. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + This is the indexer for the + interface. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Check if this object factory contains an object definition with the given name. + + +

+ Does not consider any hierarchy this factory may participate in. +

+ + Ignores any singleton objects that have been registered by other means + than object definitions. + +
+ The name of the object to look for. + + if this object factory contains an object + definition with the given name. + +
+ + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Sub-interface implemented by object factories that can be part + of a hierarchy. + + Rod Johnson + Rick Evans (.NET) + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts, also resolving a given alias if necessary. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Return the parent object factory, or + if this factory does not have a parent. + + + The parent object factory, or + if this factory does not have a parent. + + + + + Describes an object that can resolve messages. + + +

+ This enables the parameterization and internationalization of messages. +

+

+ Spring.NET provides one out-of-the-box implementation for production + use: +

    +
  • .
  • +
+

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + The default message if name is not found. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + +

+ This method must use the + + value to obtain a resource. +

+

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The resolved object, or if not found. + +
+ + + Gets a localized resource object identified by the supplied + . + + +

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + +
+ + + Applies resources to object properties. + + +

+ Resource key names are of the form objectName.propertyName. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + + Encapsulates event publication functionality. + + +

+ Serves as a super-interface for the + interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Publishes an application context event. + + + The source of the event. May be . + + + The event that is to be raised. + + + + + A registry that manages subscriptions to and the + publishing of events. + + Griffin Caprio + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + Subscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Raised in response to an application context event. + + + + + Returns the date and time this context was loaded. + + +

+ This is to be set immediately after an + has been + instantiated and its configuration has been loaded. Implementations + are permitted to update this value if the context is reset or + refreshed in some way. +

+
+ + The representing when this context + was loaded. + + +
+ + + Gets the parent context, or if there is no + parent context. + + +

+ If the parent context is , then this context + is the root of any context hierarchy. +

+
+ + The parent context, or if there is no + parent. + +
+ + + Gets and sets a name for this context. + + + A name for this context. + + + + + Interface defining methods for start/stop lifecycle control. + The typical use case for this is to control asynchronous processing. + + + + Can be implemented by both components (typically a Spring object defined in + a spring and containers + (typically a spring . Containers will + propagate start/stop signals to all components that apply. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Gets a value indicating whether this component is currently running. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + true if this component is running; otherwise, false. + + + + + Add an + + that will get applied to the internal object factory of this + application context on refresh, before any of the object + definitions are evaluated. + + +

+ To be invoked during context configuration. +

+
+ + The factory processor to register. + + +
+ + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Return the internal object factory of this application context. + + +

+ Can be used to access specific functionality of the factory. +

+ + This is just guaranteed to return an instance that is not + after the context has been refreshed + at least once. + + + Do not use this to post-process the object factory; singletons + will already have been instantiated. Use an + + to intercept the object factory setup process before objects even + get touched. + +
+ +
+ + + Sets the parent of this application context. + + + + The parent should not be changed: it should only be set + outside a constructor if it isn't available when an instance of + this class is created. + + + + The parent context. + + + + + Interface for registries that hold object definitions, i.e. + + and + + instances. + + +

+ Typically implemented by object factories that work with the + + hierarchy internally. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Determine whether the given object name is already in use within this registry, + i.e. whether there is a local object or alias registered under this name. + + + + + Return the names of all objects defined in this registry. + + + The names of all objects defined in this registry, or an empty array + if none defined + + + + + Return the names of all objects defined in this registry. + If includeAncestors is true it includes all objects in the defined parent factories. + + to include parent factories in result + + The names of all objects defined in this registry, if includeAncestors is true it includes + all objects in the defined parent factories, or an empty array if none defined + + + + + Check if this registry contains a object definition with the given name. + + + The name of the object to look for. + + + True if this object factory contains an object definition with the + given name. + + + + + Returns the + + for the given object name. + + + The name of the object to find a definition for. + + + The for + the given name (never null). + + + If the object definition cannot be resolved. + + + In case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Return the aliases for the given object name, if defined. + + the object name to check for aliases + + +

+ Will ask the parent factory if the object cannot be found in this + factory instance. +

+
+ + The aliases, or an empty array if none. + + + If there's no such object definition. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + + The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Return the number of objects defined in the registry. + + + The number of objects defined in the registry. + + + + + Name of the .Net config section that contains Spring.Net context definition. + + + + + Default name of the root context. + + + + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then message resolution + will be delegated to the parent context (if any). +

+
+
+ + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then a default + will be used. +

+
+
+ + + The instance for this class. + + + + + The instance we delegate + our implementation of said interface to. + + + + + The instance we + delegate our implementation of said interface to. + + + + + Protects access to the internal object factory used by the ApplicationContext if attempted to be accessed when in improper state. + + The internal ObjectFactory used by the ApplicationContext + Cannot Access ApplicationContext in this state! + + + + Creates a new instance of the + with no parent context. + + +

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

+
+
+ + + Creates a new instance of the + with no parent context. + + +

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

+
+ Flag specifying whether to make this context case sensitive or not. +
+ + + Creates a new instance of the + with the supplied parent context. + + +

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

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent application context. +
+ + + Adds the given to the list of standard + processors being added to the underlying + + + Each time is called on this context, the context ensures, that + all default s are registered with the underlying . + + The instance. + + + + Closes this context and disposes of any resources (such as + singleton objects in the wrapped + ). + + + + + Subclasses must implement this method to perform the actual + configuration loading. + + +

+ This method is invoked by + , + before any other initialization occurs. +

+
+ + In the case of errors encountered while refreshing the object factory. + +
+ + + Returns the internal object factory of the parent context if it implements + ; else, + returns the parent context itself. + + + The parent context's object factory, or the parent itself. + + + + + Raises an application context event. + + + Any arguments to the event. May be . + + + + + Raises an application context event. + + + The source of the event. + + + Any arguments to the event. May be . + + + + + Create the strategy to be used + + + + + Modify the application context's internal object factory after its standard + initialization. + + +

+ All object definitions will have been loaded, but no objects + will have been instantiated yet. This allows for the registration + of special + s + in certain + implementations. +

+
+ + The object factory used by the application context. + + + In the case of errors. + . +
+ + + Template method which can be overridden to add context-specific + work before the underlying object factory gets refreshed. + + + + + Template method which can be overridden to add context-specific + refresh work. + + +

+ Called on initialization of special objects, before instantiation + of singletons. +

+
+
+ + + Template method which can be overridden to add context-specific + work after the context was refreshed but before the + event gets raised. + + + + + Instantiate and invoke all registered + + objects, respecting any explicit ordering. + + + + Must be called before singleton instantiation. + + + In the case of errors. + + + + Resets the well-known ObjectPostProcessorChecker that logs an info + message when an object is created during IObjectPostProcessor + instantiation, i.e. when an object is not eligible for being + processed by all IObjectPostProcessors. + + + + + Initializes the default event registry for this context. + + + + + Returns the internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + The internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + + + Initializes the default message source for this context. + + +

+ Uses any parent context's message source if one is not available + in this context. +

+
+
+ + + Add a new + that will get applied to the internal object factory of this application context + on refresh, before any of the object definitions are evaluated. + + + The factory processor to register. + + + + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Registers well-known s and + preregisters well-known dependencies using + + the raw object factory as returned from + + + + Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory + + + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of all objects defined in this factory, if includeAncestorsis true + includes all parent factories. + + to include parent factories into result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Check if this object factory contains an object definition with the given name. + + The name of the object to look for. + + True if this object factory contains an object definition with the given name. + + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + + if an object with the given name is defined. + + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Is this object a singleton? + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determine the of the object with the + given name. + + The name of the object to query. + + The of the object, or + if not determinable. + + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + + + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Determine whether the given object name is already in use within this context, + i.e. whether there is a local object. May be override by subclasses, the default + implementation simply returns + + + + + Register a new object definition with this registry. + Must support + + and . + + The name of the object instance to register. + The definition of the object instance to register. + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + The name of the object. + The alias that will behave the same as the object name. + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + + Subscribes to published events of a all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Publishes an application context event. + + +

+ +

+
+ + The source of the event. May be . + + + The event that is to be raised. + + +
+ + + An object that can be used to synchronize access to the + + + + + Set the to be used by this context. + + + + + The timestamp when this context was first loaded. + + + The timestamp (milliseconds) when this context was first loaded. + + + + + Gets a flag indicating whether context should be case sensitive. + + true if object lookups are case sensitive; otherwise, false. + + + + The for this context. + + + If the context has not been initialized yet. + + + + + The for this context. + + + If the context has not been initialized yet. + + + + + Returns the list of the + s + that will be applied to the objects created with this factory. + + +

+ The elements of this list are instances of implementations of the + + interface. +

+
+ + The list of the + s + that will be applied to the objects created with this factory. + +
+ + + Return the internal object factory of this application context. + + + + + Gets the parent context, or if there is no + parent context. + + + The parent context, or if there is no + parent. + + + + + + Gets a value indicating whether this component is currently running. + + + true if this component is running; otherwise, false. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + + + Gets a dictionary of all singleton beans that implement the + ILifecycle interface in this context. + + A dictionary of ILifecycle objects with object name as key. + + + + Raised in response to an implementation-dependant application + context event. + + + + + The date and time this context was first loaded. + + + The representing when this context + was first loaded. + + + + + A name for this context. + + + A name for this context. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return the parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + + Allows for custom modification of new object instances, e.g. + checking for marker interfaces or wrapping them with proxies. + + +

+ Application contexts can auto-detect + + objects in their object definitions and apply them before any other + objects get created. Plain object factories allow for programmatic + registration of post-processors. +

+

+ Typically, post-processors that populate objects via marker interfaces + or the like will implement + , + and post-processors that wrap objects with proxies will normally implement + . +

+
+ Juergen Hoeller + Aleksandar Seovic (.NET) + +
+ + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + 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. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + 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. + +
+ + + Abstract implementation of the interface, + implementing common handling of message variants, making it easy + to implement a specific strategy for a concrete . + + +

Subclasses must implement the abstract ResolveObject + method.

+

Note: By default, message texts are only parsed through + String.Format if arguments have been passed in for the message. In case + of no arguments, message texts will be returned as-is. As a consequence, + you should only use String.Format escaping for messages with actual + arguments, and keep all other messages unescaped. +

+

Supports not only IMessageSourceResolvables as primary messages + but also resolution of message arguments that are in turn + IMessageSourceResolvables themselves. +

+

This class does not implement caching of messages per code, thus + subclasses can dynamically change messages over time. Subclasses are + encouraged to cache their messages in a modification-aware fashion, + allowing for hot deployment of updated messages. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + Harald Radi (.NET) + + + +
+ + + Sub-interface of to be + implemented by objects that can resolve messages hierarchically. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + holds the logger instance shared with subclasses. + + + + + Initializes this instance. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ If the lookup is not successful throw NoSuchMessageException +
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException. +

+
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message if name is not found. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException +

+
+
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + The value object storing those attributes that are required to + properly resolve a message. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful. + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. If + the resource name resolves to null, then in .NET 1.1 the return + value will be String.Empty whereas in .NET 2.0 it will return + null. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Resolve the given code and arguments as message in the given culture, + returning null if not found. Does not fall back to the code + as default message. Invoked by GetMessage methods. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Try to retrieve the given message from the parent MessageSource, if any. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Return a fallback default message for the given code, if any. + + + Default is to return the code itself if "UseCodeAsDefaultMessage" + is activated, or return no fallback else. In case of no fallback, + the caller will usually receive a NoSuchMessageException from GetMessage + + The code to lookup up, such as 'calculator.noRateSet'. + The default message to use, or null if none. + + + + Renders the default message string. The default message is passed in as specified by the + caller and can be rendered into a fully formatted default message shown to the user. + + Default implementation passed he String for String.Format resolving any + argument placeholders found in them. Subclasses may override this method to plug + in custom processing of default messages. + + The default message. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The rendered default message (with resolved arguments) + + + + Format the given default message String resolving any + agrument placeholders found in them. + + The message to format. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The formatted message (with resolved arguments) + + + + Search through the given array of objects, find any + MessageSourceResolvable objects and resolve them. + + + Allows for messages to have MessageSourceResolvables as arguments. + + + The array of arguments for a message. + The with which the + resource is associated. + An array of arguments with any IMessageSourceResolvables resolved + + + + Gets the specified resource (e.g. Icon or Bitmap). + + The name of the resource to resolve. + + The to resolve the + code for. + + The resource if found. otherwise. + + + + Applies resources from the given name on the specified object. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Subclasses must implement this method to resolve a message. + + The code to lookup up, such as 'calculator.noRateSet'. + The with which the + resource is associated. + The resolved message from the backing store of message data. + + + + Resolves an object (typically an icon or bitmap). + + +

+ Subclasses must implement this method to resolve an object. +

+
+ The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + +
+ + + Applies resources to object properties. + + +

+ Subclasses must implement this method to apply resources + to an arbitrary object. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + Gets or Sets a value indicating whether to use the message code as + default message instead of throwing a NoSuchMessageException. + Useful for development and debugging. Default is "false". + + +

Note: In case of a IMessageSourceResolvable with multiple codes + (like a FieldError) and a MessageSource that has a parent MessageSource, + do not activate "UseCodeAsDefaultMessage" in the parent: + Else, you'll get the first code returned as message by the parent, + without attempts to check further codes.

+

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, + AbstractMessageSource contains special checks + to delegate to the internal GetMessageInternal method if available. + In general, it is recommended to just use "UseCodeAsDefaultMessage" during + development and not rely on it in production in the first place, though.

+

Alternatively, consider overriding the GetDefaultMessage + method to return a custom fallback message for an unresolvable code.

+
+ + true if use the message code as default message instead of + throwing a NoSuchMessageException; otherwise, false. + +
+ + + The parent message source used to try and resolve messages that + this object can't resolve. + + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + Convenient abstract superclass for + implementations that + draw their configuration from XML documents containing object + definitions as understood by an + . + + Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + class + with the given parent context. + + +

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

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent context. +
+ + + Instantiates and populates the underlying + with the object + definitions yielded up by the + method. + + + In the case of errors encountered while refreshing the object factory. + + + In the case of errors encountered reading any of the resources + yielded by the method. + + + + + + Initialize the object definition reader used for loading the object + definitions of this context. + + +

+ The default implementation of this method is a no-op; i.e. it does + nothing. Can be overridden in subclasses to provide custom + initialization of the supplied + ; for example, a derived + class may want to turn off XML validation. +

+
+ + The object definition reader used by this context. + +
+ + + Load the object definitions with the given + . + + +

+ The lifecycle of the object factory is handled by + ; + therefore this method is just supposed to load and / or register + object definitions. +

+
+ + The reader containing object definitions. + + In case of object registration errors. + + + In the case of errors encountered reading any of the resources + yielded by either the or + the methods. + +
+ + + Loads the object definitions into the given object factory, typically through + delegating to one or more object definition readers. + + The object factory to lead object definitions into + + + + + + Create a new reader instance for importing object definitions into the specified . + + the to be associated with the reader + a new instance. + + + + Customizes the internal object factory used by this context. + + Called for each attempt. +

+ The default implementation is empty. Can be overriden in subclassses to customize + DefaultListableBeanFatory's standard settings. +

+ The newly created object factory for this context +
+ + + Create an internal object factory for this context. + + +

+ Called for each attempt. + This default implementation creates a + + with the internal object factory of this context's parent serving + as the parent object factory. Can be overridden in subclasse,s + for example to customize DefaultListableBeanFactory's settings. +

+
+ The object factory for this context. +
+ + + Determine whether the given object name is already in use within this context's object factory, + i.e. whether there is a local object or alias registered under this name. + + + + + An array of resource locations, referring to the XML object + definition files that this context is to be built with. + + +

+ Examples of the format of the various strings that would be + returned by accessing this property can be found in the overview + documentation of with the + class. +

+
+ + An array of resource locations, or if none. + +
+ + + An array of resources that this context is to be built with. + + +

+ Examples of the format of the various strings that would be + returned by accessing this property can be found in the overview + documentation of with the + class. +

+
+ + An array of s, or if none. + +
+ + + Subclasses must return their internal object factory here. + + + The internal object factory for the application context. + + + + + + + implementation that passes the application context to object that + implement the + , + , and + interfaces. + + +

+ If an object's class implements more than one of the + , + , and + interfaces, then the + order in which the interfaces are satisfied is as follows... + + + + + + + + + + + +

+

+ Application contexts will automatically register this with their + underlying object factory. Applications should thus never need to use + this class directly. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + The that this + instance will work with. + + + + + Apply this + to the given new object instance before any object + initialization callbacks. + + + The new object instance. + + + The name of the object. + + + The 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. + + + 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. + + + + + + Convenient superclass for application objects that want to be aware of + the application context, e.g. for custom lookup of collaborating object + or for context-specific resource access. + + +

+ It saves the application context reference and provides an + initialization callback method. Furthermore, it offers numerous + convenience methods for message lookup. +

+

+ There is no requirement to subclass this class: it just makes things + a little easier if you need access to the context, e.g. for access to + file resources or to the message source. Note that many application + objects do not need to be aware of the application context at all, + as they can receive collaborating objects via object references. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) +
+ + + To be implemented by any object that wishes to be notified + of the that it runs in. + + +

+ Implementing this interface makes sense when an object requires access + to a set of collaborating objects. Note that configuration via object + references is preferable to implementing this interface just for object + lookup purposes. +

+

+ This interface can also be implemented if an object needs access to + file resources, i.e. wants to call + , or access to + the . However, it is + preferable to implement the more specific + + interface to receive a reference to the + object in that scenario. +

+

+ Note that dependencies can also + be exposed as object properties of the + type, populated via strings with + automatic type conversion performed by an object factory. This obviates + the need for implementing any callback interface just for the purpose + of accessing a specific file resource. +

+

+ + is a convenience implementation of this interface for your + application objects. +

+

+ For a list of all object lifecycle methods, see the overview for the + interface. +

+
+ Rod Johnson + Mark Pollack (.NET) + + + +
+ + + 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. + + +
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + The that this + object runs in. + +
+ + + Intializes the wrapped + . + + +

+ This is a template method that subclasses can override for custom + initialization behavior. +

+

+ Gets called by the + + instance directly after setting the context instance. +

+ + Does not get called on reinitialization of the context. + +
+ + In the case of any initialization errors. + + + If thrown by application context methods. + +
+ + + The context class that any context passed to the + + must be an instance of. + + + The + . + + + + + Return a for the + application context used by this object, for easy message access. + + + + + Gets or sets the that this + object runs in. + + + When passed an unexpected + implementation + instance that is not compatible with the + defined by the value of the + . + property. Also, thrown when trying to re-initialize with a + different than was + originally used. + + + If thrown by any application context methods. + + + + + + + ApplicationContext that can scan to identify object definitions + + + + + Generic ApplicationContext implementation that holds a single internal + instance and does not + assume a specific object definition format. + + + Implements the interface in order + to allow for aplying any object definition readers to it. + Typical usage is to register a variety of object definitions via the + interface and then call + to initialize those + objects with application context semantics (handling + , auto-detecting + ObjectFactoryPostProcessors, etc). + + In contrast to other IApplicationContext implementations that create a new internal + IObjectFactory instance for each refresh, the internal IObjectFactory of this context + is available right from the start, to be able to register object definitions on it. + may only be called once + Usage examples + + GenericApplicationContext ctx = new GenericApplicationContext(); + // register your objects and object definitions + ctx.RegisterObjectDefinition(...) + ctx.Refresh(); + + + Mark Pollack + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true names in the context are case sensitive. + + + + Initializes a new instance of the class. + + The object factory instance to use for this context. + + + + Initializes a new instance of the class. + + The parent application context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + + + + Initializes a new instance of the class. + + The object factory to use for this context + The parent applicaiton context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + The object factory to use for this context + + + + Do nothing operation. We hold a single internal ObjectFactory and rely on callers + to register objects throug our public methods (or the ObjectFactory's). + + + In the case of errors encountered while refreshing the object factory. + + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + + + + Return the internal object factory of this application context. + + + + + + Gets the underlying object factory of this context, available for + registering object definitions. + + You need to call Refresh to initialize the + objects factory and its contained objects with application context + semantics (autodecting IObjectFactoryPostProcessors, etc). + The internal object factory (as DefaultListableObjectFactory). + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true names in the context are case sensitive. + + + + Initializes a new instance of the class. + + The object factory instance to use for this context. + + + + Initializes a new instance of the class. + + The parent application context. + + + + Initializes a new instance of the class. + + The name of the application context.if set to true names in the context are case sensitive.The parent application context. + + + + Initializes a new instance of the class. + + The object factory to use for this contextThe parent applicaiton context. + + + + Initializes a new instance of the class. + + The name of the application context.if set to true names in the context are case sensitive.The parent application context.The object factory to use for this context + + + + Creates an instance + using context definitions supplied in a custom configuration and + configures the with that instance. + + + Implementations of the + interface must provide the following two constructors: + + + + A constructor that takes a string array of resource locations. + + + + + A constructor that takes a reference to a parent application context + and a string array of resource locations (and in that order). + + + +

+ Note that if the type attribute is not present in the declaration + of a particular context, then a default + + is assumed. This default + + is currently the + ; please note the exact + of this default is an + implementation detail, that, while unlikely, may do so in the future. + to +

+
+ +

+ This is an example of specifying a context that reads its resources from + an embedded Spring.NET XML object configuration file... +

+ + + + +
+ + + + + + + + + +

+ This is an example of specifying a context that reads its resources from + a custom configuration section within the same application / web + configuration file and uses case insensitive object lookups. +

+

+ Please note that you must adhere to the naming + of the various sections (i.e. '<sectionGroup name="spring">' and + '<section name="context">'. +

+ + + + +
+
+ + + + + + + + + + + + +

+ And this is an example of specifying a hierarchy of contexts. The + hierarchy in this case is only a simple parent->child hierarchy, but + hopefully it illustrates the nesting of context configurations. This + nesting of contexts can be arbitrarily deep, and is one way... child + contexts know about their parent contexts, but parent contexts do not + know how many child contexts they have (if any), or have references + to any such child contexts. +

+ + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mark Pollack + Aleksandar Seovic + Rick Evans + + + + + Creates an instance + using the context definitions supplied in a custom + configuration section. + + +

+ This instance is + also used to configure the . +

+
+ + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + An instance + populated with the object definitions supplied in the configuration + section. + +
+ + + Create all child-contexts in the given for the given context. + + The parent context to use + The current configContext + The list of child context elements + + + + Instantiates a new context. + + + + + Gets the context's name specified in the name attribute of the context element. + + The current configContext + The context element + + + + Extracts the context-type from the context element. + If none is specified, returns the parent's type. + + + + + Extracts the case-sensitivity attribute from the context element + + + + + Gets the context specified in the type + attribute of the context element. + + +

+ If this attribute is not defined it defaults to the + type. +

+
+ + If the context type does not implement the + interface. + +
+ + + Returns the array of resources containing object definitions for + this context. + + + + + Returns the array of child contexts for this context. + + + + + The of + created if no type attribute is specified on a context element. + + + + + + Get the context's case-sensitivity to use if none is specified + + +

+ Derived handlers may override this property to change their default case-sensitivity. +

+

+ Defaults to 'true'. +

+
+
+ + + Specifies, whether the instantiated context will be automatically registered in the + global . + + + + + Returns if the context should be lazily + initialized. + + + + + Constants defining the structure and values associated with the + schema for laying out Spring.NET contexts in XML. + + + + + Defines a single + . + + + + + Specifies a context name. + + + + + Specifies if context should be case sensitive or not. Default is true. + + + + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but its generally regarded + as better form if the names of one's objects + are specified explicitly. +

+
+
+ + + Specifies whether context should be lazy initialized. + + + + + Defines an + + + + + Specifies the URI for an + . + + + + + Provides access to a central registry of + s. + + +

+ A singleton implementation to access one or more application contexts. Application + context instances are cached. +

+

Note that the use of this class or similar is unnecessary except (sometimes) for + a small amount of glue code. Excessive usage will lead to code that is more tightly + coupled, and harder to modify or test. Consider refactoring your code to use standard + Dependency Injection techniques or implement the interface IApplicationContextAware to + obtain a reference to an application context.

+
+ Mark Pollack + Aleksandar Seovic + +
+ + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the ContextRegistry class. + + +

+ Explicit static constructor to tell C# compiler + not to mark type as beforefieldinit. +

+
+
+ + + Registers an instance of an + . + + +

+ This is usually called via a + inside a .NET + application configuration file. +

+
+ The application context to be registered. + + If a context has previously been registered using the same name + +
+ + + Handles events raised by an application context. + + + + + + + Removes the context from the registry + + + Has no effect if the context wasn't registered + + ´the context to remove from the registry + + + + Returns the root application context. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The root application context. +
+ + + Returns context based on specified name. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The context name. + The specified context, or null, if context with that name doesn't exists. + + If the context name is null or empty + +
+ + + Removes all registered + s from this + registry. + + + Raises the event while still holding a lock on + + + + + Allows to check, if a context is already registered + + The context name. + true, if the context is already registered. false otherwise + + + + This event is fired, if ContextRegistry.Clear() is called.
+ Clients may register to get informed +
+ + This event is fired while still holding a lock on the Registry.
+ 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used +
+
+ + + Gets an object that should be used to synchronize access to ContextRegistry + from the calling code. + + + + + Default implementation of the + interface. + + +

+ Provides easy ways to store all the necessary values needed to resolve + messages from an . +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Describes objects that are suitable for message resolution in a + . + + +

+ Spring.NET's own validation error classes implement this interface. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + +

+ The last code will therefore be the default one. +

+
+ + A array of codes which are associated + with this message. + +
+ + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + Creates a new instance of the + class + using a single code. + + The message code to be resolved. + + + + Initializes a new instance of the class. + + The codes to be used to resolve this message + + + + Creates a new instance of the + class + using multiple codes. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + + + Creates a new instance of the + class + using multiple codes and a default message. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + The default message used if no code could be resolved. + + + + + Creates a new instance of the + class + from another resolvable. + + +

+ This is the copy constructor for the + class. +

+
+ + The to be copied. + + + If the supplied is . + +
+ + + Returns a representation of this + . + + + A representation of this + . + + + + + Calls the visit method on the supplied + to output a version of this class. + + The visitor to use. + + A representation of this + . + + + + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + + A array of codes which are associated + with this message. + + + + + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + + Return the default code for this resolvable. + + + The default code of this resolvable; this will be the last code in + the codes array, or if this instance has no + codes. + + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + + Default section handler that can handle any configuration section. + + +

+ Simply returns the configuration section as an . +

+
+ Aleksandar Seovic +
+ + + Returns the configuration section as an + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is a null reference. + + + The for the section. + + Config section as XmlElement. + + + + Empty implementation that + simply delegates all method calls to it's parent + . + + +

+ If no parent is available, + no messages will be resolved (and a + will be thrown). +

+

+ Used as placeholder by the + class, + if the context definition doesn't define its own + . Not intended for direct use + in applications. +

+
+ Juergan Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + + Helper class for easy access to messages from an + , providing various + overloaded GetMessage methods. + + +

+ Available from + , but also + reusable as a standalone helper to delegate to in application objects. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + + +
+ + + Creates a new instance of the + class + that uses the current + for all locale specific lookups. + + + The to use to locate messages. + + + + + Creates a new instance of the + class + + + The to use to locate + messages. + + + The to use for + locale specific messages. + + + + + Retrieve the message for the given code and the default + . + + The code of the message. + The message. + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + The message. + + + + Retrieve the message for the given code and the default + . + + The code of the message. + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + . + + + The . + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + in the given + . + + + The . + + + The to use for + lookups. + + The message + + If the message could not be found. + + + + + Visitor class to represent + instances. + + +

+ Used in the first instance to supply stringified versions of + instances. +

+

+ Other methods can be added here to return different representations, + including XML, CSV, etc.. +

+
+ Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + + + Outputs the supplied + as a nicely formatted . + + + The to output. + + + + + Configuration section handler for the (recommended, Spring.NET standard) parsers + config section. + + +

+ Spring.NET allows the registration of custom configuration parsers that + can be used to create simplified configuration schemas that better + describe object definitions. +

+

+ For example, Spring.NET uses this facility internally in order to + define simplified schemas for various AOP, Data and Services definitions. +

+
+ +

+ The following example shows how to configure both this section handler + and how to define custom configuration parsers within a Spring.NET + config section. +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Registers parsers specified in the (recommended, Spring.NET standard) + parsers config section with the . + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because parsers + are registered as a side-effect of this object's execution and there + is thus no need to return anything. + + + + + An that doesn't do a whole lot. + + +

+ is an implementation of + the NullObject pattern. It should be used in those situations where a + needs to be passed (say to a + method) but where the resolution of messages is not required. +

+

+ There should not (typically) be a need to instantiate instances of this class; + does not maintan any state + and the instance is + thus safe to pass around. +

+
+ Aleksandar Seovic +
+ + + The canonical instance of the + class. + + + + + Creates a new instance of the class. + + +

+ Consider using + instead. +

+
+
+ + + Simply returns the supplied message as-is. + + The code of the message to resolve. + + The to resolve the + code for. + + + The supplied message as-is. + + + + + Always returns . + + The code of the object to resolve. + + The to resolve the + code for. + + + (always). + + + + + Does nothing. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Handler for Spring.NET resourceHandlers config section. + + +

+ Spring allows registration of custom resource handlers that can be used to load + object definitions from. +

+

+ For example, if you wanted to store your object definitions in a database instead + of in the config file, you could write a custom implementation + and register it with Spring using 'db' as a protocol name. +

+

+ Afterwards, you would simply specify resource URI within the context config element + using your custom resource handler. +

+
+ +

+ The following example shows how to configure both this section handler, + how to define custom resource within Spring config section, and how to load + object definitions using custom resource handler: +

+ + + + +
+ + + + + + + + + + + + + + Aleksandar Seovic + + + + + Registers resource handlers that are specified in + the resources config section with the . + + + The configuration settings in a corresponding parent + configuration section. Ignored. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns null, because resource handlers are registered + as a sideffect of its execution and there is no need to return anything. + + + + + An implementation that + accesses resources from .resx / .resource files. + + Note that for the method + GetResourceObject if the resource name resolves to null, then in + .NET 1.1 the return value will be String.Empty whereas + in .NET 2.0 it will return null. + Griffin Caprio (.NET) + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + + + + Defines a simple initialization callback for objects that need to to some + post-initialization logic after all of their dependencies have been injected. + + +

+ An implementation of the + + method might perform some additional custom initialization (over and above that + performed by the constructor), or merely check that all mandatory properties + have been set (this last example is a very typical use case of this interface). +

+ + The use of the + interface + by non-Spring.NET framework code can be avoided (and is generally + discouraged). The Spring.NET container provides support for a generic + initialization method given to the object definition in the object + configuration store (be it XML, or a database, etc). This requires + slightly more configuration (one attribute-value pair in the case of + XML configuration), but removes any dependency on Spring.NET from the + class definition. + +
+ Rod Johnson + Rick Evans (.NET) + +
+ + + 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. + +
+ + + Creates a new instance of the + class. + + + + + Resolves a given code by searching through each assembly name in + the base names array. + + The code to resolve. + + The to use for lookups. + + The message from the resource set. + + + + Resolves a given code by searching through each assembly name in the array. + + The code to resolve. + + The to use for lookups. + + The object from the resource set. + + + + Uses a System.ComponentModel.ComponentResourceManager + to apply resources to object properties. + Resource key names are of the form objectName.propertyName + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + An object that contains the property values to be applied. + + + The base name of the object to use for the key lookup. + + + The to use for lookups. + If , uses the + value. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + + + Resolves a code into an object given a base name. + + The to search. + The code to resolve. + + The to use for lookups. + + The object from the resource file. + + + + Returns a representation of the + . + + A representation of the + . + + + + Invoked by an + after it has set all object properties supplied. + + +

+ The list may contain objects of type or + . types + are converted to instances using the notation + resourcename, assembly partial name. +

+
+ + If the conversion from a to a + can't be performed. + +
+ + + The collection of s + in this . + + + + + that allows concrete registration of + objects and messages in code, rather than from external configuration sources. + + +

+ Mainly useful for testing. +

+
+ Rod Johnson + Griffin Caprio (.NET) +
+ + + Creates a new instance of the StaticApplicationContext class. + + + + + Creates a new instance of the StaticApplicationContext class. + + The parent application context. + + + + Creates a new, named instance of the StaticApplicationContext class. + + the context name + The parent application context. + + + + Do nothing: we rely on callers to update our public methods. + + + + + Register a singleton object with the default object factory. + + The name of the object. + The of the object. + The property values for the singleton instance. + + + + Registers a prototype object with the default object factory. + + The name of the prototype object. + The of the prototype object. + The property values for the prototype instance. + + + + Associate the given message with the given code. + + The lookup code. + + The that the message should be found within. + + The message associated with the lookup code. + + + + Simple implementation of + that allows messages to be held in an object and added programmatically. + + +

+ Mainly useful for testing. +

+

+ This supports internationalization. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Returns a format string. + + The code of the message to resolve. + + The to resolve the + code for. + + + A format string or if not found. + + + + + + Resolves an object (typically an icon or bitmap). + + The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + + + + + + Applies resources to object properties. + + +

+ Uses a System.ComponentModel.ComponentResourceManager + internally to apply resources to object properties. Resource key + names are of the form objectName.propertyName. +

+

+ This feature is not currently supported on version 1.0 of the .NET platform. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + +
+ + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The message format associated with this lookup code. + + + + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The object associated with this lookup code. + + + + + Returns a representation of this + message source. + + + A containing all of this message + source's messages. + + + + + Configuration section handler for the Spring.NET typeAliases + config section. + + +

+ Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+

+ This includes type names specified within an object definition, as well + as values of the properties or constructor arguments that expect + instances. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type aliases within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeAliases config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of this + object's execution and thus there is no need to return anything. + + + + + Configuration section handler for the Spring.NET typeConverters + config section. + + +

+ Type converters are used to convert objects from one type into another + when injecting property values, evaluating expressions, performing data + binding, etc. +

+

+ They are a very powerful mechanism as they allow Spring.NET to automatically + convert string-based property values from the configuration file into the appropriate + type based on the target property's type or to convert string values submitted + via a web form into a type that is used by your data model when Spring.NET data + binding is used. Because they offer such tremendous help, you should always provide + a type converter implementation for your custom types that you want to be able to use + for injected properties or for data binding. +

+

+ The standard .NET mechanism for specifying type converter for a particular type is + to decorate the type with a , passing the type + of the -derived class as a parameter. +

+

+ This mechanism will still work and is a preferred way of defining type converters if + you control the source code for the type that you want to define a converter for. However, + this configuration section allows you to specify converters for the types that you don't + control and it also allows you to override some of the standard type converters, such as + the ones that are defined for some of the types in the .NET Base Class Library. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type converters within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeConverters config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of + its execution and thus there is no need to return anything. + + + + + An implementation that + reads context definitions from XML based resources. + + +

+ Currently, the resources that are supported are the file, + http, ftp, config and assembly resource + types. +

+

+ You can provide custom implementations of the + interface and and register them + with any that inherits + from the + + interface. +

+ + In case of multiple config locations, later object definitions will + override ones defined in previously loaded resources. This can be + leveraged to deliberately override certain object definitions via an + extra XML file. + +
+ +

+ Find below some examples of instantiating an + using a + variety of different XML resources. +

+ + // an XmlApplicationContext that reads its object definitions from an + // XML file that has been embedded in an assembly... + IApplicationContext context = new XmlApplicationContext + ( + "assembly://AssemblyName/NameSpace/ResourceName" + ); + + // an XmlApplicationContext that reads its object definitions from a + // number of disparate XML resources... + IApplicationContext context = new XmlApplicationContext + ( + // from an XML file that has been embedded in an assembly... + "assembly://AssemblyName/NameSpace/ResourceName", + // and from a (relative) filesystem-based resource... + "file://Objects/services.xml", + // and from an App.config / Web.config resource... + "config://spring/objects" + ); + +
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + +
+ + + Initializes a new instance of the XmlApplicationContext class. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The created context will be case sensitive. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + This constructor is meant to be used by derived classes. By passing =false, it is + the responsibility of the deriving class to call to initialize the context instance. + + if true, is called automatically. + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + An array of resource locations, referring to the XML object + definition files with which this context is to be built. + + + An array of resource locations, or if none. + + + + + + An array of resources instances with which this context is to be built. + + + An array of s, or if none. + + + + + + Encapsulates arguments to the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + + + + Initializes a new instance of the XmlApplicationContextArgs class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + if set to true [case sensitive]. + if set to true [refresh]. + + + Exception thrown during application context initialization. + Rod Johnson + Mark Pollack (.NET) + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException 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 ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the + class. + + + + + 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. + + + + + 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. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Marks an interface as being an application event listener. + + Griffin Caprio + + + + + Creates a new instance of the + class. + + + + + The callback for application events. + + + + + To be implemented by any object that wishes to be notified + of the associated with it. + + +

+ In the current implementation, the + will typically be the + associated that + spawned the implementing object. +

+

+ The can usually also be + passed on as an object reference to arbitrary object properties or + constructor arguments, because a + is typically defined as an + object with the well known name "messageSource" in the + associated application context. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Sets the associated + with this object. + + +

+ Invoked after population of normal object properties but + before an initializing callback such as the + + method of the + interface + or a custom init-method. +

+

+ It is also invoked before the + + property of any + + implementation. +

+
+ + The associated + with this object. + +
+ + + Interface to be implemented by any object that wishes to be notified + of the (typically the + ) that it runs in. + + +

+ Note that dependencies can also + be exposed as object properties of type + , populated via strings with + automatic type conversion by the object factory. This obviates the + need for implementing any callback interface just for the purpose of + accessing a specific resource. +

+

+ You typically need an + when your application object has to access a variety of file resources + whose names are calculated. A good strategy is to make the object use + a default resource loader but still implement the + interface to allow + for overriding when running in an + . +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Sets the + that this object runs in. + + +

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

+
+
+ + + Thrown when a message cannot be resolved. + + Rod Johnson + Mark Pollack (.NET) + + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class with the + specified message. + + + 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. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for given culture. + + + The that was used + to search for the code. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for the current UI culture. + + + + + Convenience base class for + implementations, pre-implementing typical behavior. + + +

+ The method will + check whether a or + can be opened; + will always return + ; + and + throw an exception; + and will + return the value of the + property. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Aleksandar Seovic (.NET) + +
+ + + The default special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + A string representation of the resource. + + + If the supplied is + or contains only whitespace character(s). + +
+ + + Strips any protocol name from the supplied + . + + +

+ If the supplied does not + have any protocol associated with it, then the supplied + will be returned as-is. +

+
+ + + GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); + // returns www.mycompany.com/resource.txt + + + + The name of the resource. + + + The name of the resource without the protocol name. + +
+ + + Resolves the supplied to its value + sans any leading protocol. + + + The name of the resource. + + + The name of the resource without the protocol name. + + + + + + Resolves the presence of the + value + in the supplied into a path. + + +

+ The default implementation simply returns the supplied + as is. +

+
+ + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + +
+ + + This implementation returns the + of this resource. + + + + + + Determines whether the specified is + equal to the current . + + +

+ This implementation compares values. +

+
+ +
+ + + Serves as a hash function for a particular type, suitable for use + in hashing algorithms and data structures like a hash table. + + +

+ This implementation returns the hashcode of the + property. +

+
+ +
+ + + Factory Method. Create a new instance of the current resource type using the given resourceName + + + + + The ResourceLoader to be used for resolving relative resources + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Creates a new resource that is relative to this resource based on the + supplied . + + +

+ This method can accept either a fully qualified resource name or a + relative resource name as it's parameter. +

+

+ A fully qualified resource is one that has a protocol prefix and + all elements of the resource name. All other resources are treated + as relative to this resource, and the following rules are used to + locate a relative resource: +

+ + + If the starts with '..', + the current resource path is navigated backwards before the + is concatenated to the current + of + this resource. + + + If the starts with '/', the + current resource path is ignored and a new resource name is + appended to the + of + this resource. + + + If the starts with '.' or a + letter, a new path is appended to the current + of + this resource. + + +
+ + The name of the resource to create. + + The relative resource. + + If the process of resolving the relative resource yielded an + invalid URI. + + + If this resource does not support the resolution of relative + resources (as determined by the value of the + + property). + + +
+ + + Calculates a new resource path based on the supplied + . + + + The relative path to evaluate. + + The newly calculated resource path. + + + + The special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+ +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the protocol associated with this resource (if any). + + +

+ The value of this property may be if no + protocol is associated with the resource type (for example if the + resource is a memory stream). +

+
+ + The protocol associated with this resource (if any). + +
+ + + Does this resource represent a handle with an open stream? + + +

+ This, the default implementation, always returns + . +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + + + + + Returns a handle for this resource. + + +

+ This, the default implementation, always throws a + , assuming that the + resource cannot be resolved to an absolute file path. +

+
+ + The handle for this resource. + + + This implementation always throws a + . + + + +
+ + + Does this resource actually exist in physical form? + + +

+ This implementation checks whether a + can be opened, falling back to whether a + can be opened. +

+

+ This will cover both directories and content resources. +

+

+ This implementation will also return if + permission to the (file's) path is denied. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + Does this support relative + resource retrieval? + + +

+ This property is generally to be consulted prior to attempting + to attempting to access a resource that is relative to this + resource (via a call to + ). +

+

+ This, the default implementation, always returns + . +

+
+ + if this + supports relative resource + retrieval. + +
+ + + Gets the root location of the resource. + + +

+ Where root resource can be taken to mean that part of the resource + descriptor that doesn't change when a relative resource is looked + up. Examples of such a root location would include a drive letter, + a web server name, an assembly name, etc. +

+
+ + The root location of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets the current path of the resource. + + +

+ An example value of this property would be the name of the + directory containing a filesystem based resource. +

+
+ + The current path of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets those characters that are valid path separators for the + resource type. + + +

+ An example value of this property would be the + and + values for a + filesystem based resource. +

+

+ Any derived classes that override this method are expected to + return a new array for each access of this property. +

+
+ + Those characters that are valid path separators for the resource + type. + + + This, the default implementation, always throws a + . + +
+ + + An implementation for + resources stored within assemblies. + + +

+ This implementation expects any resource name passed to the + constructor to adhere to the following format: +

+

+ assembly://assemblyName/namespace/resourceName +

+
+ Aleksandar Seovic (.NET) + Federico Spinazzi (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the assembly resource. + + + If the supplied did not conform + to the expected format. + + + If the assembly specified in the supplied + was loaded twice with two + different evidences. + + + If the assembly specified in the supplied + could not be found. + + + If the caller does not have the required permission to load + the assembly specified in the supplied + . + + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the caller does not have the required permission to load + the underlying assembly's manifest. + + + + + + + Does the embedded resource specified in the value passed to the + constructor exist? + + + if this resource actually exists in physical + form (for example on a filesystem). + + + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (the assembly name in this + case). + + + The root location of the resource. + + + + + + Gets the current path of the resource (the namespace in which the + target resource was embedded in this case). + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + + + + Used when retrieving information from the standard .NET configuration + files (App.config / Web.config). + + +

+ If created with the name of a configuration section, then all methods + aside from the description return , + , or throw an exception. If created with an + , then the + property + will return a corresponding to parse. +

+
+ Mark Pollack + Rick Evans +
+ + + Creates new instance of the + class. + + + The actual XML configuration section. + + + If the supplied is . + + + + + Creates new instance of the + class. + + + The name of the configuration section. + + + If the supplied is + or contains only whitespace character(s). + + + + + Returns the handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a description for this resource (the name of the + configuration section in this case). + + + A description for this resource. + + + + + + Does this resource actually exist in physical form? + + +

+ This implementation always returns . +

+
+ + + + + +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Exposes the actual for the + configuration section. + + +

+ Introduced to accomodate line info tracking during parsing. +

+
+
+ + + Holder that combines with a specific encoding to be used for reading + from the resource + + Juergen Hoeller + Erich Eichinger (.NET) + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + the resource to read from. Must not be null + whether to autoDetect encoding from byte-order marks () + + + + Create an encoded resource using the specified encoding. + + the resource to read from. Must not be null + the encoding to use. If null, encoding will be autodetected. + whether to autoDetect encoding from byte-order marks () + + + + + + + + + + Determine whether equals this instance. + + + true if obj is an and both + , and are equal. + + + + + Calculate the unique hash code for this instance. + + + + + + Get a textual description of the resource. + + + + + Get the underlying resource + + + + + Get the encoding to use for reading, if any. May be null + + + + + whether to autoDetect encoding from byte-order marks () + + + + + A backed resource. + + +

+ Supports resolution as both a and a + . +

+

+ Also supports the use of the ~ character. If the ~ character + is the first character in a resource path (sans protocol), the ~ + character will be replaced with the value of the + System.AppDomain.CurrentDomain.BaseDirectory property (an example of + this can be seen in the examples below). +

+
+ +

+ Consider the example of an application that is running (has been launched + from) the C:\App\ directory. The following resource paths will map + to the following resources on the filesystem... +

+ + strings.txt C:\App\strings.txt + ~/strings.txt C:\App\strings.txt + file://~/strings.txt C:\App\strings.txt + file://~/../strings.txt C:\strings.txt + ../strings.txt C:\strings.txt + ~/../strings.txt C:\strings.txt + + // note that only a leading ~ character is resolved to the executing directory... + stri~ngs.txt C:\App\stri~ngs.txt + +
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + If the supplied is + or contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + Supresses initialization of this instance. Used from derived classes. + + + If the supplied is + or contains only whitespace character(s). + + + + + Initializes this instance. + + + + + + Resolves the handle + for the supplied . + + + The name of the file system resource. + + + The handle for this resource. + + + + + Resolves the root location for the supplied . + + + The name of the file system resource. + + + The root location of the resource. + + + + + Resolves the path for the supplied . + + + The name of the file system resource. + + + The current path of the resource. + + + + + Resolves the presence of the + value + in the supplied into a path. + + + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the underlying handle for + this resource. + + + The handle for this resource. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (a drive or UNC file share + name in this case). + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the underlying file could not be found. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + adapter implementation for a + . + + +

+ Should only be used if no other + implementation is applicable. +

+

+ In contrast to other + implementations, this is an adapter for an already opened + resource - the + therefore always returns . Do not use this class + if you need to keep the resource descriptor somewhere, or if you need + to read a stream multiple times. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The input to use. + + + Where the input comes from. + + + If the supplied is + . + + + + + The input to use. + + + If the underlying has already + been read. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Custom type converter for instances. + + +

+ A resource path may contain placeholder variables of the form ${...} + that will be expended to environment variables. +

+

+ Currently only supports conversion from a + instance. +

+
+ +

+ On Win9x boxes, this resource path, ${userprofile}\objects.xml will + be expanded at runtime with the value of the 'userprofile' environment + variable substituted for the '${userprofile}' portion of the path. +

+ + // assuming a user called Rick, running on a plain vanilla Windows XP setup... + // this resource path... + + ${userprofile}\objects.xml + + // will become (after expansion)... + + C:\Documents and Settings\Rick\objects.xml + +
+ Mark Pollack + + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified resourceLoader. + + the underlying IResourceLoader to be used to resolve resources + + + + Returns whether this converter can convert an object of one + to a + + + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + + + + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An if successful. + + + If the resource name objectained form the supplied + is malformed. + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + Resolve the given path, replacing placeholder values with + corresponding property values if necessary. + + +

+ This implementation resolves environment variables only. +

+
+ The original resource path. + The resolved resource path. +
+ + + Return the used to + resolve the string. + + + The used to resolve + the string. + + + + + Registry class that allows users to register and retrieve protocol handlers. + + + + Resource handler is an implementation of interface + that should be used to process resources with the specified protocol. + + + They are used throughout the framework to access resources from various + sources. For example, application context loads object definitions from the resources + that are processed using one of the registered resource handlers. + + Following resource handlers are registered by default: + + + Protocol + Handler Type + Description + + + config + + Resolves the resources by loading specified configuration section from the standard .NET config file. + + + file + + Resolves filesystem resources. + + + http + + Resolves remote web resources. + + + https + + Resolves remote web resources via HTTPS. + + + ftp + + Resolves ftp resources. + + + assembly + + Resolves resources that are embedded into an assembly. + + + web + Spring.Core.IO.WebResource, Spring.Web* + Resolves resources relative to the web application's virtual directory. + + + * only available in web applications. + + Users can create and register their own protocol handlers by implementing interface + and mapping custom protocol name to that implementation. See for details + on how to register custom protocol handler. + + + Aleksandar Seovic + + + + Name of the .Net config section that contains definitions + for custom resource handlers. + + + + + Registers standard and user-configured resource handlers. + + + + + Returns resource handler for the specified protocol name. + + + + This method returns object that should be used + to create an instance of the -derived type by passing + resource location as a parameter. + + + Name of the protocol to get the handler for. + Resource handler constructor for the specified protocol name. + If is null. + + + + Returns true if a handler is registered for the specified protocol, + false otherwise. + + Name of the protocol. + + true if a handler is registered for the specified protocol, false otherwise. + + If is null. + + + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The type name of the concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Allows to create any arbitrary Url format + + + + + A adapter implementation encapsulating a simple string. + + Erich Eichinger + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Get the to + for accessing this resource. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Gets the encoding used to create a byte stream of the string. + + + + + Gets the content encapsulated by this . + + + + + A backed resource + on top of + + +

+ Obviously supports resolution as a , and also + as a in the case of the "file:" + protocol. +

+
+ +

+ Some examples of the strings that can be used to initialize a new + instance of the class + include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) + + + +
+ + + Creates a new instance of the + class. + + +

+ Some examples of the values that the + can typically be expected to hold include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ + A string representation of the resource. + +
+ + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the instance + used for the resource resolution. + + + A instance. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + Returns a handle for this resource. + + + The handle for this resource. + + + If the resource is not available on a filesystem. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource. + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Converts string representation of a credential for Web client authentication + into an instance of . + + +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. +

+ + + + + + +
+ Bruno Baia +
+ + + Can we convert from the sourcetype + to a instance ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A instance if successful. + + + + + A custom for any + primitive numeric type such as , + , , etc. + + +

+ Can use a given for + (locale-specific) parsing and rendering. +

+

+ This is not meant to be used as a system + but rather as a + locale-specific number converter within custom controller code, to + parse user-entered number strings into number properties of objects, + and render them in a UI form. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The primitive numeric to convert to. + + + The to use for + (locale-specific) parsing and rendering + + + Is an empty string allowed to be converted? If + , an empty string value will be converted to + numeric 0. + + Id the supplied is not a primitive + . + + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + +
+ + + Converts the specified object (a string) to the required primitive + type. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + A primitive representation of the string value. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Custom implementation for + objects. + + +

+ Handles conversion from an XML formatted string to a + object + (see below for an example of the expected XML format). +

+

+ This converter must be registered before it will be available. Standard + converters in this namespace are automatically registered by the + class. +

+
+ +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. Note that the name of the top level + (document) element is quite arbitrary... it is only the content that + matters (and which must be in the format + <add key="..." value="..."/>. For your continued sanity + though, you may wish to standardize on the top level name of + 'dictionary' (although you are of course free to not do so). +

+ + + + + + +

+ The following example uses a different top level (document) element + name, but is equivalent to the first example. +

+ + + + + + +
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from an + XML formatted instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + + + + Converts string representation of a regular expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts string representation of the registry key + into instance. + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Generates partial registry key name. + + + Key elements. + + + Index of the last element to use. + + + Friendly key name containing key element from + 0 to , inclusive. + + + + + Returns for the specified + root hive name. + + + Root hive name. + + + Registry key for the specified name. + + + + + Converts a two part string, (resource name, assembly name) + to a ResourceManager instance. + + + + + This constant represents the name of the folder/assembly containing global resources. + + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + If the specified does not denote a valid resource + + + + Converter for from a comma separated + list of RBG values. + + +

+ Please note that this class does not implement converting + to a comma separated list of RBG values from a + . +

+
+ Federico Spinazzi +
+ + + Returns whether this converter can convert an object of one + to a + . + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Converts the specified object (a string) a + instance. + + + A + that provides a format context. + + + The to use + as the current culture: currently ignored. + + + The value that is to be converted, in "R,G,B", "A,R,G,B", or + symbolic color name (). + + + A representation of the string value. + + + If the input string is not in a supported format, or is not one of the + predefined system colors (). + + + + + A custom for + runtime type references. + + +

+ Currently only supports conversion to and from a + . +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to the + of this converter. + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Returns whether this converter can convert the object to the specified + . + + + A + that provides a format context. + + + A that represents the + you want to convert to. + + True if the conversion is possible. + + + + Converts the given value to the type of this converter. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An that represents the converted value. + + + + + Converts the given value object to the specified type, + using the specified context and culture information. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + The to convert the + parameter to. + + + An that represents the converted value. + + + + + Converter for to directly set a + property. + + Jurgen Hoeller + Mark Pollack (.NET) + + + + Create a new StreamConverter using the default + . + + + + + Create a new StreamConverter using the given + . + + + The to use. + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts a separated to a + array. + + +

+ Defaults to using the , (comma) as the list separator. Note that the value + of the current is + not used. +

+

+ If you want to provide your own list separator, you can set the value of the + + property to the value that you want. Please note that this value will be used + for all future conversions in preference to the default list separator. +

+

+ Please note that the individual elements of a string will be passed + through as is (i.e. no conversion or trimming of surrounding + whitespace will be performed). +

+

+ This should be + automatically registered with any + implementations. +

+
+ + + public class StringArrayConverterExample + { + public static void Main() + { + StringArrayConverter converter = new StringArrayConverter(); + + string csvWords = "This,Is,It"; + string[] frankBoothWords = converter.ConvertFrom(csvWords); + + // the 'frankBoothWords' array will have 3 elements, namely + // "This", "Is", "It". + + // please note that extraneous whitespace is NOT trimmed off + // in the current implementation... + string csv = " Cogito ,ergo ,sum "; + string[] descartesWords = converter.ConvertFrom(csv); + + // the 'descartesWords' array will have 3 elements, namely + // " Cogito ", "ergo ", "sum ". + // notice how the whitespace has NOT been trimmed. + } + } + + + +
+ + + Can we convert from a the sourcetype to a array? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to a + array. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + The value that will be used as the list separator when performing + conversions. + + + A 'single' string character that will be used as the list separator + when performing conversions. + + + If the supplied value is not and is an empty + string, or has more than one character. + + + + + Base parser for custom specifiers. + + + + + Convert int value to a Timespan based on the specifier + + + + + + + Check if the string contains the specifier and + + + + + + + Specifier + + + + + Recognize 10d as ten days + + + + + Parse value as days + + Timespan in days + + + + + Day specifier: d + + + + + Recognize 10h as ten hours + + + + + Parse value as hours + + Timespan in hours + + + + + Hour specifier: h + + + + + Recognize 10m as ten minutes + + + + + Parse value as minutes + + Timespan in minutes + + + + + Minute specifier: m + + + + + Recognize 10s as ten seconds + + + + + Parse value as seconds + + Timespan in seconds + + + + + Second specifier: s + + + + + Recognize 10ms as ten milliseconds + + + + + Parse value as milliseconds + + Timespan in milliseconds + + + + + Millisecond specifier: ms + + + + + Converter for instances. + + Bruno Baia + Roberto Paterlini + + + + Creates a new instance of the + class. + + + + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Utility methods that are used to convert objects from one type into another. + + Aleksandar Seovic + + + + Convert the value to the required (if necessary from a string). + + The proposed change value. + + The we must convert to. + + Property name, used for error reporting purposes... + + If there is an internal error. + + The new value, possibly the result of type conversion. + + + + Utility method to create a property change event. + + + The full name of the property that has changed. + + The property old value + The property new value + + A new . + + + + + Determines if a Type implements a specific generic interface. + + Candidate to evaluate. + The to test for in the Candidate . + if a match, else + + + + Registry class that allows users to register and retrieve type converters. + + Aleksandar Seovic + + + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + Registers standard and configured type converters. + + + + + Returns for the specified type. + + Type to get the converter for. + a type converter for the specified type. + If is null. + + + + Registers for the specified type. + + Type to register the converter for. + Type converter to register. + If either of arguments is null. + + + + Registers for the specified type. + + + This is a convinience method that accepts the names of both + type to register converter for and the converter itself, + resolves them using , creates an + instance of type converter and calls overloaded + method. + + Type name of the type to register the converter for (can be a type alias). + Type name of the type converter to register (can be a type alias). + If either of arguments is null or empty string. + + If either of arguments fails to resolve to a valid . + + + If type converter does not derive from or if it cannot be instantiated. + + + + + Converts between instances of and their string representations. + + Erich Eichinger + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A that provides a format context. + + + A that represents the you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful, otherwise. + + The conversion cannot be performed. + + + + Returns whether this converter can convert the object to the specified type, using the specified context. + + An that provides a format context. + A that represents the type you want to convert to. + + true if this converter can perform the conversion; otherwise, false. + + + At the moment only conversion to string is supported. + + + + + Converts the given value object to the specified type, using the specified context and culture information. + + + + An that represents the converted value. + + + A . If null is passed, the current culture is assumed. + An that provides a format context. + The to convert the value parameter to. + The to convert. + The conversion cannot be performed. + The destinationType parameter is null. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Resolves (instantiates) a by it's (possibly + assembly qualified) name, and caches the + instance against the type name. + + Rick Evans + Bruno Baia + Erich Eichinger + + + + Resolves a by name. + + +

+ The rationale behind the creation of this interface is to centralise + the resolution of type names to instances + beyond that offered by the plain vanilla + method call. +

+
+ Rick Evans +
+ + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + The cache, mapping type names ( instances) against + instances. + + + + + Creates a new instance of the class. + + + The that this instance will delegate + actual resolution to if a + cannot be found in this instance's cache. + + + If the supplied is . + + + + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holder for the generic arguments when using type parameters. + + +

+ Type parameters can be applied to classes, interfaces, + structures, methods, delegates, etc... +

+
+
+ + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The character that separates a list of generic arguments. + + + + + Creates a new instance of the GenericArgumentsHolder class. + + + The string value to parse looking for a generic definition + and retrieving its generic arguments. + + + + + Returns the array declaration portion of the definition, e.g. "[,]" + + + + + + Returns an array of unresolved generic arguments types. + + +

+ A empty string represents a type parameter that + did not have been substituted by a specific type. +

+
+ + An array of strings that represents the unresolved generic + arguments types or an empty array if not generic. + +
+ + + The (unresolved) generic type name portion + of the original value when parsing a generic type. + + + + + The (unresolved) generic method name portion + of the original value when parsing a generic method. + + + + + Is the string value contains generic arguments ? + + +

+ A generic argument can be a type parameter or a type argument. +

+
+
+ + + Is generic arguments only contains type parameters ? + + + + + Is this an array type definition? + + + + + Resolves a generic by name. + + Bruno Baia + + + + Resolves a by name. + + Rick Evans + Aleksandar Seovic + Bruno Baia + + + + Resolves the supplied to a + instance. + + + The unresolved (possibly partially assembly qualified) name + of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Uses + to load an and then the attendant + referred to by the + parameter. + + +

+ is + deprecated in .NET 2.0, but is still used here (even when this class is + compiled for .NET 2.0); + will + still resolve (non-.NET Framework) local assemblies when given only the + display name of an assembly (the behaviour for .NET Framework assemblies + and strongly named assemblies is documented in the docs for the + method). +

+
+ + The assembly and type to be loaded. + + + A , or . + + + + +
+ + + Uses + to load the attendant referred to by + the parameter. + + + The type to be loaded. + + + A , or . + + + + + Creates a new instance + from the given + + + + + Creates a new instance + from the given with the given inner + + + + + Resolves the supplied generic to a + instance. + + + The unresolved (possibly generic) name of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holds data about a and it's + attendant . + + + + + The string that separates a name + from the name of it's attendant + in an assembly qualified type name. + + + + + Creates a new instance of the TypeAssemblyHolder class. + + + The unresolved name of a . + + + + + The (unresolved) type name portion of the original type name. + + + + + The (unresolved, possibly partial) name of the attandant assembly. + + + + + Is the type name being resolved assembly qualified? + + + + + Provides access to a central registry of aliased s. + + +

+ Simplifies configuration by allowing aliases to be used instead of + fully qualified type names. +

+

+ Comes 'pre-loaded' with a number of convenience alias' for the more + common types; an example would be the 'int' (or 'Integer' + for Visual Basic.NET developers) alias for the + type. +

+
+ Aleksandar Seovic + +
+ + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + The alias around the 'int' type. + + + + + The alias around the 'Integer' type (Visual Basic.NET style). + + + + + The alias around the 'int[]' array type. + + + + + The alias around the 'Integer()' array type (Visual Basic.NET style). + + + + + The alias around the 'decimal' type. + + + + + The alias around the 'Decimal' type (Visual Basic.NET style). + + + + + The alias around the 'decimal[]' array type. + + + + + The alias around the 'Decimal()' array type (Visual Basic.NET style). + + + + + The alias around the 'char' type. + + + + + The alias around the 'Char' type (Visual Basic.NET style). + + + + + The alias around the 'char[]' array type. + + + + + The alias around the 'Char()' array type (Visual Basic.NET style). + + + + + The alias around the 'long' type. + + + + + The alias around the 'Long' type (Visual Basic.NET style). + + + + + The alias around the 'long[]' array type. + + + + + The alias around the 'Long()' array type (Visual Basic.NET style). + + + + + The alias around the 'short' type. + + + + + The alias around the 'Short' type (Visual Basic.NET style). + + + + + The alias around the 'short[]' array type. + + + + + The alias around the 'Short()' array type (Visual Basic.NET style). + + + + + The alias around the 'unsigned int' type. + + + + + The alias around the 'unsigned long' type. + + + + + The alias around the 'ulong[]' array type. + + + + + The alias around the 'uint[]' array type. + + + + + The alias around the 'unsigned short' type. + + + + + The alias around the 'ushort[]' array type. + + + + + The alias around the 'double' type. + + + + + The alias around the 'Double' type (Visual Basic.NET style). + + + + + The alias around the 'double[]' array type. + + + + + The alias around the 'Double()' array type (Visual Basic.NET style). + + + + + The alias around the 'float' type. + + + + + The alias around the 'Single' type (Visual Basic.NET style). + + + + + The alias around the 'float[]' array type. + + + + + The alias around the 'Single()' array type (Visual Basic.NET style). + + + + + The alias around the 'DateTime' type. + + + + + The alias around the 'DateTime' type (C# style). + + + + + The alias around the 'DateTime' type (Visual Basic.NET style). + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime()' array type (Visual Basic.NET style). + + + + + The alias around the 'bool' type. + + + + + The alias around the 'Boolean' type (Visual Basic.NET style). + + + + + The alias around the 'bool[]' array type. + + + + + The alias around the 'Boolean()' array type (Visual Basic.NET style). + + + + + The alias around the 'string' type. + + + + + The alias around the 'string' type (Visual Basic.NET style). + + + + + The alias around the 'string[]' array type. + + + + + The alias around the 'string[]' array type (Visual Basic.NET style). + + + + + The alias around the 'object' type. + + + + + The alias around the 'object' type (Visual Basic.NET style). + + + + + The alias around the 'object[]' array type. + + + + + The alias around the 'object[]' array type (Visual Basic.NET style). + + + + + The alias around the 'int?' type. + + + + + The alias around the 'int?[]' array type. + + + + + The alias around the 'decimal?' type. + + + + + The alias around the 'decimal?[]' array type. + + + + + The alias around the 'char?' type. + + + + + The alias around the 'char?[]' array type. + + + + + The alias around the 'long?' type. + + + + + The alias around the 'long?[]' array type. + + + + + The alias around the 'short?' type. + + + + + The alias around the 'short?[]' array type. + + + + + The alias around the 'unsigned int?' type. + + + + + The alias around the 'unsigned long?' type. + + + + + The alias around the 'ulong?[]' array type. + + + + + The alias around the 'uint?[]' array type. + + + + + The alias around the 'unsigned short?' type. + + + + + The alias around the 'ushort?[]' array type. + + + + + The alias around the 'double?' type. + + + + + The alias around the 'double?[]' array type. + + + + + The alias around the 'float?' type. + + + + + The alias around the 'float?[]' array type. + + + + + The alias around the 'bool?' type. + + + + + The alias around the 'bool?[]' array type. + + + + + Registers standard and user-configured type aliases. + + + + + Registers an alias for the specified . + + +

+ This overload does eager resolution of the + referred to by the parameter. It will throw a + if the referred + to by the parameter cannot be resolved. +

+
+ + A string that will be used as an alias for the specified + . + + + The (possibly partially assembly qualified) name of the + to register the alias for. + + + If either of the supplied parameters is or + contains only whitespace character(s). + + + If the referred to by the supplied + cannot be loaded. + +
+ + + Registers short type name as an alias for + the supplied . + + + The to register. + + + If the supplied is . + + + + + Registers an alias for the supplied . + + + The alias for the supplied . + + + The to register the supplied under. + + + If the supplied is ; or if + the supplied is or + contains only whitespace character(s). + + + + + Resolves the supplied to a . + + + The alias to resolve. + + + The the supplied was + associated with, or if no + was previously registered for the supplied . + + + If the supplied is or + contains only whitespace character(s). + + + + + Returns a flag specifying whether TypeRegistry contains + specified alias or not. + + + Alias to check. + + + true if the specified type alias is registered, + false otherwise. + + + + + Helper methods with regard to type resolution. + + +

+ Not intended to be used directly by applications. +

+
+ Bruno Baia +
+ + + Creates a new instance of the class. + + +

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

+
+
+ + + Resolves the supplied type name into a + instance. + + +

+ If you require special resolution, do + not use this method, but rather instantiate + your own . +

+
+ + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the type cannot be resolved. + +
+ + + Resolves a string array of interface names to + a array. + + + An array of valid interface names. Each name must include the full + interface and assembly name. + + An array of interface s. + + If any of the interfaces can't be loaded. + + + If any of the s specified is not an interface. + + + If (or any of its elements ) is + . + + + + + Match a method against the given pattern. + + the pattern to match against. + the method to match. + + if the method matches the given pattern; otherwise . + + + If the supplied is invalid. + + + + + Exception thrown when the ObjectFactory cannot load the specified type of a given object. + + Mark Pollack + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException 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 ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Initializes 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. + + + + + Initializes a new instance of the class. + + The resource description that the object definition came from. + Name of the object requested + Name of the object type. + The root cause. + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Gets he name of the object we are trying to load. + + The name of the object. + + + + Gets the name of the object type we are trying to load. + + The name of the object type. + + + + Gets the resource description that the object definition came from + + The resource description. + + + + A implementation that represents + a composed collection of instances. + + + + + The criteria for an arbitrary filter. + + Rick Evans + + + + Does the supplied satisfy the criteria + encapsulated by this instance? + + + The datum to be checked by this criteria instance. + + + if the supplied + satisfies the criteria encapsulated by this instance; + if not, or the supplied + is . + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A user-defined (child) criteria that will be composed into this instance. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The data to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Adds the supplied into the criteria + composed within this instance. + + + The to be added. + + + + + The list of composing this + instance. + + + + + Factory class to conceal any default implementation. + + Rod Johnson + Simon White (.NET) + + + + Creates a new instance of the + implementation provided by this factory. + + + A new instance of the + implementation provided by this factory. + + + + + Interface to be implemented by objects that can return information about + the current call stack. + + +

+ Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + The to look for. + + + if the caller is under the supplied . + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + + The to look for. + + The name of the method to look for. + + if the caller is under the supplied + and . + + + + + Does the current stack trace contain the supplied ? + + The token to match against. + + if the current stack trace contains the supplied + . + + + + + Creates a new instance of the + class. + + + + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + +

+ Matches the whole method name. +

+
+ +
+ + + Does the current stack trace contain the supplied ? + + +

+ This leaves it up to the caller to decide what matches, but is obviously less of + an abstraction because the caller must know the exact format of the underlying + stack trace. +

+
+ +
+ + + Provides methods to support various naming and other conventions used throughout the framework. + Mainly for internal use within the framework. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + Convert Strings in attribute name format (lowercase, hyphens separating words) + into property name format (camel-cased). For example, transaction-manager is + converted into transactionManager. + + + + + Convenience class that exposes a signature that matches the + delegate. + + +

+ Useful when filtering members via the + mechanism. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + + + Returns true if the supplied instance + satisfies the supplied (which must be an + implementation). + + + The instance that will be checked to see if + it matches the supplied . + + + The criteria against which to filter the supplied + instance. + + + True if the supplied instance + satisfies the supplied (which must be an + implementation); false if not or the + supplied is not an + implementation or is null. + + + + + Interface that can be implemented by exceptions etc that are error coded. + + +

+ The error code is a , rather than a number, so it can + be given user-readable values, such as "object.failureDescription". +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Return the error code associated with this failure. + + +

+ The GUI can render this anyway it pleases, allowing for I18n etc. +

+
+ + The error code associated with this failure, + or the empty string instance if not error-coded. + +
+ + + Thrown in response to referring to an invalid property (most often via reflection). + + Rick Evans + + + + 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. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + Creates a new instance of the + class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + + + Creates a new instance of the InvalidPropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The that is (or rather was) the source of the + offending property. + + + + + The name of the offending property. + + + + + Extension of the interface, expressing a 'priority' + ordering: Order values expressed by IPriorityOrdered objects always + apply before order values of 'plain' Ordered values. + + + This is primarily a special-purpose interface, used for objects + where it is particularly important to determine 'prioritized' + objects first, without even obtaining the remaining objects. + A typical example: Prioritized post-processors in a Spring + + + IPriorityOrdered post-processor objects are initialized in + a special phase, ahead of other post-processor objects. + + Juergen Hoeller + Mark Pollack (.NET) + + + + + + + Criteria that is satisfied if the of each of the + arguments matches each of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + +

+ This implementation respects the inheritance chain of any parameter + s... i.e. methods that have a base type (or + interface) that is assignable to the in the + same corresponding index of the parameter types will satisfy this + criteria instance. +

+
+ The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + +
+ + + Criteria that is satisfied if the number of generic arguments to a given + matches an arbitrary number. + + +

+ This class supports checking the generic arguments count of both + generic methods and constructors. +

+
+ Bruno Baia +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Thrown when a method (typically a property getter or setter invoked via reflection) + throws an exception, analogous to a . + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for exceptions related to a property access, such as a + mismatch or a target invocation exception. + + Rod Johnson + Mark Pollack (.NET) + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessException class. + + + + + Creates a new instance of the PropertyAccessException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Returns the PropertyChangeEventArgs that resulted in the problem. + + + + + The string error code used to classify the error. + + + + + Creates a new instance of the MethodInvocationException class. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Constructor to use when an exception results from a + . + + + The raised by the invoked property. + + + The that + resulted in an exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The error code string for this exception. + + + + + Criteria that is satisfied if the method Name of an + instance matches a + supplied string pattern. + + + + Supports the following simple pattern styles: + "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + + Bruno Baia + + + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to * (any method name). +

+
+
+ + + Creates a new instance of the + class. + + The pattern that names + must match against in order to satisfy this criteria. + + If the supplied is null or resolve to an empty string. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is null or resolve to an empty string. + + + + + Helper class that encapsulates the specification of a method parameter, i.e. + a MethodInfo or ConstructorInfo plus a parameter index. + Useful as a specification object to pass along. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + Initializes a new instance of the class for the given + MethodInfo. + + The MethodInfo to specify a parameter for. + Index of the parameter. + + + + Initializes a new instance of the class. + + The ConstructorInfo to specify a parameter for. + Index of the parameter. + + + + Create a new MethodParameter for the given method or donstructor. + This is a convenience constructor for scenarios where a + Method or Constructor reference is treated in a generic fashion. + + The method or constructor to specify a parameter for. + Index of the parameter. + the corresponding MethodParameter instance + + + + Parameters the name of the method/constructor parameter. + + the parameter name. + + + + Gets the type of the method/constructor parameter. + + The type of the parameter. (never null) + + + + Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The MethodInfo, or null if none. + + + + Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The ConstructorInfo, or null if none + + + + Return the annotations associated with the specific method/constructor parameter. + + + + + Return the annotations associated with the target method/constructor itself. + + + + + Criteria that is satisfied if the number of parameters to a given + matches an arbitrary number. + + +

+ This class supports checking the parameter count of both methods and + constructors. +

+

+ Default parameters, etc need to taken into account. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Criteria that is satisfied if the of each of the + parameters of a given matches each + of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the return of a given + matches a given . + + Rick Evans + + + + The return to match against if no + is provided explictly. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Thrown in response to a failed attempt to read a property. + + +

+ Typically thrown when attempting to read the value of a write-only + property via reflection. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + 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. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + 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. + + + + + Thrown in response to a failed attempt to write a property. + + Mark Pollack (.NET) + + + + Creates a new instance of the NotWritablePropertyException class. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class + summarizing what property was not writable. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + + + Creates new NotWritablePropertyException with a root cause. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + The root cause indicating why the property was not writable. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to encountering a value + when traversing a nested path expression. + + + + + 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 of the object where the property was not found. + + The name of the property not found. + + + + Creates a new instance of the + class. + + + The of the object where the property was not found. + + The name of the property not found. + A message about the exception. + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the offending property. + + + + + The of the class where the property was last looked for. + + + + + Comparator implementation for objects, sorting by + order value ascending (resp. by priority descending). + + +

+ Non- objects are treated as greatest order values, + thus ending up at the end of a list, in arbitrary order (just like same order values of + objects). +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Comparator implementation for objects, sorting by + order value ascending (resp. by priority descending). + + +

+ Non- objects are treated as greatest order values, + thus ending up at the end of a list, in arbitrary order (just like same order values of + objects). +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Compares two objects and returns a value indicating whether one is less than, + equal to or greater than the other. + + +

+ Uses direct evaluation instead of + to avoid unnecessary boxing. +

+
+ The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + +
+ + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + Provides additional data for the PropertyChanged event. + + +

+ Provides some additional properties over and above the name of the + property that has changed (which is inherited from the + base class). + This allows calling code to determine whether or not a property has + actually changed (i.e. a PropertyChanged event may have been + raised, but the value itself may be equivalent). +

+
+ +
+ + + Create a new instance of the + class. + + + The name of the property that was changed. + The old value of the property. + the new value of the property. + + + + Get the old value for the property. + + + + + + Get the new value of the property. + + + + + + A base class for all + implementations that are regular expression based. + + Rick Evans + + + + The default pattern... matches absolutely anything. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The regular expression pattern to be applied. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Convenience method that calls the + + on the supplied . + + The input to match against. + True if the matches. + + + + The regular expression pattern to be applied. + + + + + The regular expression options to be applied. + + + + + The regular expression to be applied. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default event name pattern... matches pretty much any event name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default method name pattern... matches pretty much any method name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Exception thrown on a mismatch when trying to set a property + or resolve an argument to a method invocation. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the TypeMismatchException class. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the TypeMismatchException class describing the + property and required type that could not used to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + + + + Creates a new instance of the TypeMismatchException class describing the + property, required type, and underlying exception that could not be used + to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + The underlying exception. + + + + Creates a new instance of the TypeMismatchException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The string error code used to classify the exception. + + + + + Abstract base class for implementations. + + Aleksandar Seovic + + + + An interface that defines the methods that have to be implemented by all data bindings. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + The name of the always filled error provider + + + + + Gets or sets a flag specifying whether this binding is valid. + + + true if this binding evaluated without errors; + false otherwise. + + + + + Marks this binding's state as invalid for this validationErrors collection. + Returns false if is null. + + + false, if validationErrors is null + + + + Initializes a new instance of the class. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets the unique ID of this binding instance. + + + + + Gets or sets the . + + The binding direction. + + + + Gets the error message. + + The error message. + + + + Gets the error providers. + + + + + Abstract base class for simple, one-to-one implementations. + + Aleksandar Seovic + + + + Initialize a new instance of without any + + + + + Initialize a new instance of with the + specified . + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation if source to target binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation of target to source binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets or sets the to use. + + The formatter to use. + + + + Base implementation of the . + + Aleksandar Seovic + + + + An interface that has to be implemented by all data binding containers. + + Aleksandar Seovic + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Gets a value indicating whether this data binding container + has bindings. + + + true if this data binding container has bindings; + false otherwise. + + + + + Creates a new instance of . + + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Implemented as a NOOP for containers. + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Gets a list of bindings for this container. + + + A list of bindings for this container. + + + + + Gets a value indicating whether this instance has bindings. + + + true if this instance has bindings; otherwise, false. + + + + + BaseBindingManager keeps track of all registered bindings and + represents an entry point for the binding and unbinding process. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Enumeration that defines possible values for data binding direction. + + Aleksandar Seovic + + + + Specifies that value from the control property should be bound to a data model. + + + + + Specifies that value from the data model should be bound to control property. + + + + + Specifies that binding is bidirectional. + + + + + Represents an ErrorMessage specific to a binding instance. + + Erich Eichinger + + + + Represents a single validation error message. + + Aleksandar Seovic + Goran Milosavljevic + + + + Default constructor. + + + + + Initializes a new instance of the class. + + Error message resource identifier. + Parameters that should be used for message resolution. + + + + Initializes a new instance of the class copying values from another instance. + + Another Error message instance to copy values from. + + + + This property is reserved, apply the + + to the class instead. + + + An + that describes the XML representation of the object that + is produced by the + + method and consumed by the + + method. + + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Resolves the message against specified . + + Message source to resolve this error message against. + Resolved error message. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets or sets the resource identifier for this message. + + The resource identifier for this message. + + + + Gets or sets the message parameters. + + The message parameters. + + + + Initializes a new instance of the class. + + the id of the binding this error message is associated with + the message id + optional parameters to this message + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Get the ID of the binding this message instance relates to. + + + + + Interface that should be implemented by data bound objects, such as + web pages, user controls, windows forms, etc. + + Aleksandar Seovic + + + + Gets the binding manager. + + The binding manager. + + + + implementation that allows + data binding between collections that implement + interface. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Simple, expression-based implementation of that + binds source to target one-to-one. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + The formatter to use. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the source expression. + + The source expression. + + + + Gets the target expression. + + The target expression. + + + + Minimal AST node interface used by ANTLR AST generation and tree-walker. + + + + + Add a (rightmost) child to this node + + + + + + Get the first child of this node; null if no children + + + + + Get the next sibling in line after this one + + + + + Get the token text for this node + + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Set the first child of a node. + + + + + + Set the next sibling after this one. + + + + + + Set the token text for this node + + + + + + Set the token type for this node + + + + + + Get the token type for this node + + + + + Event type. + + + + Used for creating Token instances. + + + Used for caching lookahead characters. + + + + This method is executed by ANTLR internally when it detected an illegal + state that cannot be recovered from. + The previous implementation of this method called + and writes directly to , which is usually not + appropriate when a translator is embedded into a larger application. + + Error message. + + + + A creator of Token object instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of Token objects. + + + Since Lexers in ANTLR use a single Token type, each TokenCreator can + create one class of Token objects (that's why it's not called TokenFactory). + + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + The fully qualified name of the Token type to create. + + + + + Type object used as a template for creating tokens by reflection. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + This type was created in VisualAge. + + + + Report exception errors caught in nextToken() + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + + Represents a stream of characters fed to the lexer from that can be rewound + via mark()/rewind() methods. + + + + A dynamic array is used to buffer up all the input characters. Normally, + "k" characters are stored in the buffer. More characters may be stored + during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. + Consumption of characters is deferred. In other words, reading the next + character is not done by conume(), but deferred until needed by LA or LT. + + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "CharConsumed" event. + + Event source object + Event data object + + + + Handle the "CharLA" event. + + Event source object + Event data object + + + + Handle the "Mark" event. + + Event source object + Event data object + + + + Handle the "Rewind" event. + + Event source object + Event data object + + + charBufferConsume method comment. + + + + charBufferLA method comment. + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Specify an object with support code (shared by Parser and TreeParser. + Normally, the programmer does not play with this, using + instead. + + + + + + Specify the type of node to create during tree building. + + Fully qualified AST Node type name. + + + + Specify the type of node to create during tree building. + use now to be consistent with + Token Object Type accessor. + + Fully qualified AST Node type name. + + + + + + + + Get another token object from the token stream + + + + Return the token type of the ith token of lookahead where i=1 + is the current token being examined by the parser (i.e., it + has not been matched yet). + + + + Make sure current lookahead symbol matches token type t. + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Make sure current lookahead symbol matches the given set + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Parser error-reporting function can be overridden in subclass + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + User can override to do their own debugging + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Specifies the behaviour required (i.e. parser modifications) + specifically to support parse tree debugging and derivation. + + + + Override the standard matching and rule entry/exit routines + to build parse trees. This class is useful for 2.7.3 where + you can specify a superclass like + + + class TinyCParser extends Parser(ParseTreeDebugParser); + + + + + + Each new rule invocation must have it's own subtree. Tokens are + added to the current root so we must have a stack of subtree roots. + + + + + Track most recently created parse subtree so that when parsing + is finished, we can get to the root. + + + + + For every rule replacement with a production, we bump up count. + + + + + Adds LT(1) to the current parse subtree. + + + + Note that the match() routines add the node before checking for + correct match. This means that, upon mismatched token, there + will a token node in the tree corresponding to where that token + was expected. For no viable alternative errors, no node will + be in the tree as nothing was matched() (the lookahead failed + to predict an alternative). + + + + + + Create a rule node, add to current tree, and make it current root + + + + + + Pop current root; back to adding to old root + + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + AST Support code shared by TreeParser and Parser. + + + + We use delegation to share code (and have only one + bit of code to maintain) rather than subclassing + or superclassing (forces AST support code to be + loaded even when you don't want to do AST stuff). + + + Typically, is used to specify the + homogeneous type of node to create, but you can override + to make heterogeneous nodes etc... + + + + + + Constructs an ASTFactory with the default AST node type of + . + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + Name of default AST node type for this factory. + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + MetaType of default AST node type for this factory. + + + + + Stores the Type of the default AST node class to be used during tree construction. + + + + + Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass + and ASTNodeCreator. + + + + + Stores the mapping between AST node typenames and their token ID. + + + + + Specify an "override" for the type created for + the specified Token type. + + + This method is useful for situations that ANTLR cannot oridinarily deal + with (i.e., when you create a token based upon a nonliteral token symbol + like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token + type (and hence the AST) statically. + + Token type to override. + + Fully qualified AST typename (or null to specify + the factory's default AST type). + + + + + Register an AST Node Type for a given Token type ID. + + The Token type ID. + The AST Node Type to register. + + + + Register an ASTNodeCreator for a given Token type ID. + + The Token type ID. + The creater to register. + + + + Register an ASTNodeCreator to be used for creating node by default. + + The ASTNodeCreator. + + + + Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings + to the specified size. + This is primarily a convenience method that can be used to prevent + unnecessary and costly re-org of the mappings list. + + Maximum Token Type ID. + + + + Add a child to the current AST + + The AST to add a child to + The child AST to be added + + + + Creates a new uninitialized AST node. Since a specific AST Node Type + wasn't indicated, the new AST node is created using the current default + AST Node type - + + An uninitialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. Once created, + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + Fully qualified name of the Type to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. + + Token instance to be used to initialize the new AST Node. + + Fully qualified name of the Type to be used for creating the new AST Node. + + A newly created and initialized AST node object. + + Once created, the new AST node is initialized with the specified Token + instance. The used for creating this new AST + node is determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + + + + Creates and initializes a new AST node using the specified AST Node instance. + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by aNode. + The AST Node type must have a default/parameterless constructor. + + AST Node instance to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token instance. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token instance to be used to create new AST Node. + An initialized AST node object. + + + + Returns a copy of the specified AST Node instance. The copy is obtained by + using the method Clone(). + + AST Node to copy. + An AST Node (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node and all of it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Make a tree from a list of nodes. The first element in the + array is the root. If the root is null, then the tree is + a simple list not a tree. Handles null children nodes correctly. + For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) + yields tree (nil a b). + + List of Nodes. + AST Node tree. + + + + Make a tree from a list of nodes, where the nodes are contained + in an ASTArray object. + + List of Nodes. + AST Node tree. + + + + Make an AST the root of current AST. + + + + + + + Sets the global default AST Node Type for this ASTFactory instance. + This method also attempts to load the instance + for the specified typename. + + Fully qualified AST Node Type name. + + + + To change where error messages go, can subclass/override this method + and then setASTFactory in Parser and TreeParser. This method removes + a prior dependency on class antlr.Tool. + + + + + + A creator of AST node instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of AST node objects. + + + Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever + they need to create an AST node objeect. What this class does is to support + performant extensibility of the basic ASTFactory. The ASTFactory can now be + extnded as run-time to support more new AST node types without using needing + to use reflection. + + + + + + Constructs an instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Summary description for ASTVisitor. + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Small buffer used to avoid reading individual chars + + + + + Small buffer used to avoid reading individual chars + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + A token is minimally a token type. Subclasses can add the text matched + for the token and line info. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Summary description for DumpASTVisitor. + + Simple class to dump the contents of an AST to the output + + + + Append a char to the msg buffer. If special, then show escaped version + + Message buffer + Char to append + + + + Walk parse tree and return requested number of derivation steps. + If steps less-than 0, return node text. If steps equals 1, return derivation + string at step. + + derivation steps + + + + + Get derivation and return how many you did (less than requested for + subtree roots. + + string buffer + derivation steps + + + + + Do a step-first walk, building up a buffer of tokens until + you've reached a particular step and print out any rule subroots + insteads of descending. + + derivation buffer + derivation steps + + + + + This token stream tracks the *entire* token stream coming from + a lexer, but does not pass on the whitespace (or whatever else + you want to discard) to the parser. + + + + This class can then be asked for the ith token in the input stream. + Useful for dumping out the input stream exactly after doing some + augmentation or other manipulations. Tokens are index from 0..n-1 + + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + string. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal string + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + For example: + + TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); + JavaRecognizer parser = new JavaRecognizer(rewriteEngine); + ... + rewriteEngine.insertAfter("pass1", t, "foobar");} + rewriteEngine.insertAfter("pass2", u, "start");} + System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); + System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); + + + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer. + + + If you don't use named rewrite streams, a "default" stream is used. + + + Terence Parr, parrt@cs.usfca.edu + University of San Francisco + February 2004 + + + + + + Track the incoming list of tokens + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps string (name) -> rewrite (List) + + + + + Map string (program name) -> Integer index + + + + + track index of tokens + + + + + Who do we suck tokens from? + + + + + Which (whitespace) token(s) to throw out + + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. + + + UNTESTED! + + + + + + + Reset the program so that no instructions exist + + + + + + If op.index > lastRewriteTokenIndexes, just add to the end. + Otherwise, do linear + + + + + + Execute the rewrite operation by possibly adding to the buffer. + + rewrite buffer + The index of the next token to operate on. + + + + This token tracks it's own index 0..n-1 relative to the beginning + of the stream. It is designed to work with + in TokenStreamRewriteEngine.cs + + + + + Index into token array indicating position in input stream + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Implementation of the average aggregator. + + Aleksandar Seovic + + + + Defines an interface that should be implemented + by all collection processors and aggregators. + + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Returns the average of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The average of the numeric values in the source collection. + + + + + Converts all elements in the input list to a given target type. + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the count aggregator. + + Aleksandar Seovic + + + + Returns the number of items in the source collection. + + + The source collection to process. + + + Ignored. + + + The number of items in the source collection, + or zero if the collection is empty or null. + + + + + Converts a string literal to a instance. + + Erich Eichinger + + + + + Erich Eichinger + + + + Implementation of the distinct processor. + + Aleksandar Seovic + + + + Returns distinct items from the collection. + + + The source collection to process. + + + 0: boolean flag specifying whether to include null + in the results or not. Default is false, which means that + null values will not be included in the results. + + + A collection containing distinct source collection elements. + + + If there is more than one argument, or if the single optional argument + is not Boolean. + + + + + Implementation of the maximum aggregator. + + Aleksandar Seovic + + + + Returns the largest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The largest item in the source collection. + + + + + Implementation of the minimum aggregator. + + Aleksandar Seovic + + + + Returns the smallest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The smallest item in the source collection. + + + + + Implementation of the non-null processor. + + Aleksandar Seovic + + + + Returns non-null items from the collection. + + + The source collection to process. + + + Ignored. + + + A collection containing non-null source collection elements. + + + + + Implementation of the 'order by' processor. + + Aleksandar Seovic + Erich Eichinger + + + + Sorts the source collection using custom sort criteria. + + + Please note that your compare function needs to take care about + proper conversion of types to be comparable! + + + The source collection to sort. + + + Sort criteria to use. + + + A sorted array containing collection elements. + + + + + Reverts order of elements in the list + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the sort processor. + + Aleksandar Seovic + + + + Sorts the source collection. + + + Please not that this processor requires that collection elements + are of a uniform type and that they implement + interface. +

+ If you want to perform custom sorting based on element properties + you should consider using instead. + + + The source collection to sort. + + + Ignored. + + + An array containing sorted collection elements. + + + If collection is not empty and it is + neither nor . + + + +

+ Implementation of the sum aggregator. + + Aleksandar Seovic +
+ + + Returns the sum of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The sum of the numeric values in the source collection. + + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Base type for nodes that accept arguments. + + Aleksandar Seovic + + + + Base type for all expression nodes. + + Aleksandar Seovic + + + + For internal purposes only. Use for expression node implementations. + + + This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST + unfortunately is not marked as [Serializable].
+
+ Note:Since SpringAST implements , deriving classes + have to explicitely override if they need to persist additional + data during serialization. +
+
+ + + The global SpringAST node factory + + + + + Create an instance + + + + + Create an instance from a token + + + + + initialize this instance from an AST + + + + + initialize this instance from an IToken + + + + + initialize this instance from a token type number and a text + + + + + sets the text of this node + + + + + gets the text of this node + + + + + Create a new instance from SerializationInfo + + + + + populate SerializationInfo from this instance + + + + + gets or sets the token type of this node + + + + + gets or sets the text of this node + + + + + Interface that all navigation expression nodes have to implement. + + Aleksandar Seovic + + + + Returns expression value. + + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Expression variables map. + Value of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + New value for the last node of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + Expression variables map. + New value for the last node of the expression. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value. + + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Expression variables map. + Node's value. + + + + Returns node's value for the given context. + + Node's value. + + + + Evaluates this node for the given context, switching local variables map to the ones specified in . + + + + + Sets node's value for the given context. + + Object to evaluate node against. + New value for this node. + + + + Sets node's value for the given context. + + Object to evaluate node against. + Expression variables map. + New value for this node. + + + + Sets node's value for the given context. + + +

+ This is a default implementation of Set method, which + simply throws . +

+

+ This was done in order to avoid redundant Set method implementations, + because most of the node types do not support value setting. +

+
+
+ + + Returns a string representation of this node instance. + + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Holds the state during evaluating an expression. + + + + + Gets/Sets the root context of the current evaluation + + + + + Gets/Sets the current context of the current evaluation + + + + + Gets/Sets global variables of the current evaluation + + + + + Gets/Sets local variables of the current evaluation + + + + + Initializes a new EvaluationContext instance. + + The root context for this evaluation + dictionary of global variables used during this evaluation + + + + Switches current ThisContext. + + + + + Switches current LocalVariables. + + + + + Gets the type of the + + + + + Create a new instance + + + + + Create a new instance + + + + + Append an argument node to the list of child nodes + + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + + + + Asserts the argument count. + + The required count. + + + + Resolves the arguments. + + Current expression evaluation context. + An array of argument values + + + + Resolves the named arguments. + + Current expression evaluation context. + A dictionary of argument name to value mappings. + + + + Resolves the argument. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the argument without ensuring was called. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the named argument. + + Argument name. + Current expression evaluation context. + Resolved named argument value. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed assignment node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed attribute node in the navigation expression. + + Aleksandar Seovic + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Determines the type of object that should be instantiated. + + + The type name to resolve. + + + The type of object that should be instantiated. + + + If the type cannot be resolved. + + + + + Initializes this node by caching necessary constructor and property info. + + + + + + + Sets the named arguments (properties). + + Instance to set property values on. + Argument (property) name to value mappings. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Tries to determine attribute type based on the specified + attribute type name. + + + Attribute type name to resolve. + + + Resolved attribute type. + + + If type cannot be resolved. + + + + + Base class for binary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance with the supplied operands + + + + + + + Create a new instance from SerializationInfo + + + + + Evaluate the left operand + + + + + Evaluate the left operand + + + + + Gets the left operand. + + The left operand. + + + + Gets the right operand. + + The right operand. + + + + Represents parsed boolean literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the boolean literal node. + + + This is the entrypoint into evaluating this expression. + + Node's value. + + + + Represents parsed default node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns left operand if it is not null, or the right operand if it is. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Container object for the parsed expression. + + +

+ Preparing this object once and reusing it many times for expression + evaluation can result in significant performance improvements, as + expression parsing and reflection lookups are only performed once. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of the class + by parsing specified expression string. + + Expression to parse. + + + + Registers lambda expression under the specified . + + Function name to register expression as. + Lambda expression to register. + Variables dictionary that the function will be registered in. + + + + Initializes a new instance of the class + by parsing specified primary expression string. + + Primary expression to parse. + + + + Initializes a new instance of the class + by parsing specified property expression string. + + Property expression to parse. + + + + Initializes a new instance of the class. + + + + + Create a new instance from SerializationInfo + + + + + Evaluates this expression for the specified root object and returns + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value of the last node. + + + + Evaluates this expression for the specified root object and sets + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value to set last node to. + If navigation expression is empty. + + + + Evaluates this expression for the specified root object and returns + of the last node, if possible. + + Context to evaluate expression against. + Expression variables map. + Value of the last node. + + + + Contains a list of reserved variable names. + You must not use any variable names with the reserved prefix! + + + + + Variable Names using this prefix are reserved for internal framework use + + + + + variable name of the currently processed object factory, if any + + + + + Converts string representation of expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Utility class that enables easy expression evaluation. + + +

+ This class allows users to get or set properties, execute methods, and evaluate + logical and arithmetic expressions. +

+

+ Methods in this class parse expression on every invocation. + If you plan to reuse the same expression many times, you should prepare + the expression once using the static method, + and then call to evaluate it. +

+

+ This can result in significant performance improvements as it avoids expression + parsing and node resolution every time it is called. +

+

+

+
+ Aleksandar Seovic +
+ + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Value of the last node in the expression. + + + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Expression variables map. + Value of the last node in the expression. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Value to set last node to. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Expression variables map. + Value to set last node to. + + + + Represents parsed expression list node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a result of the last expression in a list. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the last expression in a list + + + + Represents parsed function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed hexadecimal integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the hexadecimal integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed indexer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + + Context to resolve property against. + Expression variables map. + PropertyInfo for this node. + + + + Represents parsed integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents lambda expression. + + Aleksandar Seovic + + + + caches argumentNames of this instance + + + + + caches body expression of this lambda function + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Gets argument names for this lambda expression. + + + + + Represents parsed list initializer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the list defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents local function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Represents parsed map entry node. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map entry defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed map initializer node in the navigation expression. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Static constructor. Initializes a map of special collection processor methods. + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Gets the best method given the name, argument values, for a given type. + + The type on which to search for the method. + Name of the method. + The binding flags. + The arg values. + Best matching method or null if none found. + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed null literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the null literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic addition operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic addition operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents AND operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical BETWEEN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents arithmetic division operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic division operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical equality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical equality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical IN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical IS operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IS operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical "less than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "less than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents VB-style logical LIKE operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical LIKE operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents logical MATCHES operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical MATCHES operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents arithmetic modulus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic modulus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic multiplication operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic multiplication operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents NOT operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Base class for unary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Gets the operand. + + The operand. + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical NOT operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical inequality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical inequality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents OR operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical OR operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic exponent operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic exponent operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic subtraction operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic subtraction operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary minus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary plus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + + Erich Eichinger + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed projection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of projection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents node that navigates to object's property or public field. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + The parent. + + + + Attempts to resolve property or field. + + + Type to search for a property or a field. + + + Property or field name. + + + Binding flags to use. + + + Resolved property or field accessor, or null + if specified cannot be resolved. + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Retrieves property or field value. + + Context to evaluate expressions against. + Current expression evaluation context. + Property or field value. + + + + Sets property value, doing any type conversions that are necessary along the way. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Sets property or field value using either dynamic or standard reflection. + + Object to evaluate node against. + New value for this node, converted to appropriate type. + + + + In the case of read only collections or custom collections that are not assignable from + IList, try to add to the collection. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + true if was able add to IList, IDictionary, or ISet + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... + + Context to resolve property against. + PropertyInfo for this node. + + + + Gets a value indicating whether this node represents a property. + + + true if this node is a property; otherwise, false. + + + + + Gets a value indicating whether this node represents a field. + + + true if this node is a field; otherwise, false. + + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified identifier. + + + Fully qualified identifier as a string. + + + + + Represents parsed real literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the real literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents a reference to a Spring-managed object. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the first context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the last context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of selection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed string literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Exception thrown when detecting invalid SpEL syntax + + Erich Eichinger + + + + TODO + + + + + TODO + + + + + + + + + + + + + + + + + + + + Gets a message that provides details on the syntax error. + + + + + The expression that caused the error + + + + + Represents ternary expression node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed type node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified typename. + + + Fully qualified typename as a string. + + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Implementation of that can be used to + format and parse boolean values. + + Erich Eichinger + + + + Interface that should be implemented by all formatters. + + + + Formatters assume that source value is a string, and make no assumptions + about the target value's type, which means that Parse method can return + object of any type. + + + Aleksandar Seovic + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Initializes a new instance of the class + using default values + + + + + Initializes a new instance of the class + + + + + Formats the specified boolean value. + + The value to format. + Formatted boolean value. + If is null. + If is not of type . + + + + Parses the specified boolean value according to settings of and + + The boolean value to parse. + Parsed boolean value as a . + If does not match or . + + + + Set/Get value to control casesensitivity of + + + Defaults to true + + + + + Set/Get value to recognize as boolean "true" value + + + Defaults to + + + + + Set/Get value to recognize as boolean "false" value + + + Defaults to + + + + + Implementation of that can be used to + format and parse currency values. + + + + CurrencyFormatter uses currency related properties of the + to format and parse currency values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of CurrencyFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the CurrencyFormatter in order + to override some of the default currency formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + currency values are formatted. + + + + + Formats the specified currency value. + + The value to format. + Formatted currency . + If is null. + If is not a number. + + + + Parses the specified currency value. + + The currency value to parse. + Parsed currency value as a . + + + + Gets or sets the currency decimal digits. + + The currency decimal digits. + + + + + Gets or sets the currency decimal separator. + + The currency decimal separator. + + + + + Gets or sets the currency group sizes. + + The currency group sizes. + + + + + Gets or sets the currency group separator. + + The currency group separator. + + + + + Gets or sets the currency symbol. + + The currency symbol. + + + + + Gets or sets the currency negative pattern. + + The currency negative pattern. + + + + + Gets or sets the currency positive pattern. + + The currency positive pattern. + + + + + Implementation of that can be used to + format and parse values. + + + + DateTimeFormatter uses properties of the + to format and parse values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of DateTimeFormatter, default DateTimeFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the DateTimeFormatter in order + to override some of the default formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + Date/time format string. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture. + + + + Formats the specified value. + + The value to format. + Formatted value. + If is null. + If is not an instance of . + + + + Parses the specified value. + + The string to parse. + Parsed value. + + + + Provides base functionality for filtering values before they actually get parsed/formatted. + + Erich Eichinger + + + + Creates a new instance of this FilteringFormatter. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Allows to rewrite a value before it gets parsed by the underlying formatter + + + + + Allows to change a value before it gets formatted by the underlying formatter + + + + + Implementation of that can be used to + format and parse floating point numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign, decimal point, exponent). + + + Aleksandar Seovic + + + + Default format string. + + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and current thread's culture. + + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and specified culture. + + The culture. + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + The culture name. + + + + Initializes a new instance of the class, + using specified format string and culture. + + The format string. + The culture. + + + + Formats the specified float value. + + The value to format. + Formatted floating point number. + If is null. + If is not a number. + + + + Parses the specified float value. + + The float value to parse. + Parsed float value as a . + + + + Replaces input strings with a given default value, + if they are null or contain whitespaces only, + + Erich Eichinger + + + + Creates a new instance of this HasTextFilteringFormatter using null as default value. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Creates a new instance of this HasTextFilteringFormatter. + + the default value to be returned, if input text doesn't contain text + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + If value contains no text, it will be replaced by a defaultValue. + + + + + Implementation of that can be used to + format and parse integer numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign). + + + Aleksandar Seovic + + + + Initializes a new instance of the class, + using default format string of '{0:D}'. + + + + + Initializes a new instance of the class, + using specified format string. + + + + + Formats the specified integer value. + + The value to format. + Formatted integer number. + If is null. + If is not an integer number. + + + + Parses the specified integer value. + + The integer value to parse. + Parsed number value as a . + + + + Implementation of that simply calls . + + + This formatter is a no-operation implementation. + + Erich Eichinger + + + + Initializes a new instance of the class. + + + + + Converts the passed value to a string by calling . + + The value to convert. + to string converted value. + + + + Returns the passed string "as is". + + The value to return. + The value passed into this method. + + + + Implementation of that can be used to + format and parse numbers. + + + + NumberFormatter uses number-related properties of the + to format and parse numbers. + + + This formatter works with both integer and decimal numbers and allows + you to format and parse numbers that conform to + number style (leading and trailing white space and/or sign, thousands separator, + decimal point) + + + If you use one of the constructors that accept culture as a parameter + to create an instance of NumberFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the NumberFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified number value. + + The value to format. + Formatted number . + If is null. + If is not a number. + + + + Parses the specified number value. + + The number value to parse. + Parsed number value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the number group sizes. + + The number group sizes. + + + + + Gets or sets the number group separator. + + The number group separator. + + + + + Gets or sets the negative pattern. + + The number negative pattern. + + + + + Implementation of that can be used to + format and parse numbers. + + + + PercentFormatter uses percent-related properties of the + to format and parse percentages. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of PercentFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the PercentFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified percentage value. + + The value to format. + Formatted percentage. + If is null. + If is not a number. + + + + Parses the specified percentage value. + + The percentage value to parse. + Parsed percentage value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the percent group sizes. + + The percent group sizes. + + + + + Gets or sets the percent group separator. + + The percent group separator. + + + + + Gets or sets the negative pattern. + + The percent negative pattern. + + + + + Gets or sets the positive pattern. + + The percent positive pattern. + + + + + Gets or sets the percent symbol. + + The percent symbol. + + + + + Gets or sets the per mille symbol. + + The per mille symbol. + + + + + Loads a list of resources that should be applied from the .NET . + + +

+ This implementation will iterate over all resource managers + within the message source and return a list of all the resources whose name starts with '$this'. +

+

+ All other resources will be ignored, but you can retrieve them by calling one of + GetMessage methods on the message source directly. +

+
+ Aleksandar Seovic +
+ + + Abstract base class that all localizers should extend + + +

+ This class contains the bulk of the localizer logic, including implementation + of the ApplyResources methods that are defined in + interface. +

+

+ All specific localizers need to do is inherit this class and implement + GetResources method that will return a list of + objects that should be applied to a specified target. +

+

+ Custom implementations can use whatever type of resource storage they want, + such as standard .NET resource sets, custom XML files, database, etc. +

+
+ Aleksandar Seovic +
+ + + Defines an interface that localizers have to implement. + + +

+ Localizers are used to automatically apply resources to object's members + using reflection. +

+
+ Aleksandar Seovic +
+ + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's culture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's uiCulture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Returns a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + implementation + that simply returns the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . + + Aleksandar Seovic + + + + Strategy interface for + resolution. + + Aleksandar Seovic + + + + Resolves the + from some context. + + +

+ The 'context' is determined by the appropriate implementation class. + An example of such a context might be a thread local bound + , or a + sourced from an HTTP + session. +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + +

+ This is an optional operation and does not need to be implemented + such that it actually does anything useful (i.e. it can be a no-op). +

+
+ + The new or + to clear the current . + +
+ + + Returns the default . + + +

+ It tries to get the + from the value of the + + property and falls back to the of the + current thread if the + + is . +

+
+ + The default + +
+ + + Resolves the + from some context. + + +

+ The 'context' in this implementation is the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + + The new or + to clear the current . + + + + + + + The default . + + + The default . + + + + + Abstract base class that all resource cache implementations should extend. + + Aleksandar Seovic + + + + Defines an interface that resource cache adapters have to implement. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Gets the list of resources from the cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Crates resource cache key for the specified target object and culture. + + Target object to apply resources to. + Resource culture to use for resource lookup. + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Resource cache implementation that doesn't cache resources. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + Always returns null. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + + + + Holds mapping between control property and it's value + as read from the resource file. + + Aleksandar Seovic + + + + Creates instance of resource mapper. + + Target property. + Resource value. + + + + Gets parsed target property expression. See + for more information on object navigation expressions. + + + + + Value of the resource that target property should be set to. + + + + + Utility class to aid in the manipulation of events and delegates. + + Griffin Caprio + + + + Returns a new instance of the requested . + + +

+ Often used to wire subscribers to event publishers. +

+
+ + The of delegate to create. + + + The target subscriber object that contains the delegate implementation. + + + referencing the delegate method on the subscriber. + + + A delegate handler that can be added to an events list of handlers, or called directly. + +
+ + + Queries the input type for a signature matching the input + signature. + + + Typically used to query a potential subscriber to see if they implement an event handler. + + to match against + to query + + matching input + signature, or if there is no match. + + + + + Creates a new instance of the EventManipulationUtilities class. + + +

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

+
+
+ + + Default implementation of the + interface. + + Griffin Caprio + + + + Creates a new instance of the EventRegistry class. + + + + + Adds the input object to the list of publishers. + + + This publishes all events of the source object to any object + wishing to subscribe + + The source object to publish. + + + + Subscribes to all events published, if the subscriber implements + compatible handler methods. + + The subscriber to use. + + + + Subscribes to published events of all objects of a given type, if the + subscriber implements compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + The target to unsubscribe from + + + + The list of event publishers. + + The list of event publishers. + + + + To be implemented by any object that wishes to receive a reference to + an . + + +

+ This interface only applies to objects that have been instantiated + within the context of an + . This interface does + not typically need to be implemented by application code, but is rather + used by classes internal to Spring.NET. +

+
+ Mark Pollack + Rick Evans +
+ + + Set the + associated with the + that created this + object. + + +

+ This property will be set by the relevant + after all of this + object's dependencies have been resolved. This object can use the + supplied + immediately to publish or subscribe to one or more events. +

+
+
+ + + Marks a constructor, field, propery or config method as to be + autowired by Spring's dependency injection facilities. + + Only one constructor (at max) of any given bean class may carry this + annotation, indicating the constructor to autowire when used as a Spring + bean. Such a constructor does not have to be public. + + Fields are injected right after construction of a object, before any + config methods are invoked. Such a config field does not have to be public. + + Config methods may have an arbitrary name and any number of arguments; + each of those arguments will be autowired with a matching bean in the + Spring container. Object property setter methods are effectively just + a special case of such a general config method. Such config methods + do not have to be public. + + In the case of multiple argument methods, the 'required' parameter is + applicable for all arguments. + + In case of a {@link java.util.Collection} or {@link java.util.Map} + dependency type, the container will autowire all beans matching the + declared value type. In case of a Map, the keys must be declared as + type String and will be resolved to the corresponding bean names. + + Note that actual injection is performed through a + {@link org.springframework.beans.factory.config.BeanPostProcessor + BeanPostProcessor} which in turn means that you cannot + use {@code @Autowired} to inject references into + {@link org.springframework.beans.factory.config.BeanPostProcessor + BeanPostProcessor} or + {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor BeanFactoryPostProcessor} + types. Please consult the javadoc for the {@link AutowiredAnnotationBeanPostProcessor} + class (which, by default, checks for the presence of this annotation). + + + + + Defines it Autowired PostProcessor should fail if object is not set + + + + + implementation + that autowires annotated fields, properties and arbitrary config methods. + Such members to be injected are detected through an attribute: by default, + Spring's . + + Only one constructor (at max) of any given bean class may carry this + annotation with the 'required' parameter set to true, + indicating the constructor to autowire when used as a Spring bean. + If multiple non-required constructors carry the annotation, they + will be considered as candidates for autowiring. The constructor with + the greatest number of dependencies that can be satisfied by matching + beans in the Spring container will be chosen. If none of the candidates + can be satisfied, then a default constructor (if present) will be used. + An annotated constructor does not have to be public. + + Fields are injected right after construction of a bean, before any + config methods are invoked. Such a config field does not have to be public. + + Config methods may have an arbitrary name and any number of arguments; each of + those arguments will be autowired with a matching bean in the Spring container. + Bean property setter methods are effectively just a special case of such a + general config method. Config methods do not have to be public. + + Note: A default AutowiredAttributeObjectPostProcessor will be registered + by the "context:annotation-config" and "context:component-scan" XML tags. + Remove or turn off the default annotation configuration there if you intend + to specify a custom AutowiredAnnotationBeanPostProcessor bean definition. + NOTE: Annotation injection will be performed before XML injection; + thus the latter configuration will override the former for properties wired through + both approaches. + + + + + Adapter that implements all methods on + as no-ops, which will not change normal processing of each object instantiated + by the container. Subclasses may override merely those methods that they are + actually interested in. + + + Note that this base class is only recommendable if you actually require + functionality. If all you need + is plain functionality, prefer a straight + implementation of that (simpler) interface. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Extension of the interface, + adding a callback for predicting the eventual type of a processed object. + + This interface is a special purpose interface, mainly for + internal use within the framework. In general, application-provided + post-processors should simply implement the plain + interface or derive from the + class. New methods might be added to this interface even in point releases. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Subinterface of + + that adds a before-instantiation callback and a callback after instantiation but before + explicit properties are set or autowiring occurs. + + + + Typically used to suppress default instantiation for specific target objects, + for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, + lazily initializing targets, etc), or to implement additional injection strategies such as field + injection. + + + This interface is a special purpose interface, mainly for internal use within the framework. + It is recommended to implement the plain interface as far as + possible, or to derive from in order to be shielded + from extension to this interface. + + + Juergen Hoeller + Rick Evans (.NET) + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Predicts the type of the object to be eventually returned from this + processors callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Predicts the type of the object to be eventually returned from this + processors PostProcessBeforeInstantiation callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + 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. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + 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. + +
+ + + Interface to be implemented by objects that wish to be aware of their owning + . + + +

+ For example, objects can look up collaborating objects via the factory. +

+

+ Note that most objects will choose to receive references to collaborating + objects via respective properties and / or an appropriate constructor. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + 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. + +
+ + + Add a Autowired Attribute Type + + + + + Create a new instance of an Autowire Post Processor + with standard attributes of + and + + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Finds autowire candidates and verifies them + + + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + + + + + Injects autoried annotated properties, fields, methods into objectInstance + + + + + Name of the object. + The actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Register the specified bean as dependent on the autowired beans. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ + The order value. + +
+ + + 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. + +
+ + + Class representing injection information about an annotated field. + + + + + Represents an element that needs to be injected + + + + + Internal class for managing injection metadata. + Not intended for direct use in applications. + + + + + + + + + + + + + + + + Inject values for members into object instance + + + + + + + + Represents an element that needs to be injected + + + + + The Property, field, method or constructor info + + + + + Instantiates a new inject element + + + + + + Ececuted to inject value to associated memeber info + + + + + + + + Class representing injection information about an annotated field. + + + + + Class representing injection information about an annotated method. + + + + + implementation + that invokes attributed init and destroy methods. Allows for an attributation + alternative to Spring's and + callback interfaces. + + Invoke and destroy annotations may be applied to methods of any visibility: + public, protected, or private. Multiple such methods + may be annotated, but it is recommended to only annotate one single + init method and destroy method, respectively. + + + + + Subinterface of + that adds + a before-destruction callback. + + + The typical usage will be to invoke custom destruction callbacks on + specific object types, matching corresponding initialization callbacks. + + Juergen Hoeller + Simon White (.NET) + + + + Apply this + to the + given new object instance before its destruction. Can invoke custom + destruction callbacks. + + The new object instance. + The name of the object. + + In case of errors. + + + + + Creates InitDestroy Post Processor with default attribute types of + + + + + + Applies PostConstruct init method initialisation if instance is attributed + + 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. + + + + + No special post processing after initialization + + + + + Executed PreDestroy methods in given order for provided instance + + The new object instance.The name of the object.In case of errors. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ + The order value. + +
+ + + Specify the init attribute to check for, indicating initialization + methods to call after configuration of an object. + + + + + Specify the destroy attribute to check for, indicating disposal + methods to call before object is destroyed + + + + + + + + + + Defines a method that will be called during the intantiation of an instance + + + + + Initializes a new instance of the PostConstruct class with order = 1 + + + + + Initializes a new instance of the PostConstruct class with defined order + + Order in which the PostContruct method is called + + + + Defined the order in which the PostContruct methods are called + + + + + Defines a method that will be called prior to the destruction of the object instance + + + + + Initializes a new instance of the PreDestroy attribute with order = 1 + + + + + Initializes a new instance of the PreDestroy attribute with defined order + + Order in which the PostContruct method is called + + + + Defined the order in which the PreDestroy methods are called + + + + + implementation that matches bean definition qualifier + against on the field or parameter to be autowired. + Also supports suggested expression values through a attribute. + + + + + Strategy interface for determining whether a specific object definition + qualifies as an autowire candidate for a specific dependency. + + Mark Fisher + Juergen hoeller + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Determine whether a default value is suggested for the given dependency. + + The descriptor for the target method parameter or field + The value suggested (typically an expression String), + or null if none found + + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for Spring's standard attribute. + + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for the given qualifier attribute type. + + the qualifier attribute to look for + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for the given qualifier attribute types. + + the qualifier annotations to look for + + + + Register the given type to be used as a qualifier when autowiring. +

This identifies qualifier annotations for direct use (on fields, + method parameters and constructor parameters) as well as meta + annotations that in turn identify actual qualifier annotations.

+

This implementation only supports annotations as qualifier types. + The default is Spring's attribute which serves + as a qualifier for direct use and also as a meta attribute.

+
+ the attribute type to register +
+ + + Determine whether the provided object definition is an autowire candidate. +

To be considered a candidate the object's autowire-candidate + attribute must not have been set to 'false'. Also, if an attribute on + the field or parameter to be autowired is recognized by this bean factory + as a qualifier, the object must 'match' against the attribute as + well as any attributes it may contain. The bean definition must contain + the same qualifier or match by meta attributes. A "value" attribute will + fallback to match against the bean name or an alias if a qualifier or + attribute does not match.

+
+
+ + + Match the given qualifier annotations against the candidate bean definition. + + + + + Checks whether the given attribute type is a recognized qualifier type. + + + + + Match the given qualifier attribute against the candidate bean definition. + + + + + Determine whether the given dependency carries a value attribute. + + + + + Determine a suggested value from any of the given candidate annotations. + + + + + This annotation may be used on a field or parameter as a qualifier for + candidate beans when autowiring. It may also be used to annotate other + custom annotations that can then in turn be used as qualifiers. + + + + + Instantiate a new qualifier with an empty name + + + + + Instantiate a new qualifier with a givin name + + name to use as qualifier + + + + Checks weather the attribute is the same + + + + + + + Gets the name associated with this qualifier + + + + + Marks a property as being 'required': that is, the setter property + must be configured to be dependency-injected with a value. + + Consult the SDK documentation for , + which, by default, checks for the presence of this annotation. + + Rob Harrop + Mark Pollack + + + + A implementation that enforces required properties to have been configured. + Required properties are detected through an attribute, by default, Spring's + attribute. + + + The motivation for the existence of this IObjectPostProcessor is to allow + developers to annotate the setter properties of their own classes with an + arbitrary attribute to indicate that the container must check + for the configuration of a dependency injected value. This neatly pushes + responsibility for such checking onto the container (where it arguably belongs), + and obviates the need (in part) for a developer to code a method that + simply checks that all required properties have actually been set. + + Please note that an 'init' method may still need to implemented (and may + still be desirable), because all that this class does is enforce that a + 'required' property has actually been configured with a value. It does + not check anything else... In particular, it does not check that a + configured value is not null. + + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Cache for validated object names, skipping re-validation for the same object + + + + + Post-process the given property values before the factory applies them + to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. + + The property values that the factory is about to apply (never null). + The 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances or null to skip property population. + + If a required property value has not been specified + in the configuration metadata. + + + + Determines whether the supplied property is required to have a value, that is to be dependency injected. + + + This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that + the property has a setter method. + + The target PropertyInfo + + true if the supplied property has been marked as being required;; otherwise, false if + not or if the supplied property does not have a setter method + + + + + Builds an exception message for the given list of invalid properties. + + The list of names of invalid properties. + Name of the object. + The exception message + + + + Sets the type of the required attribute, to be used on a property setter + + + The default required attribute type is the Spring-provided attribute. + This setter property exists so that developers can provide their own + (non-Spring-specific) annotation type to indicate that a property value is required. + + The type of the required attribute. + + + + Base class that provides common functionality needed for several IObjectFactoryPostProcessor + implementations + + Mark Pollack + + + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Resolves the supplied into a + instance. + + The object that is to be resolved into a + instance. + The error context source. + The error context string. + A resolved . + +

+ This (default) implementation supports resolving + s and s. + Only override this method if you want to key your type alias + on something other than s + and s. +

+
+ + If the supplied is , + or the supplied cannot be resolved. + +
+ + + Return the order value of this object, with a higher value meaning + greater in terms of sorting. + + The order value. + + + + + Simple template superclass for + implementations that allows for the creation of a singleton or a prototype + instance (depending on a flag). + + + If the value of the + + property is (this is the default), this class + will create a single instance of it's object upon initialization and + subsequently return the singleton instance; else, this class will + create a new instance each time (prototype mode). Subclasses must + implement the + + template method to actually create objects. + + Juergen Hoeller + Keith Donald + Simon White (.NET) + + + + Interface to be implemented by objects used within an + that are themselves + factories. + + +

+ If an object implements this interface, it is used as a factory, + not directly as an object. s + can support singletons and prototypes + ()... + please note that an + itself can only ever be a singleton. It is a logic error to configure an + itself to be a prototype. +

+ + An object that implements this interface cannot be used as a normal object. + +
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + + If this method is being called in the context of an enclosing IoC container and + returns , the IoC container will consider this factory + object as not being fully initialized and throw a corresponding (and most + probably fatal) exception. + + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + 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? + + + + + Invoked by an + after it has injected all of an object's dependencies. + + + In the event of misconfiguration (such as the failure to set a + required property) or if initialization fails. + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + Template method that subclasses must override to construct + the object returned by this factory. + + + Invoked once immediately after the initialization of this + in the case of + a singleton; else, on each call to the + + method. + + + If an exception occured during object creation. + + + A distinct instance of the object created by this factory. + + + + + Performs cleanup on any cached singleton object. + + +

+ Only makes sense in the context of a singleton object. +

+
+ + +
+ + + Is the object managed by this factory a singleton or a prototype? + + +

+ Please note that changing the value of this property after + this factory object instance has been created by an enclosing + Spring.NET IoC container really is a programming error. This + property should really only be set once, prior to the invocation + of the + + callback method. +

+
+ +
+ + + Return the of object that this + creates, or + if not known in advance. + + + + + + The various autowiring modes. + + Rick Evans + + + + Do not autowire. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Implementation of that + resolves variable name against command line arguments. + + Aleksandar Seovic + + + + Defines contract that different variable sources have to implement. + + +

+ The "variable sources" are objects containing name-value pairs + that allow a variable value to be retrieved for the given name.

+

+ Out of the box, Spring.NET supports a number of variable sources, + that allow users to obtain variable values from .NET config files, + Java-style property files, environment, registry, etc.

+

+ Users can always write their own variable sources implementations, + that will allow them to load variable values from the database or + other proprietary data source.

+
+ + + + + + + Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Default constructor. + Initializes command line arguments from the environment. + + + + + Constructor that allows arguments to be passed externally. + Useful for testing. + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes command line arguments dictionary. + + + + + Gets or sets a prefix that should be used to + identify arguments to extract values from. + + + A prefix that should be used to identify arguments + to extract values from. Defaults to slash ("/"). + + + + + Gets or sets a character that should be used to + separate argument name from its value. + + + A character that should be used to separate argument + name from its value. Defaults to colon (":"). + + + + + Implementation of that + resolves variable name against name-value sections in + the standard .NET configuration file. + + Aleksandar Seovic + + + + Initializes a new instance of + + + + + Initializes a new instance of from the given + + + + + Initializes a new instance of from the given + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets a list of section names variables should be loaded from. + + + All sections specified need to be handled by the + in order to be processed successfully. + + + A list of section names variables should be loaded from. + + + + + Convinience property. Gets or sets a single section + to read properties from. + + + The section specified needs to be handled by the + in order to be processed successfully. + + + A section to read properties from. + + + + + Implementation of that + resolves variable name against provided variables. + + + Variable name resolution is case insensitive. + + Bruno Baia + + + + Initializes a new instance of . + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Gets or sets variables. + + + + + Various utility methods for .NET style .config files. + + +

+ Currently supports reading custom configuration sections and returning them as + objects. +

+
+ Simon White + Mark Pollack +
+ + + Initializes the type members + + + + + Reads the specified configuration section into a + . + + The resource to read. + The section name. + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + The populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Read from the specified configuration from the supplied XML + into a + . + + + + Does not support section grouping. The supplied XML + must already be loaded. + + + + The to read from. + + + The configuration section name to read. + + + A newly populated + . + + + If any errors are encountered while reading (this only applies to + v1.1 and greater of the .NET Framework). + + + If any errors are encountered while reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Returns the section from the specified resource with the given section name + + + + + Returns the section from the specified resource with the given section name. Use + in case no section handler is specified. + + + + + Returns the typed section from the specified resource with the given section name + + + + + Returns the section from the specified resource with the given section name. Use + in case no section handler is specified. + + + + + Returns the typed result of evaluating the specified . + + if the result's type does not match the expected type + + + + Reads the specified configuration section from the given + + + + + + + + Reads the specified configuration section from the given + + + + + + + + + Determine the configuration section handler type + + + + + Populates the supplied with values from + a .NET application configuration file. + + + The + to add any key-value pairs to. + + + The configuration section name in the a .NET application configuration + file. + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + if the supplied + was found. + + + + + Creates a new instance of the ConfigurationReader class. + + +

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

+
+
+ + + Implementation of that + resolves variable name connection strings defined in + the standard .NET configuration file. + + +

+ When the <connectionStrings> configuration section is processed by this class, + two variables are defined for each connection string: one for connection string and + the second one for the provider name.

+

+ Variable names are generated by appending '.connectionString' and '.providerName' + literals to the value of the name attribute of the connection string element. + For example:

+
+            
+               
+            
+            
+

+ will result in two variables being created: myConn.connectionString and myConn.providerName. + You can reference these variables within your object definitions, just like any other variable.

+
+ Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Holder for constructor argument values for an object. + + +

+ Supports values for a specific index or parameter name (case + insensitive) in the constructor argument list, and generic matches by + . +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Can be used as an argument filler for the + + overload when one is not looking for an argument by index. + + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Add argument value for the given index in the constructor argument list. + + + The index in the constructor argument list. + + + The argument value. + + + + + Add argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + The argument value. + + The of the argument + . + + + + + Add argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + The argument value. + + If the supplied is + or is composed wholly of whitespace. + + + + + Get argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + + The required of the argument. + + + The + + for the argument, or if none set. + + + + + Get argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + + The + + for the argument, or if none set. + + + + + Does this set of constructor arguments contain a named argument matching the + supplied name? + + + + The comparison is performed in a case-insensitive fashion. + + + The named argument to look up. + + if this set of constructor arguments + contains a named argument matching the supplied + name. + + + + + Add generic argument value to be matched by type. + + + The argument value. + + + + + Add generic argument value to be matched by type. + + The argument value. + + The of the argument + . + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + The + + for the argument, or if none set. + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list, or to the named argument, or + generically matches by . + + + The index of the argument in the constructor argument list. May be + negative, to denote the fact that we are not looking for an + argument by index (see + . + + + The name of the argument in the constructor argument list. May be + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Return the map of indexed argument values. + + + An with + indices as keys and + s + as values. + + + + + Return the map of named argument values. + + + An with + named arguments as keys and + s + as values. + + + + + Return the set of generic argument values. + + + A of + s. + + + + + Return the number of arguments held in this instance. + + + + + Returns true if this holder does not contain any argument values, + neither indexed ones nor generic ones. + + + + + Holder for a constructor argument value, with an optional + attribute indicating the target + of the actual constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + The of the argument + . Can also be one of the common + aliases (int, bool, + float, etc). + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Gets and sets the value for the constructor argument. + + +

+ Only necessary for manipulating a registered value, for example in + s. +

+
+
+ + + Return the of the constructor + argument. + + + + + + implementation that allows for convenient registration of custom + s. + + + + The use of this class is typically not required; the .NET + mechanism of associating a + with a + via the use of the + is the + recommended (and standard) way. This class primarily exists to cover + those cases where third party classes to which one does not have the + source need to be exposed to the type conversion mechanism. + +

+ Because the + + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever type conversion is required. If + one is using a + + object definition within the scope of an + , no such automatic + pickup of the + + is performed (custom converters will have to be added manually using the + + method). For most application scenarios, one will get better + mileage using the + abstraction. +

+
+ +

+ The following examples all assume XML based configuration, and use + inner object definitions to define the custom + objects (nominally to + avoid polluting the object name space, but also because the + configuration simply reads better that way). +

+ + + + + + + + + + + + + + + + +

+ The following example illustrates a complete (albeit naieve) use case + for this class, including a custom + implementation, said + converters domain class, and the XML configuration that hooks the + converter in place and makes it available to a Spring.NET container for + use during object resolution. +

+

+ The domain class is a simple data-only object that contains the data + required to send an email message (such as the host and user account + name). A developer would prefer to use a string of the form + UserName=administrator,Password=r1l0k1l3y,Host=localhost to + configure the mail settings and just let the container take care of the + conversion. +

+ + namespace ExampleNamespace + { + public sealed class MailSettings + { + private string _userName; + private string _password; + private string _host; + + public string Host + { + get { return _host; } + set { _host = value; } + } + + public string UserName + { + get { return _userName; } + set { _userName = value; } + } + + public string Password + { + get { return _password; } + set { _password = value; } + } + } + + public sealed class MailSettingsConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (typeof (string) == sourceType) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + string text = value as string; + if(text != null) + { + MailSettings mailSettings = new MailSettings(); + string[] tokens = text.Split(','); + for (int i = 0; i < tokens.Length; ++i) + { + string token = tokens[i]; + string[] settings = token.Split('='); + typeof(MailSettings).GetProperty(settings[0]) + .SetValue(mailSettings, settings[1], null); + } + return mailSettings; + } + return base.ConvertFrom(context, culture, value); + } + } + + // a very naieve class that uses the MailSettings class... + public sealed class ExceptionLogger + { + private MailSettings _mailSettings; + + public MailSettings MailSettings { + { + set { _mailSettings = value; } + } + + public void Log(object value) + { + Exception ex = value as Exception; + if(ex != null) + { + // use _mailSettings instance... + } + } + } + } + +

+ The attendant XML configuration for the above classes would be... +

+ + + + + + + + + + + + + + + + Juergen Hoeller + Simon White (.NET) + + + + + + + Registers any custom converters with the supplied + . + + + The object factory to register the converters with. + + + In case of errors. + + + + + Resolves the supplied into a + instance. + + + The object that is to be resolved into a + instance. + + + A resolved instance. + + + If the supplied is , + or the supplied cannot be resolved. + + + + + The custom converters to register. + + +

+ The uses the type name + of the class that requires conversion as the key, and an + instance of the + that will effect + the conversion. Alternatively, the actual + of the class that requires conversion + can be used as the key. +

+
+ +

+ + IDictionary converters = new Hashtable(); + converters.Add( "System.Date", new MyCustomDateConverter() ); + // a System.Type instance can also be used as the key... + converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); + +

+
+
+ + + implementation that + creates delegates. + + +

+ Supports the creation of s for both + instance and methods. +

+
+ Rick Evans +
+ + + Callback method called once all factory properties have been set. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Creates the delegate. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + The of + created by this factory. + + +

+ Returns the + if accessed prior to the method + being called. +

+
+
+ + + The of the + created by this factory. + + + + + The name of the method that is to be invoked by the created + delegate. + + + + + The target if the + refers to a method. + + + + + The target object if the + refers to an instance method. + + + + + A generic implementation of an , that delegates post processing to a passed delegate + + + This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. + + + The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on + the context instance: + + IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); + ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => + { + of.RegisterSingleton("someObject", someObject); + })); + + + Erich Eichinger + + + + Get or Set the handler to delegate configuration to + + + + + Descriptor for a specific dependency that is about to be injected. + Wraps a constructor parameter, a method parameter or a field, + allowing unified access to their metadata. + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for a method or constructor parameter. + Considers the dependency as 'eager' + + The MethodParameter to wrap. + if set to true if the dependency is required. + + + + Initializes a new instance of the class for a method or a constructor parameter. + + The MethodParameter to wrap. + if set to true the dependency is required. + if set to true the dependency is 'eager' in the sense of + eagerly resolving potential target objects for type matching. + + + + Create a new descriptor for a property. + Considers the dependency as 'eager'. + property to wrap + required whether the dependency is required + + + + + Create a new descriptor for a property. + property to wrap + whether the dependency is required + whether this dependency is 'eager' in the sense of + eagerly resolving potential target beans for type matching + + + + + Create a new descriptor for a field. + Considers the dependency as 'eager'. + field to wrap + whether the dependency is required + + + + + Create a new descriptor for a field. + field to wrap + whether the dependency is required + whether this dependency is 'eager' in the sense of + eagerly resolving potential target beans for type matching + + + + + Gets a value indicating whether this dependency is required. + + true if required; otherwise, false. + + + + Determine the declared (non-generic) type of the wrapped parameter/field. + + The type of the dependency (never null + + + + Gets a value indicating whether this is eager in the sense of + eagerly resolving potential target beans for type matching. + + true if eager; otherwise, false. + + + + Gets the wrapped MethodParameter, if any. + + The method parameter. + + + + Gets the Attributes assigned to Field, Property or Paramater + + + + + Gets the name of the member info + + + + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+ + If the value is . + + + If the value is an . + + + If the value is an interface. + +
+ + + The of objects created by this factory. + + + Always returns the . + + + + + A very simple, hashtable-based implementation of + + Erich Eichinger + + + + Creates a new, empty variable source + + + + + Creates a new, empty and case-insensitive variable source + + + + + Create a new variable source from a list of paired string values. + + + + The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: + + new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) + + + + the argument list containing pairs, or null + + + + Initializes a new instance of the DictionaryVariableSource class. + + + + + Creates a new variable source, reading values from another dictionary + and converting them to strings if necessary + + + + + Adds a key/value pair + + this dictionary. allows for fluent config + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Performs a variable name lookup + + + + + Specifies how instances of the + + class must apply environment variables when replacing values. + + Mark Pollack + + + + Never replace environment variables. + + + + + If properties are not specified via a resource, + then resolve using environment variables. + + + + + Apply environment variables first before applying properties from a + resource. + + + + + Implementation of that + resolves variable name against environment variables. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Holder for event handler values for an object. + + Rick Evans (.NET) + + + + The empty array of s. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Adds the supplied handler to the collection of event handlers. + + The handler to be added. + + + + The mapping of event names to an + of + s. + + + + + Gets the of events + that have handlers associated with them. + + + + + Gets the of + s for the supplied + event name. + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to a Spring that should be evaluated at runtime. + + Aleksandar Seovic + + + + Creates a new instance of the + + class. + + The expression to resolve. + + + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Gets or sets the expression string. Setting the expression string will cause + the expression to be parsed. + + The expression string. + + + + Return the expression. + + + + + Properties for this expression node. + + + + + implementation that + retrieves a static or non-static public field value. + + +

+ Typically used for retrieving public constants. +

+
+ +

+ The following example retrieves the field value... +

+ + + + + + +

+ The previous example could also have been written using the convenience + + property, like so... +

+ + + + + +

+ This class also implements the + interface + (). + If the id (or name) of one's + + object definition is set to the + of the field to be retrieved, then the id (or + name) of one's object definition will be used for the name of the + field lookup. See below for an example of this + concise style of definition. +

+ + + + + + + +

+ The usage for retrieving instance fields is similar. No example is shown + because public instance fields are generally bad practice; but if + you have some legacy code that exposes public instance fields, or if you + just really like coding public instance fields, then you can use this + implementation to + retrieve such field values. +

+ + Juergen Hoeller + Rick Evans (.NET) + + + + Interface to be implemented by objects that wish to be aware of their object + name in an . + + +

+ Note that most objects will choose to receive references to collaborating + objects via respective properties. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + 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. +

+
+
+ + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + +

+ This method allows the object instance to perform initialization only + possible when all object properties have been set and to throw an + exception in the event of misconfiguration. +

+
+ + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The of the + field to be retrieved. + + + + + Set the name of the object in the object factory that created this object. + + + The name of the object in the factory. + + +

+ In the context of the + + class, the + + value will be interepreted as the value of the + + property if no value has been explicitly assigned to the + + property. This allows for concise object definitions with just an id or name; + see the class documentation for + + for an example of this style of usage. +

+
+
+ + + The name of the field the value of which is to be retrieved. + + +

+ If the + + has been set (and is not ), then the value of this property + refers to an instance field name; it otherwise refers to a + field name. +

+
+
+ + + The object instance on which the field is defined. + + + + + The on which the field is defined. + + + + + The of object that this + creates, or + if not known in advance. + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + Extension of the + interface to be implemented by object factories that are capable of + autowiring and expose this functionality for existing object instances. + + Juergen Hoeller + Rick Evans (.NET) + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + the resolved object, or null if none found + if dependency resolution failed + + + + Extension of the interface + that injects dependencies into the object managed by the factory. + + Bruno Baia + + + + Gets the template object definition that should be used + to configure the instance of the object managed by this factory. + + + + + SPI interface to be implemented by most if not all listable object factories. + + +

+ Allows for framework-internal plug'n'play, e.g. in + . +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Configuration interface to be implemented by most if not all object + factories. + + +

+ Provides the means to configure an object factory in addition to the + object factory client methods in the + interface. +

+

+ Allows for framework-internal plug'n'play even when needing access to object + factory configuration methods. +

+

+ When disposed, it will destroy all cached singletons in this factory. Call + when you want to shutdown + the factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Interface that defines a registry for shared object instances. + + + Can be implemented by + implementations in order to expose their singleton management facility + in a uniform manner. + + The interface extends this interface. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Registers the given existing object as singleton in the object registry, + under the given object name. + + + + The given instance is supposed to be fully initialized; the registry + will not perform any initialization callbacks (in particular, it won't + call IInitializingObject's AfterPropertiesSet method). + The given instance will not receive any destruction callbacks + (like IDisposable's Dispose method) either. + + + If running within a full IObjectFactory: Register an object definition + instead of an existing instance if your object is supposed to receive + initialization and/or destruction callbacks. + + + Typically invoked during registry configuration, but can also be used + for runtime registration of singletons. As a consequence, a registry + implementation should synchronize singleton access; it will have to do + this anyway if it supports a BeanFactory's lazy initialization of singletons. + + + Name of the object. + The singleton object. + + + + + + Return the (raw) singleton object registered under the given name. + + + + Only checks already instantiated singletons; does not return an Object + for singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to access manually registered singletons + . Can also be used to access a singleton + defined by an object definition that already been created, in a raw fashion. + + + Name of the object to look for. + the registered singleton object, or null if none found + + + + + Check if this registry contains a singleton instance with the given name. + + + + Only checks already instantiated singletons; does not return true + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check whether a + singleton defined by an object definition has already been created. + + + To check whether an object factory contains an object definition with a given name, + use ListableBeanFactory's ContainsObjectDefinition. Calling both + ContainsObjectDefinition and ContainsSingleton answers + whether a specific object factory contains an own object with the given name. + + + Use IObjectFactory's ContainsObject for general checks whether the + factory knows about an object with a given name (whether manually registered singleton + instance or created by bean definition), also checking ancestor factories. + + + Name of the object to look for. + + true if this bean factory contains a singleton instance with the given name; otherwise, false. + + + + + + + + Gets the names of singleton objects registered in this registry. + + + + Only checks already instantiated singletons; does not return names + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + The list of names as String array (never null). + + + + + + + Gets the number of singleton beans registered in this registry. + + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + The number of singleton objects. + + + + + + + Ignore the given dependency type for autowiring. + + +

+ To be invoked during factory configuration. +

+

+ This will typically be used for dependencies that are resolved + in other ways, like + through . +

+
+ + The to be ignored. + +
+ + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a new + that will get applied to objects created by this factory. + + +

+ To be invoked during factory configuration. +

+
+ + The + to register. + +
+ + + Given an object name, create an alias. + + +

+ This is typically used to support names that are illegal within + XML ids (which are used for object names). +

+

+ Typically invoked during factory configuration, but can also be + used for runtime registration of aliases. Therefore, a factory + implementation should synchronize alias access. +

+
+ The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + +
+ + + Register the given custom + for all properties of the given . + + +

+ To be invoked during factory configuration. +

+
+ + The required of the property. + + + The to register. + +
+ + + Add a String resolver for embedded values such as annotation attributes. + + the String resolver to apply to embedded values + + + + Resolve the given embedded value, e.g. an annotation attribute. + + the value to resolve + the resolved value (may be the original value as-is) + + + + Set the parent of this object factory. + + +

+ Note that the parent shouldn't be changed: it should only be set outside + a constructor if it isn't available when an object of this class is + created. +

+
+
+ + + Returns the current number of registered + s. + + + The current number of registered + s. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + +

+ Typically invoked at the end of factory setup, if desired. +

+

+ As this is a startup method, it should destroy already created singletons if + it fails, to avoid dangling resources. In other words, after invocation + of that method, either all or no singletons at all should be + instantiated. +

+
+ + If one of the singleton objects could not be created. + +
+ + + Register a special dependency type with corresponding autowired value. + + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the BeanFactory interface itself. + + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + May be used to store custom value references in object definition properties. + + + Erich Eichinger + + + + + + the object factory holding the given object definition + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Denotes a special placeholder collection that may contain + s or + other placeholder objects that will need to be resolved. + + +

+ 'A special placeholder collection' means that the elements of this + collection can be placeholders for objects that will be resolved later by + a Spring.NET IoC container, i.e. the elements themselves will be + resolved at runtime by the enclosing IoC container. +

+

+ The core Spring.NET library already provides three implementations of this interface + straight out of the box; they are... +

+ + + + . + + + + + . + + + + + . + + + +

+ If you have a custom collection class (i.e. a class that either implements the + directly or derives from a class that does) + that you would like to expose as a special placeholder collection (i.e. one that can + have s as elements + that will be resolved at runtime by an appropriate Spring.NET IoC container, just + implement this interface. +

+
+ +

+ Lets say one has a Bag class (i.e. a collection that supports bag style semantics). +

+ + using System; + + using Spring.Objects.Factory.Support; + + namespace MyNamespace + { + public sealed class Bag : ICollection + { + // ICollection implementation elided for clarity... + + public void Add(object o) + { + // implementation elided for clarity... + } + } + + public class ManagedBag : Bag, IManagedCollection + { + public ICollection Resolve( + string objectName, RootObjectDefinition definition, + string propertyName, ManagedCollectionElementResolver resolver) + { + Bag newBag = new Bag(); + string elementName = propertyName + "[bag-element]"; + foreach(object element in this) + { + object resolvedElement = resolver(objectName, definition, elementName, element); + newBag.Add(resolvedElement); + } + return newBag; + } + } + } + +
+ Rick Evans +
+ + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Resolves a single element value of a managed collection. + + +

+ If the does not need to be resolved or + converted to an appropriate , the + will be returned as-is. +

+
+ + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + That element of a managed collection that may need to be resolved + to a concrete value. + + A fully resolved element. +
+ + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + implementation that + creates instances of the class. + + +

+ Typically used for retrieving shared + instances for common topics (such as the 'DAL', 'BLL', etc). The + + property determines the name of the + Common.Logging logger. +

+
+ Rick Evans + +
+ + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The name of the instance served up by + this factory. + + + If the supplied is + or contains only whitespace character(s). + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object + managed by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The name of the instance served up by + this factory. + + + The name of the instance served up by + this factory. + + + If the supplied to the setter is + or contains only whitespace character(s). + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Tag subclass used to hold a dictionary of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Interface representing an object whose value set can be merged with that of a parent object. + + Rob Harrop + Mark Pollack (.NET) + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. + + + + + Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. + + The approximate number of elements that the object can initially contain. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the keys of this managed dictionary. + + The unresolved name for the type of the keys of this managed dictionary. + + + + Gets or sets the unresolved name for the + of the values of this managed dictionary. + + The unresolved name for the type of the values of this managed dictionary. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a list of managed elements. + + Rod Johnson + Rick Evans (.NET) + + + + Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. + + + + + Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. + + The number of elements that the new list can initially store. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed list. + + The unresolved name for the type of the elements of this managed list. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag class which represent a Spring-managed instance that + supports merging of parent/child definitions. + + + + + Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + + + + Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + The initial number of entries that the can contain. is less than zero. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a set of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed set. + + The unresolved name for the type of the elements of this managed set. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + An that returns a value + that is the result of a or instance method invocation. + + +

+ Note that this class generally is expected to be used for accessing factory methods, + and as such defaults to operating in singleton mode. The first request to + + by the owning object factory will cause a method invocation, the return + value of which will be cached for all subsequent requests. The + property may be set to + , to cause this factory to invoke the target method each + time it is asked for an object. +

+

+ A target method may be specified by setting the + property to a string representing + the method name, with specifying + the that the method is defined on. + Alternatively, a target instance method may be specified, by setting the + property as the target object, and + the property as the name of the + method to call on that target object. Arguments for the method invocation may be + specified by setting the property. +

+

+ Another (esoteric) use case for this factory object is when one needs to call a method + that doesn't return any value (for example, a class method to + force some sort of initialization to happen)... this use case is not supported by + factory-methods, since a return value is needed to become the object. +

+

+ + This class depends on the + + method being called after all properties have been set, as per the + contract. If you are + using this class outside of a Spring.NET IoC container, you must call one of either + or + yourself to ready the object's internal + state, or you will get a nasty . + +

+
+ +

+ The following example uses an instance of this class to call a + factory method... +

+ + + + + + + + 1st + 2nd + and 3rd arguments + + + + +

+ The following example is similar to the preceding example; the only pertinent difference is the fact that + a number of different objects are passed as arguments, demonstrating that not only simple value types + are valid as elements of the argument list... +

+ + + + + + + + + + + 1st + + + + + + + http://www.springframework.net/ + + + + + +

+ Named parameters are also supported... this next example yields the same results as + the preceding example (that did not use named arguments). +

+ + + + + + + + + + 1st + and 3rd arguments + 2nd + + + + +

+ Similarly, the following example uses an instance of this class to call an instance method... +

+ + + + + + + + + +

+ The above example could also have been written using an anonymous inner object definition... if the + object on which the method is to be invoked is not going to be used outside of the factory object + definition, then this is the preferred idiom because it limits the scope of the object on which the + method is to be invoked to the surrounding factory object. +

+ + + + + + + + + + Colin Sampaleanu + Juergen Hoeller + Rick Evans (.NET) + Simon White (.NET) + + + + + + Specialisation of the class that tries + to convert the given arguments for the actual target method via an + appropriate implementation. + + Juergen Hoeller + Rick Evans + + + + + Helper class allowing one to declaratively specify a method call for later invocation. + + +

+ Typically not used directly but via its subclasses such as + . +

+

+ Usage: specify either the and + or the + and + properties respectively, and + (optionally) any arguments to the method. Then call the + method to prepare the invoker. + Once prepared, the invoker can be invoked any number of times. +

+
+ +

+ The following example uses the class to invoke the + ToString() method on the Foo class using a mixture of both named and unnamed + arguments. +

+ + public class Foo + { + public string ToString(string name, int age, string address) + { + return string.Format("{0}, {1} years old, {2}", name, age, address); + } + + public static void Main() + { + Foo foo = new Foo(); + MethodInvoker invoker = new MethodInvoker(); + invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; + invoker.AddNamedArgument("age", 29); + invoker.Prepare(); + // at this point, the arguments that will be passed to the method invocation + // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} + string details = (string) invoker.Invoke(); + Console.WriteLine (details); + // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' + } + } + +
+ Colin Sampaleanu + Juergen Hoeller + Simon White (.NET) +
+ + + The used to search for + the method to be invoked. + + + + + The value returned from the invocation of a method that returns void. + + + + + The method that will be invoked. + + + + + Creates a new instance of the class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set, or a matching argument could not be found + for a named argument (typically down to a typo). + + + If the specified method could not be found. + +
+ + + Searches for and returns the method that is to be invoked. + + + The return value of this method call will subsequently be returned from the + . + + The method that is to be invoked. + + If no method could be found. + + + If more than one method was found. + + + + + Adds the named argument to this instances mapping of argument names to argument values. + + + The name of an argument on the method that is to be invoked. + + + The value of the named argument on the method that is to be invoked. + + + + + Returns the prepared object that + will be invoked. + + +

+ A possible use case is to determine the return of the method. +

+
+ + The prepared object that + will be invoked. + +
+ + + Invoke the specified method. + + +

+ The invoker needs to have been prepared beforehand (via a call to the + method). +

+
+ + The object returned by the method invocation, or + if the method returns void. + + + If at least one of the arguments passed to this + was incompatible with the signature of the invoked method. + +
+ + + The target on which to call the target method. + + +

+ Only necessary when the target method is ; + else, a target object needs to be specified. +

+
+
+ + + The target object on which to call the target method. + + +

+ Only necessary when the target method is not ; + else, a target class is sufficient. +

+
+
+ + + The name of the method to be invoked. + + +

+ Refers to either a method + or a non- method, depending on + whether or not a target object has been set. +

+
+ +
+ + + Arguments for the method invocation. + + +

+ Ordering is significant... the order of the arguments in this + property must match the ordering of the various parameters on the target + method. There does however exist a small possibility for confusion when + the arguments in this property are supplied in addition to one or more named + arguments. In this case, each named argument is slotted into the index position + corresponding to the named argument... once once all named arguments have been + resolved, the arguments in this property are slotted into any remaining (empty) + slots in the method parameter list (see the example in the overview of the + class if this is not clear). +

+

+ If this property is not set, or the value passed to the setter invocation + is or a zero-length array, a method with no (un-named) arguments is assumed. +

+
+ +
+ + + The resolved arguments for the method invocation. + + + + This property is not set until the target method has been resolved via a call to the + method). It is a combination of the + named and plain vanilla arguments properties, and it is this object array that + will actually be passed to the invocation of the target method. + +

+ Setting the value of this property to results in basically clearing out any + previously prepared arguments... another call to the + method will then be required to prepare the arguments again (or the prepared arguments + can be set explicitly if so desired). +

+
+ + +
+ + + Named arguments for the method invocation. + + +

+ The keys of this dictionary are the () names of the + method arguments, and the () values are the actual + argument values themselves. +

+

+ If this property is not set, or the value passed to the setter invocation + is a reference, a method with no named arguments is assumed. +

+
+ +
+ + + Creates a new instance of the + class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set. + + + If the specified method could not be found. + +
+ + + Register the given custom + for all properties of the given . + + + The of property. + + + The to register. + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + +

+ Returns the return value of the method that is to be invoked. +

+

+ Will return the same value each time if the + + property value is . +

+
+ + An instance (possibly shared or independent) of the object managed by + this factory. + + +
+ + + Prepares this method invoker. + + + If all required properties are not set. + + + If the specified method could not be found. + + + + + + If a singleton should be created, or a new object on each request. + Defaults to . + + + + + Return the return value of the method + that this factory invokes, or if not + known in advance. + + +

+ If the return value of the method that this factory is to invoke is + , then the + will be returned (in accordance with the + contract that + treats a value as a configuration error). +

+
+ +
+ + + Holder for an with + name and aliases. + + +

+ Recognized by + + for inner object definitions. Registered by + , + which also uses it as general holder for a parsed object definition. +

+

+ Can also be used for programmatic registration of inner object + definitions. If you don't care about the functionality offered by the + interface and the like, + registering + or is good enough. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + + The name of the object definition. + + + + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + The name of the object. + + Any aliases for the supplied + + + + + Checks wether a givin candidate name has a defined object or alias + + name to check if exists + + + + + The held by this + instance. + + + + + The name of the object definition. + + + + + Any aliases for the object definition. + + +

+ Guaranteed to never return ; if the associated + + does not have any aliases associated with it, then an empty + array will be returned. +

+
+
+ + + Visitor class for traversing objects, in particular + the property values and constructor arguments contained in them resolving + object metadata values. + + + Used by and + to parse all string values contained in a ObjectDefinition, resolving any placeholders found. + + Mark Pollack + + + + Initializes a new instance of the class. + + The handler to be called for resolving variables contained in a string. + + + + Initializes a new instance of the class + for subclassing + + Subclasses should override the ResolveStringValue method + + + + Traverse the given ObjectDefinition object and the MutablePropertyValues + and ConstructorArgumentValues contained in them. + + The object definition to traverse. + + + + Visits the ObjectDefinition property ObjectTypeName, replacing string values using + the specified IVariableSource. + + The object definition. + + + + Visits the property values of the ObjectDefinition, replacing string values + using the specified IVariableSource. + + The object definition. + + + + Visits the indexed constructor argument values, replacing string values using the + specified IVariableSource. + + The indexed argument values. + + + + Visits the named constructor argument values, replacing string values using the + specified IVariableSource. + + The named argument values. + + + + Visits the generic constructor argument values, replacing string values using + the specified IVariableSource. + + The genreic argument values. + + + + Configures the constructor argument ValueHolder. + + The vconstructor alue holder. + + + + Resolves the given value taken from an object definition according to its type + + the value to resolve + the resolved value + + + + Visits the ManagedList property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet properties KeyTypeName and ValueTypeName and + calls for dictionary's value element. + + + + + Visits the elements of a NameValueCollection and calls + for value of each element. + + + + + calls the to resolve any variables contained in the raw string. + + the raw string value containing variable placeholders to be resolved + If no has been configured. + the resolved string, having variables being replaced, if any + + + + Returns a value that is an + that + returns an object from an + . + + +

+ The primary motivation of this class is to avoid having a client object + directly calling the + + method to get a prototype object out of an + , which would be a + violation of the inversion of control principle. With the use of this + class, the client object can be fed an + as a property + that directly returns one target prototype object. +

+

+ The object referred to by the value of the + + property does not have to be a prototype object, but there is little + to no point in using this class in conjunction with a singleton object. +

+
+ +

+ The following XML configuration snippet illustrates the use of this + class... +

+ + + + + + + + + + + + + + + + Colin Sampaleanu + Simon White (.NET) + + + + Returns an instance of the object factory. + + The object factory. + + + + Invoked by an + after it has set all supplied object properties. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Sets the name of the target object. + + + + + 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 of object created by this factory. + + + + + Interface defining a factory which can return an object instance + (possibly shared or independent) when invoked. + + + This interface is typically used to encapsulate a generic factory + which returns a new instance (prototype) on each invocation. + It is similar to the , but + implementations of the aforementioned interface are normally meant to be defined + as instances by the user in an , + while implementations of this class are normally meant to be fed as a property to + other objects; as such, the + method + has different exception handling behavior. + + Colin Sampaleanu + Simon White (.NET) + + + + Return an instance (possibly shared or independent) + of the object managed by this factory. + + + An instance of the object (should never be ). + + + + + Creates a new instance of the GenericObjectFactory class. + + + The enclosing + . + + + + + Returns the object created by the enclosed object factory. + + The created object. + + + + An implementation + that exposes an arbitrary target object under a different name. + + +

+ Usually, the target object will reside in a different object + definition file, using this + to link it in + and expose it under a different name. Effectively, this corresponds + to an alias for the target object. +

+ + For XML based object definition files, a <alias> + tag is available that effectively achieves the same. + +
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Initialize a new default instance + + + + + Initialize this instance with the predefined and . + + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The name of the target object. + + +

+ The target object may potentially be defined in a different object + definition file. +

+
+ The name of the target object. +
+ + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Callback that supplies the owning factory to an object instance. + + + The owning + (may not be ). The object can immediately + call methods on the factory. + + + In case of initialization errors. + + + + + + + Erich Eichinger + + + + Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. + + + + + Role hint indicating that a is a supporting + part of some larger configuration, typically an outer ComponentDefinition + SUPPORT objects are considered important enough to be aware + of when looking more closely at a particular ComponentDefinition, + but not when looking at the overall configuration of an application. + + + + + Role hint indicating that a is providing an + entirely background role and has no relevance to the end-user. This hint is + used when registering objects that are completely part of the internal workings + of a ComponentDefinition. + + + + + Implementation of that + resolves variable name against Java-style property file. + + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets the locations of the property files + to read properties from. + + + The locations of the property files + to read properties from. + + + + + Convinience property. Gets or sets a single location + to read properties from. + + + A location to read properties from. + + + + + Sets a value indicating whether to ignore resource locations that do not exist. This will call + the Exists property. + + + true if one should ignore missing resources; otherwise, false. + + + + + Overrides default values in one or more object definitions. + + +

+ Instances of this class override already existing values, and is + thus best suited to replacing defaults. If you need to replace + placeholder values, consider using the + + class instead. +

+

+ In contrast to the + + class, the original object definition can have default + values or no values at all for such object properties. If an overriding + configuration file does not have an entry for a certain object property, + the default object value is left as is. Also note that it is not + immediately obvious to discern which object definitions will be mutated by + one or more + s + simply by looking at the object configuration. +

+

+ Each line in a referenced configuration file is expected to take the + following form... +

+ + + +

+ The name.property key refers to the object name and the + property that is to be overridden; and the value is the overridding + value that will be inserted into the appropriate object definition's + named property. +

+

+ Please note that in the case of multiple + s + that define different values for the same object definition value, the + last overridden value will win (due to the fact that the values + supplied by previous + s + will be overridden). +

+
+ +

+ The following XML context definition defines an object that has a number + of properties, all of which have default values... +

+ + + + + + + + +

+ What follows is a .NET config file snippet for the above example (assuming + the need to override one of the default values)... +

+ + + + + + +
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + Allows for the configuration of individual object property values from + a .NET .config file. + + +

+ Useful for custom .NET .config files targetted at system administrators + that override object properties configured in the application context. +

+

+ Two concrete implementations are provided in the Spring.NET core library: + + + + + for <add key="placeholderKey" value="..."/> style + overriding (pushing values from a .NET .config file into object + definitions). + + + + + + for replacing "${...}" placeholders (pulling values from a .NET .config + file into object definitions). + + + +

+

+ Please refer to the API documentation for the concrete implementations + listed above for example usage. +

+
+ Juergen Hoeller + Simon White (.NET) + + +
+ + + The default configuration section name to use if none is explictly supplied. + + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Modify the application context's internal object factory after its + standard initialization. + + + The object factory used by the application context. + + + In case of errors. + + + + + + Loads properties from the configuration sections + specified in into . + + The instance to be filled with properties. + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Validates the supplied . + + +

+ Basically, if external locations are specified, ensure that either + one or a like number of config sections are also specified. +

+
+ + The to be validated. + +
+ + + Simply initializes the supplied + collection with this instances default + (if any). + + + The collection to be so initialized. + + + + + The policy for resolving conflicting property overrides from + several resources. + + +

+ When merging conflicting property overrides from several resources, + should append an override with the same key be appended to the + current value, or should the property override from the last resource + processed override previous values? +

+

+ The default value is ; i.e. a property + override from the last resource to be processed overrides previous + values. +

+
+ + if the property override from the last resource + processed overrides previous values. + +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + The default properties to be applied. + + +

+ These are to be considered defaults, to be overridden by values + loaded from other resources. +

+
+
+ + + The location of the .NET .config file that contains the property + overrides that are to be applied. + + + + + The locations of the .NET .config files containing the property + overrides that are to be applied. + + + + + The configuration sections to look for within the .config files. + + + + + + + Should a failure to find a .config file be ignored? + + +

+ is only appropriate if the .config file is + completely optional. The default is . +

+
+ + if a failure to find a .config file is to be + ignored. + +
+ + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Process the given key as 'name.property' entry. + + + The object factory containing the object definitions that are to be + processed. + + The key. + The value. + + If an error occurs. + + + If the property was not well formed (i.e. not in the format "name.property"). + + + + + implementation that + evaluates a property path on a given target object. + + +

+ The target object can be specified directly or via an object name (see + example below). +

+

+ Please note that the + is an implementation, and as such has + to comply with the contract of the + interface; more specifically, this means that the end result of the property lookup path + evaluation cannot be ( + implementations are not permitted to return ). If the resut of a + property lookup path evaluates to , an exception will be thrown. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + Juergen Hoeller + Rick Evans (.NET) + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The target object that the property path lookup is to be applied to. + + +

+ This would most likely be an inner object, but can of course be + any object reference. +

+
+ + The target object that the property path lookup is to be applied to. + + +
+ + + The (object) name of the target object that the property path lookup + is to be applied to. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this name prior to resolution. The implication of this is that + one cannot use the + class in conjunction with object names that start or end with whitespace. +

+
+ + The (object) name of the target object that the property path lookup + is to be applied to. + + +
+ + + The property (lookup) path to be applied to the target object. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this path prior to resolution. Whitespace is not a valid + identifier for property names (in part or whole) in CLS-based languages, + so this is a not unreasonable action. Please also note that whitespace + that is embedded within the property path will be left as-is (which may + or may not result in an error being thrown, depending on the context of + the whitespace). +

+
+ +

+ Examples of such property lookup paths can be seen below; note that + property lookup paths can be nested to an arbitrary level. +

+ + name.length + accountManager.account['the key'].name + accounts[0].name + +
+ + The property (lookup) path to be applied to the target object. + +
+ + + The 'expected' of the result from evaluating the + property path. + + +

+ This is not necessary for directly specified target objects, or + singleton target objects, where the can + be determined via reflection. Just specify this in case of a + prototype target, provided that you need matching by type (for + example, for autowiring). +

+

+ It is permissable to set the value of this property to + (which in any case is the default value). +

+
+ + The 'expected' of the result from evaluating the + property path. + +
+ + + 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? + + + + + + Set the name of the object in the object factory that created this object. + + +

+ The object name of this + + will be interpreted as "objectName.property" pattern, if neither the + + + have been supplied (set). +

+

+ This allows for concise object definitions with just an id or name. +

+
+ + The name of the object in the factory. + +
+ + + 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. + + + + + Resolves placeholder values in one or more object definitions. + + +

+ The default placeholder syntax follows the NAnt style: ${...}. + Instances of this class can be configured in the same way as any other + object in a Spring.NET container, and so custom placeholder prefix + and suffix values can be set via the + and properties. +

+ +

+ The following example XML context definition defines an object that has + a number of placeholders. The placeholders can easily be distinguished + by the presence of the ${} characters. +

+ + + + + + + + +

+ The associated XML configuration file for the above example containing the + values for the placeholders would contain a snippet such as .. +

+ + + + + + + + +

+ The preceding XML snippet listing the various property keys and their + associated values needs to be inserted into the .NET config file of + your application (or Web.config file for your ASP.NET web application, + as the case may be), like so... +

+ + + + + + + + +
+

+ + checks simple property values, lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. +

+ + + + + + + + +

+ In contrast to the + + class, this configurer only permits the replacement of explicit + placeholders in object definitions. Therefore, the original definition + cannot specify any default values for its object properties, and the + placeholder configuration file is expected to contain an entry for each + defined placeholder. That is, if an object definition contains a + placeholder ${foo}, there should be an associated + <add key="foo" value="..."/> entry in the + referenced placeholder configuration file. Default property values + can be defined via the inherited + + collection to overcome any perceived limitation of this feature. +

+

+ If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. If you want to resolve properties from multiple configuration + resources, simply specify multiple resources via the + + property. Finally, please note that you can also define multiple + + instances, each with their own custom placeholder syntax. +

+
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Initializes the new instance + + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Parse values recursively to be able to resolve cross-references between + placeholder values. + + + The map of constructor arguments / property values. + + The string to be resolved. + The placeholders that have already been visited + during the current resolution attempt (used to detect circular references + between placeholders). Only non-null if we're parsing a nested placeholder. + + If an error occurs. + + The resolved string. + + + + Resolve the given placeholder using the given name value collection, + performing an environment variables check according to the given mode. + + +

+ The default implementation delegates to + + before/afer the environment variable check. Subclasses can override + this for custom resolution strategies, including customized points + for the environment properties check. +

+
+ The placeholder to resolve + + The merged name value collection of this configurer. + + The environment variable mode. + + The resolved value or if none. + + +
+ + + Resolve the given placeholder using the given name value collection. + + +

+ This (the default) implementation simply looks up the value of the + supplied key. +

+

+ Subclasses can override this for customized placeholder-to-key + mappings or custom resolution strategies, possibly just using the + given name value collection as fallback. +

+
+ The placeholder to resolve. + + The merged name value collection of this configurer. + + The resolved value. +
+ + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Controls how environment variables will be used to + replace property placeholders. + + +

+ See the overview of the + + enumeration for the available options. +

+
+
+ + + Simple strategy interface for resolving a String value. + + + + + Resolve the given String value, for example parsing placeholders. + + the original String value + the resolved String value + + + + implementation that + retrieves a or non-static public property value. + + +

+ Typically used for retrieving public property values. +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + Template method that subclasses must override to construct the object + returned by this factory. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + The of the static property + to be retrieved. + + + + + Arguments for the property invocation. + + +

+ If this property is not set, or the value passed to the setter invocation + is a null or zero-length array, a property with no arguments is assumed. +

+
+
+ + + The name of the property the value of which is to be retrieved. + + +

+ Refers to either a property or a non-static property, + depending on a target object being set. +

+
+
+ + + The object instance on which the property is defined. + + + + + The on which the property is defined. + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + Implementation of that + resolves variable name against registry key. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, + strings are concatenated to a comma-separated list following + + + The variable value if able to resolve, null otherwise. + + + + + Gets or sets the registry key to obtain variable values from. + + + The registry key to obtain variable values from. + + + + + + implementation that allows for convenient registration of custom + IResource implementations. + + +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of IResources is required. +

+
+ Mark Pollack + + +
+ + + Registers custom IResource implementations. The supplied + is not used since IResourse implementations + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The IResource implementations, i.e. resource handlers, to register. + + +

+ The has the + contains the resource protocol name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + The value can be the fully qualified name of the IResource + implementation, a string, or + an actual of the IResource class + +

+
+
+ + + A convenience class to create a + given the resource base + name and assembly name. + + +

+ This is currently the preferred way of injecting resources into view + tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). + A GUI component (typically a Windows Form) is injected with + an instance, and can + then proceed to use the various GetXxx() methods on the + to retrieve images, + strings, custom resources, etc. +

+
+ Mark Pollack + + + +
+ + + Creates a . + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The root name of the resources. + + +

+ For example, the root name for the resource file named + "MyResource.en-US.resources" is "MyResource". +

+ + The namespace is also prefixed before the resource file name. + +
+
+ + + The string representation of the assembly that contains the resource. + + + + + The . + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to another object in this factory to be resolved at runtime. + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + +

+ This does not mark this object as being a reference to + another object in any parent factory. +

+
+ The name of the target object. +
+ + + Creates a new instance of the + + class. + + +

+ This variant constructor allows a client to specifiy whether or not + this object is a reference to another object in a parent factory. +

+
+ The name of the target object. + + Whether this object is an explicit reference to an object in a + parent factory. + +
+ + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Determines whether the specified RuntimeObjectReference is equal to the current RuntimeObjectReference. + + true if the specified RuntimeObjectReference is equal to the current RuntimeObjectReference; otherwise, false. + + + + Determines whether the specified System.Object is equal to the current RuntimeObjectReference. + + true if the specified RuntimeObjectReference is equal to the current RuntimeObjectReference; otherwise, false. + + + + Serves as a hash function for RuntimeObjectReference. + + A hash code for the currentRuntimeObjectReference. + + + + Return the target object name. + + + + + Is this is an explicit reference to an object in the parent + factory? + + + if this is an explicit reference to an + object in the parent factory. + + + + + Simple factory object for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target set. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + Configure all ISharedStateAware objects, delegating concrete handling to the list of . + + + + + Creates a new empty instance. + + + + + Creates a new preconfigured instance. + + + priority value affecting order of invocation of this processor. See interface. + + + + Iterates over configured list of s until + the first provider is found that
+ a) true == provider.CanProvideState( instance, name )
+ b) null != provider.GetSharedState( instance, name )
+
+
+ + + A NoOp for this processor + + + The new object instance. + + + The name of the object. + + + the original . + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Get/Set the (already ordererd!) list of instances. + + + If this list is not set, the containing object factory will automatically + be scanned for instances. + + + + + Implementation of that + resolves variable name against special folders (as defined by + enumeration). + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves specified special folder to its full path. + + + The name of the special folder to resolve. Should be one of the values + defined by the enumeration. + + + The folder path if able to resolve, null otherwise. + + + + + + implementation that allows for convenient registration of custom + type aliases. + + + Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of type aliases is required. +

+
+ Mark Pollack + + +
+ + + Registers any type aliases. The supplied + is not used since type aliases + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The type aliases to register. + + +

+ The has the + contains the alias name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + the value can be the fully qualified name of the type as a string or + an actual of the class that + being aliased. +

+
+
+ + + Holder for a typed value. + + +

+ Can be added to object definitions to explicitly specify + a target type for a value, + for example for collection + elements. +

+

+ This holder just stores the value and the target + . The actual conversion will be performed by + the surrounding object factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Bruno Baia (.NET) +
+ + + Creates a new instance of the + + class. + + + + + Initializes a new instance of the class. + + The value. + + + + Creates a new instance of the + + class. + + + The value that is to be converted. + + + The to convert to. + + + If the supplied is + . + + + + + Creates a new instance of the + + class. + + + The value that is to be converted. + + + The unresolved type to convert to. + + + If the supplied is a + or an empty string. + + + + + Determine the type to convert to, resolving it from a specified type name if necessary. + + The resolved type to convert to. + + + + The value that is to be converted. + + +

+ Obviously if the + + is the , no conversion + will actually be performed. +

+
+
+ + + The to convert to. + + + If the setter is supplied with a value. + + + + + The unresolved type to convert to. + + + If the setter is supplied with a value or an empty string. + + + + + Gets a value indicating whether this instance has target type. + + + true if this instance has target type; otherwise, false. + + + + + Provides methods for type-safe accessing s. + + Erich Eichinger + + + + Initialize a new instance of an + + The underlying to read values from. + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns an of 's type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + An of 's type that contains the value of the specified variable + or , if returns null. + + + + + Returns an of 's type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + An of 's type that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns or . + + A that contains the value of the specified variable + or , if returns null. + + + + + Resolves placeholder values in one or more object definitions + + + The placeholder syntax follows the NAnt style: ${...}. + Placeholders values are resolved against a list of + s. In case of multiple definitions + for the same property placeholder name, the first one in the + list is used. + Variable substitution is performed on simple property values, + lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. + + + + + + + + + + If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. + + Mark Pollack + + + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Create a new instance without any variable sources + + + + + Create a new instance and initialize with the given variable source + + + + + + Create a new instance and initialize with the given list of variable sources + + + + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Apply the property replacement using the specified s for all + object in the supplied + . + + + The + used by the application context. + + + If an error occured. + + + + + Sets the list of s that will be used to resolve placeholder names. + + A list of s. + + + + Sets that will be used to resolve placeholder names. + + A instance. + + + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + Initializes a new instance of the Location class. + + + + + + + Initializes a new instance of the Location class. + + + + + + Thrown when an + encounters an internal error, and its definitions are invalid. + + +

+ An example of a situation when this exception would be thrown is + in the case of an XML document containing object definitions being + malformed. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectDefinitionStoreException class. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Initializes a new instance of the class. + + + The description of the resource that the object definition came from + + The detail message (used as exception message as-is) + The root cause. (may be null + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The description of the resource associated with the object + + + + + The name of the object that trigger the exception. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Initializes a new instance of the ObjectDefinitionParsingException class. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The description of the resource that the object definition came from + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Initializes a new instance of the class. + + + The description of the resource that the object definition came from + + The detail message (used as exception message as-is) + The root cause. (may be null + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The description of the resource that the object definition came from + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Context that gets passed along an object definition reading process, + encapsulating all relevant configuraiton as well as state. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The resource. + + + + Gets the resource. + + The resource. + + + + Abstract superclass + that implements default object creation. + + +

+ Provides object creation, initialization and wiring, supporting + autowiring and constructor resolution. Handles runtime object + references, managed collections, and object destruction. +

+

+ The main template method to be implemented by subclasses is + , + used for autowiring by type. Note that this class does not implement object + definition registry capabilities + ( + does). +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Abstract superclass for + implementations. + + +

+ This class provides singleton / prototype determination, singleton caching, + object definition aliasing, + handling, and object definition merging for child object definitions. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Marker object to be temporarily registered in the singleton cache, + while instantiating an object (in order to be able to detect circular references). + + + + + Used as value in hashtable that keeps track of singleton names currently in the + process of being created. Would not be necessary if we created a case insensitive implementation of + ISet. + + + + + The instance for this class. + + + + + Cache of singleton objects created by s: FactoryObject name -> product + + + + + Disposable object instances: object name --> disposable instance + + + + + root object definitons: object name --> Root Object Definition + + + + + Whether to cache object metadata or rather reobtain it for every access + + + + + Names of object that have already been created at least once + + + + + Creates a new instance of the + class. + + +

+ This constructor implicitly creates an + + that treats the names of objects in this factory in a case-sensitive fashion. +

+

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + +
+ + + Creates a new instance of the + class. + + +

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

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + + + Any parent object factory; may be . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + In case of errors. + +
+ + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + In case of errors. + +
+ + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Create instance only - suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself, + nor throw an exception. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Does this object factory contain an object definition with the + supplied ? + + +

+ Does not consider any hierarchy this factory may participate in. + Invoked by + + when no cached singleton instance is found. +

+
+ + The name of the object to look for. + + + if this object factory contains an object + definition with the supplied . + +
+ + + Adds the supplied (object) to this factory's + singleton cache. + + +

+ To be called for eager registration of singletons, e.g. to be able to + resolve circular references. +

+ + If a singleton has already been registered under the same name as + the supplied , then the old singleton will + be replaced. + +
+ The name of the object. + The singleton object. + + If the argument is + or consists wholly of whitespace characters; or if the + is . + +
+ + + Return the object name, stripping out the factory dereference prefix if + necessary, and resolving aliases to canonical names. + + + The transformed name of the object. + + + + + Ensures, that the given name is prefixed with + if it incidentially already starts with this prefix. This avoids troubles when dereferencing + the object name during + + + + + Determines whether the specified name is defined as an alias as opposed + to the name of an actual object definition. + + The object name to check. + + true if the specified name is alias; otherwise, false. + + + + + Return a , + even by traversing parent if the parameter is a child definition. + + + The name of the object. + + + Are ancestors to be included in the merge? + + +

+ Will ask the parent object factory if not found in this instance. +

+
+ + A merged + with overridden properties. + +
+ + + Return a , + even by traversing parent if the parameter is a child definition. + + The name. + The od. + + A merged + with overridden properties. + + + + + Return a , + even by traversing parent if the parameter is a child definition. + + + A merged + with overridden properties. + + + + + Gets the merged local object definition. + + Name of the object. + + Merged RootBeanDefinition, traversing the parent bean definition + if the specified bean corresponds to a child bean definition. + + + + + Determines whether the metadata for the specified object name is eligible for caching. + + Name of the bean. + + true if [is object eligible for metadata caching] [the specified bean name]; otherwise, false. + + + + + Creates the root object definition. + + The template definition to base root definition on. + Root object definition. + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Gets the type for the given FactoryObject. + + The factory object instance to check. + the FactoryObject's object type + + + + Gets the object type for the given FactoryObject definition, as far as possible. + Only called if there is no singleton instance registered for the target object already. + + + The default implementation creates the FactoryObject via GetObject + to call its ObjectType property. Subclasses are encouraged to optimize + this, typically by just instantiating the FactoryObject but not populating it yet, + trying whether its ObjectType property already returns a type. + If no type found, a full FactoryObject creation as performed by this implementation + should be used as fallback. + + Name of the object. + The merged object definition for the object. + The type for the object if determinable, or null otherwise + + + + Predict the eventual object type (of the processed object instance) for the + specified object. + + + Does not need to handle FactoryObjects specifically, since it is only + supposed to operate on the raw object type. + This implementation is simplistic in that it is not able to + handle factory methods and InstantiationAwareBeanPostProcessors. + It only predicts the object type correctly for a standard object. + To be overridden in subclasses, applying more sophisticated type detection. + + Name of the object. + The merged object definition to determine the type for. May be null + The type of the object, or null if not predictable + + + + Get the object for the given object instance, either the object + instance itself or its created object in case of an + . + + The object instance. + + The name that may include the factory dereference prefix (=the requested name). + + + The canonical object name + + the merged object definition + + The singleton instance of the object. + + + + + Obtain an object to expose from the given IFactoryObject. + + The IFactoryObject instance. + Name of the object. + The merged object definition. + The object obtained from the IFactoryObject + If IFactoryObject object creation failed. + + + + Post-process the given object that has been obtained from the FactoryObject. + The resulting object will be exposed for object references. + + The default implementation simply returns the given object + as-is. Subclasses may override this, for example, to apply + post-processors. + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Convenience method to pull an + from this factory. + + + The name of the factory object to be retrieved. If this name is not a valid + name, it will be converted + into one. + + + The associated with the + supplied . + + + + + Is the supplied a factory object dereference? + + + + + Determines whether the type of the given object definition matches the + specified target type. + + Allows for lazy load of the actual object type, provided that the + type match can be determined otherwise. + The default implementation simply delegates to the standard + ResolveObjectType method. Subclasses may override this to use + a differnt strategy. + + Name of the object (for error handling purposes). + The merged object definition to determine the type for. + Type to match against (never null). + + true if object definition matches tye specified target type; otherwise, false. + + if we failed to load the type." + + + + Resolves the type of the object for the specified object definition resolving + an object type name to a Type (if necessary) and storing the resolved Type + in the object definition for further use. + + The merged object definition to dertermine the type for. + Name of the object (for error handling purposes). + + + + + Is the object (definition) with the supplied an + ? + + The name of the object to be checked. + + the object (definition) with the supplied + an ? + + + + + Remove the object identified by the supplied + from this factory's singleton cache. + + + The name of the object that is to be removed from the singleton + cache. + + + If the argument is or + consists wholly of whitespace characters. + + + + + Return the names of objects in the singleton cache that match the given + object type (including subclasses). + + + The class or interface to match, or for all object names. + + +

+ Will not consider s + as the type of their created objects is not known before instantiation. +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of objects in the singleton cache that match the given + object type (including subclasses), or an empty array if none. + +
+ + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical instance name. + Will ask the parent factory if the instance cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical instance name. + Will ask the parent factory if the instance cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines the of the object with the + supplied . + + +

+ More specifically, checks the of object that + would return. + For an , returns the + of object that the + creates. +

+

+ Please note that (prototype) objects created via a factory method or + objects are handled + slightly differently, in that we don't want to needlessly create + instances of such objects just to determine the + of object that they create. +

+
+ The name of the object to query. + + The of the object or + if not determinable. + +
+ + + Determines the of the object defined + by the supplied object . + + +

+ This, the default, implementation returns + to indicate that the type cannot be determined. Subclasses are + encouraged to try to determine the actual return + here, matching their strategy of resolving + factory methods in the + Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject + implementation. +

+
+ + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + +
+ + + Returns the names of the objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The names of the objects in the singleton cache. +
+ + + Returns the number of objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The number of objects in the singleton cache. +
+ + + Destroys the named singleton object. + + +

+ Delegates to + + if a corresponding singleton instance is found. +

+
+ + The name of the singleton object that is to be destroyed. + + +
+ + + Check the supplied merged object definition for any possible + validation errors. + + + The object definition to be checked for validation errors. + + + The name of the object associated with the supplied object definition. + + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + + In the case of object validation errors. + + + + + Parent object factory, for object inheritance support + + + + + Dependency types to ignore on dependency check and autowire, as Set of + Type objects: for example, string. Default is none. + + + + + ObjectPostProcessors to apply in CreateObject + + + + + String Resolver applied to Autowired value injections + + + + + Indicates whether any IInstantiationAwareBeanPostProcessors have been registered + + + + + Indicates whether any IDestructionAwareBeanPostProcessors have been registered + + + + + Set of registered singletons, containing the instance names in registration order + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + Determines whether the local object factory contains a instance of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Is this object a singleton? + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Does this object factory or one of its parent factories contain an object with the given name? + + + This method scans the object factory hierarchy starting with the current factory instance upwards. + Use if you want to explicitely check just this object factory instance. + + . + + + + Return the aliases for the given object name, if defined. + + . + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name, + optionally injecting dependencies. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + whether to inject dependencies or not. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + + Requireses the destruction. + + The instance to check. + The corresponding instance definition. + + Boolean indicating whether destruction is required. + + + + + Checks, if the passed instance is of the required type. + + the name of the object + the actual instance + the type contract the given instance must adhere. + the object instance passed in via (for more fluent usage) + + if is null or not assignable to . + + + + + Creates a singleton instance for the specified object name and definition. + + + The object name (will be used as the key in the singleton cache key). + + The object definition. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The created object instance. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + + + + Destroy all cached singletons in this factory. + + + + + Ignore the given dependency type for autowiring + + . + + + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a String resolver for embedded values such as annotation attributes. + + the String resolver to apply to embedded values + + + + Resolve the given embedded value, e.g. an annotation attribute. + + the value to resolve + the resolved value (may be the original value as-is) + + + + Add a new + that will get applied to objects created by this factory. + + + The + to register. + + . + + + + Given an object name, create an alias. + + . + + + + Register the given custom + for all properties of the given . + + . + + + + Register the given existing object as singleton in the object factory, + under the given object name. + + . + + + + Does this object factory contains a singleton instance with the + supplied ? + + + + + + Tries to find a cached object for the specified name. + + Teh object name to look for. + The cached object if found, otherwise. + + + + Registers the disposable object. + + Name of the instance. + The instance. + Add the given instance to the list of disposable beans in this registry. + Disposable beans usually correspond to registered singletons, + matching the instance name but potentially being a different instance + (for example, a DisposableBean adapter for a singleton that does not + naturally implement ). + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + Name of the object to check. + + true if is object name in use; otherwise, false. + + + + + Gets the singleton lock for a given object name. + + Name of the object. + lock object + + + + Returns, whether this factory treats object names case sensitive or not. + + + + + Gets the of + s + that will be applied to objects created by this factory. + + + + + Gets the set of classes that will be ignored for autowiring. + + +

+ The elements of this are + s. +

+
+
+ + + Returns, whether this object factory instance contains objects. + + + + + Returns, whether this object factory instance contains objects. + + + + + Gets the temporary object that is placed + into the singleton cache during object resolution. + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + The parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Returns the current number of registered + s. + + + The current number of registered + s. + + . + + + + Gets the names of singleton objects registered in this registry. + + The list of names as String array (never null). + + + Only checks already instantiated singletons; does not return names + for singleton instance definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + + + + + + + Gets the number of singleton beans registered in this registry. + + The number of singleton objects. + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + + + + + + + Makes a distinction between sort order and object identity. + This is important when used with , since most + implementations assume Order == Identity + + + + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + The used during the invocation and + searching for of methods. + + + + + The instance for this class. + + + + + Creates a new instance of the + + class. + + +

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

+
+ Flag specifying whether to make this object factory case sensitive or not. +
+ + + Creates a new instance of the + + class. + + +

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

+
+ Flag specifying whether to make this object factory case sensitive or not. + The parent object factory, or if none. +
+ + + Predict the eventual object type (of the processed object instance) for the + specified object. + + Name of the object. + The merged object definition to determine the type for. May be null + + The type of the object, or null if not predictable + + + + + Determines the of the object defined + by the supplied object . + + + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + + + Apply any + s. + + +

+ The returned instance may be a wrapper around the original. +

+
+ + The of the object that is to be + instantiated. + + + The name of the object that is to be instantiated. + + + An instance to use in place of the original instance. + + + In case of errors. + +
+ + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + + + + Apply the given property values, resolving any runtime references + to other objects in this object factory. + + + The object name passed for better exception information. + + + The definition of the named object. + + + The wrapping the target object. + + + The new property values. + + +

+ Must use deep copy, so that we don't permanently modify this property. +

+
+
+ + + Create the value resolver strategy to use for resolving raw property values + + + + + Return an array of object-type property names that are unsatisfied. + + +

+ These are probably unsatisfied references to other objects in the + factory. Does not include simple properties like primitives or + s. +

+
+ + An array of object-type property names that are unsatisfied. + + + The definition of the named object. + + + The wrapping the target object. + +
+ + + Destroy all cached singletons in this factory. + + +

+ To be called on shutdown of a factory. +

+
+
+ + + Populate the object instance in the given + with the property values from the + object definition. + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Wires up any exposed events in the object instance in the given + with any event handler + values from the . + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Fills in any missing property values with references to + other objects in this factory if autowire is set to + . + + + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + + + + + Defines "autowire by type" (object properties by type) behavior. + + +

+ This is like PicoContainer default, in which there must be exactly one object + of the property type in the object factory. This makes object factories simple + to configure for small namespaces, but doesn't work as well as standard Spring + behavior for bigger applications. +

+
+ + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + +
+ + + Ignore the given dependency type for autowiring + + + This will typically be used by application contexts to register + dependencies that are resolved in other ways, like IOjbectFactory through + IObjectFactoryAware or IApplicationContext through IApplicationContextAware. + By default, IObjectFactoryAware and IObjectName interfaces are ignored. + For further types to ignore, invoke this method for each type. + + . + + + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Add the created, but yet unpopulated singleton to the singleton cache + to be able to resolve circular references + + the name of the object to add to the cache. + the definition used to create and populated the object. + the raw object instance. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Remove the specified singleton from the singleton cache that has + been added before by a call to + + the name of the object to remove from the cache. + the definition used to create and populated the object. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Creates an instance from the passed in + using constructor + + The name of the object to create - used for error messages. + The describing the object to be created. + optional arguments to pass to the constructor + An wrapping the already instantiated object + + + + Instantiates the given object using its default constructor + + Name of the object. + The definition. + IObjectWrapper for the new instance + + + + Determines candidate constructors to use for the given object, checking all registered + + + Raw type of the object. + Name of the object. + the candidate constructors, or null if none specified + In case of errors + + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + "autowire constructor" (with constructor arguments by type) behaviour. + + The name of the object to autowire by type. + The object definition to update through autowiring. + The chosen candidate constructors. + The argument values passed in programmatically via the GetObject method, + or null if none (-> use constructor argument values from object definition) + + An for the new instance. + + + + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: in this mode, a Spring.NET + object factory is able to host components that expect constructor-based + dependency resolution. + + + + + + Perform a dependency check that all properties exposed have been set, if desired. + + +

+ Dependency checks can be objects (collaborating objects), simple (primitives + and ), or all (both). +

+
+ + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + The property values to be checked. + + + If all of the checked dependencies were not satisfied. + +
+ + + Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding + ignored dependency types. + + The object wrapper the object was created with. + The filtered PropertyInfos + + + + Determine whether the given bean property is excluded from dependency checks. + This implementation excludes properties whose type matches an ignored dependency type + or which are defined by an ignored dependency interface. + + + + the of the object property + whether the object property is excluded + + + + Give an object a chance to react now all its properties are set, + and a chance to know about its owning object factory (this object). + + +

+ This means checking whether the object implements + and / or + , and invoking the + necessary callback(s) if it does. +

+

+ Custom init methods are resolved in a case-insensitive manner. +

+
+ + The new object instance we may need to initialise. + + + The name the object has in the factory. Used for logging output. + + + The definition of the target object instance. + +
+ + + Invoke the specified custom destroy method on the given object. + + +

+ This implementation invokes a no-arg method if found, else checking + for a method with a single boolean argument (passing in "true", + assuming a "force" parameter), else logging an error. +

+

+ Can be overridden in subclasses for custom resolution of destroy + methods with arguments. +

+

+ Custom destroy methods are resolved in a case-insensitive manner. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself. + Should not throw any exceptions. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Destroys all of the objects registered as dependant on the + object (definition) identified by the supplied . + + + The name of the root object (definition) that is itself being destroyed. + + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + Find object instances that match the required . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The of the objects to look up. + + + An of object names and object + instances that match the required , or + if none are found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + Called by DestroyObject, to be able to destroy depending objects first. + + + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Configures object instance by injecting dependencies, satisfying Spring lifecycle + interfaces and applying object post-processors. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + A wrapped object instance that is to be so configured. + + + + + + Applies the PostProcessAfterInitialization callback of all + registered IObjectPostProcessors, giving them a chance to post-process + the object obtained from IFactoryObjects (for example, to auto-proxy them) + + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + If the supplied is not one of the + or + + values. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Cache of filtered PropertyInfos: object Type -> PropertyInfo array + + + + + Dependency interfaces to ignore on dependency check and autowire, as Set of + Class objects. By default, only the IObjectFactoryAware and IObjectNameAware + interfaces are ignored. + + + + + The + implementation to be used to instantiate managed objects. + + + + + An + implementation that provides some convenience support for + derived classes. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Permits the (re)implementation of an arbitrary method on a Spring.NET + IoC container managed object. + + +

+ Encapsulates the notion of the Method-Injection form of Dependency + Injection. +

+

+ Methods that are dependency injected with implementations of this + interface may be (but need not be) , in which + case the container will create a concrete subclass of the + class prior to instantiation. +

+

+ Do not use this mechanism as a means of AOP. See the reference + manual for examples of appropriate usages of this interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Reimplement the supplied . + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the (re)implementation of the method call. + + + + + Creates a new instance of the + + class. + + +

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

+
+ + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + +
+ + + Is ; derived classes must supply an implementation. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + The result of the object lookup. + + + + Helper method for subclasses to retrieve the appropriate + for the + supplied . + + + The to use to retrieve + the appropriate + . + + + The appropriate + . + + + + + Helper method for subclasses to lookup an object from an enclosing + IoC container. + + + The name of the object that is to be looked up. + + + The named object. + + + + + Abstract base class for object definition readers. + + +

+ Provides common properties like the object registry to work on. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Simple interface for object definition readers. + + Juergen Hoeller + Rick Evans + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The against which any class names + will be resolved into instances. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + Gets the resource loader to use for resource locations. + + There is also a method + available for loading object definitions from a resource location. This is + a convenience to avoid explicit ResourceLoader handling. + The resource loader. + + + + The instance for this class (and derived classes). + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + The against which any class names + will be resolved into instances. + + +

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

+
+
+ + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + + The against which any class names + will be resolved into instances. + + + + + Gets or sets the resource loader to use for resource locations. + + The resource loader. + + + + Qualifier for resolving autowire candidates. A bean definition that + includes one or more such qualifiers enables fine-grained matching + against annotations on a field or parameter to be autowired. + + + + + Construct a qualifier to match against an annotation of the + given type. + + type the annotation type + + + + Construct a qualifier to match against an annotation of the + given type name. +

The type name may match the fully-qualified class name of + the annotation or the short class name (without the package).

+
+ the name of the annotation type +
+ + + Construct a qualifier to match against an annotation of the + given type whose value attribute also matches + the specified value. + + the annotation type + the annotation value to match + + + + Construct a qualifier to match against an annotation of the + given type name whose value attribute also matches + the specified value. +

The type name may match the fully-qualified class name of + the annotation or the short class name (without the package).

+
+ the name of the annotation type + the annotation value to match +
+ + + Retrieve the type name. This value will be the same as the + type name provided to the constructor or the fully-qualified + class name if a Class instance was provided to the constructor. + + + + + Utility class that contains various methods useful for the implementation of + autowire-capable object factories. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the AutowireUtils class. + + +

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

+
+
+ + + Gets those s + that are applicable for autowiring the supplied . + + + The + (definition) that is being autowired by constructor. + + + The absolute minimum number of arguments that any returned constructor + must have. If this parameter is equal to zero (0), then all constructors + are valid (regardless of their argument count), including any default + constructor. + + + Those s + that are applicable for autowiring the supplied . + + + + + Determine a weight that represents the class hierarchy difference between types and + arguments. + + +

+ A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase + the result - all direct matches means weight zero (0). A match between the argument type + and a MyInteger instance argument would increase the weight by + 1, due to the superclass () being one (1) steps up in the + class hierarchy being the last one that still matches the required type. +

+

+ Therefore, with an argument of type , a + constructor taking a argument would be + preferred to a constructor taking an argument + which would be preferred to a constructor taking an + argument which would in turn be preferred + to a constructor taking an argument. +

+

+ All argument weights get accumulated. +

+
+ + The argument s to match. + + The arguments to match. + The accumulated weight for all arguments. +
+ + + Algorithm that judges the match between the declared parameter types of a candidate method + and a specific list of arguments that this method is supposed to be invoked with. + + + Determines a weight that represents the class hierarchy difference between types and + arguments. The following a an example based on the Java class hierarchy for Integer. + A direct match, i.e. type Integer -> arg of class Integer, does not increase + the result - all direct matches means weight 0. A match between type Object and arg of + class Integer would increase the weight by 2, due to the superclass 2 steps up in the + hierarchy (i.e. Object) being the last one that still matches the required type Object. + Type Number and class Integer would increase the weight by 1 accordingly, due to the + superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. + Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a + constructor (Number) which would in turn be preferred to a constructor (Object). + All argument weights get accumulated. + + The param types. + The args. + + + + + Determines whether the given object property is excluded from dependency checks. + + The PropertyInfo of the object property. + + true if is excluded from dependency check; otherwise, false. + + + + + Sorts the supplied , preferring + public constructors and "greedy" ones (that have lots of arguments). + + +

+ The result will contain public constructors first, with a decreasing number + of arguments, then non-public constructors, again with a decreasing number + of arguments. +

+
+ + The array to be sorted. + +
+ + + Determines whether the setter property is defined in any of the given interfaces. + + The PropertyInfo of the object property + The ISet of interfaces. + + true if setter property is defined in interface; otherwise, false. + + + + + Creates the autowire candidate resolver. + + A SimpleAutowireCandidateResolver + + + + Returns the list of that are not satisfied by . + + the filtered list. Is never null + + + + Object definition for definitions that inherit settings from their + parent (object definition). + + +

+ Will use the + of the parent object definition if none is specified, but can also + override it. In the latter case, the child's + + must be compatible with the parent, i.e. accept the parent's property values + and constructor argument values (if any). +

+

+ A will + inherit all of the , + , and + from it's parent + object definition, with the option to add new values. If the + , + , + and / or + + properties are specified, they will override the corresponding parent settings. +

+

+ The remaining settings will always be taken from the child definition: + , + , + , + , + and + +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + + class. + + + The name of the parent object. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The class of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The of the object to + instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Validate this object definition. + + +

+ A common cause of validation failures is a missing value for the + + property; by + their very nature require that the + + be set. +

+
+ + In the case of a validation failure. + +
+ + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Helper class for resolving constructors and factory methods. + Performs constructor resolution through argument matching. + + + Operates on a and an . + Used by . + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for the given factory + and instantiation strategy. + + The object factory to work with. + The object factory as IAutowireCapableObjectFactory. + The instantiation strategy for creating objects. + the resolver to resolve property value placeholders if any + + + + "autowire constructor" (with constructor arguments by type) behavior. + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: In this mode, a Spring + object factory is able to host components that expect constructor-based + dependency resolution. + + Name of the object. + The merged object definition for the object. + The chosen chosen candidate constructors (or null if none). + The explicit argument values passed in programmatically via the getBean method, + or null if none (-> use constructor argument values from object definition) + An IObjectWrapper for the new instance + + + + Gets the constructor instantiation info given the object definition. + + Name of the object. + The RootObjectDefinition + The explicitly chosen ctors. + The explicit chose ctor args. + A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or + one based on type matching. + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + Create an array of arguments to invoke a constructor or static factory method, + given the resolved constructor arguments values. + + When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain + information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using + exceptions for flow control as in the original implementation. + + + + Resolves the + of the supplied . + + The name of the object that is being resolved by this factory. + The rod. + The wrapper. + The cargs. + Where the resolved constructor arguments will be placed. + + The minimum number of arguments that any constructor for the supplied + must have. + + +

+ 'Resolve' can be taken to mean that all of the s + constructor arguments is resolved into a concrete object that can be plugged + into one of the s constructors. Runtime object + references to other objects in this (or a parent) factory are resolved, + type conversion is performed, etc. +

+

+ These resolved values are plugged into the supplied + object, because we wouldn't want to touch + the s constructor arguments in case it (or any of + its constructor arguments) is a prototype object definition. +

+

+ This method is also used for handling invocations of static factory methods. +

+
+
+ + + Returns an array of all of those + methods exposed on the + that match the supplied criteria. + + + Methods that have this name (can be in the form of a regular expression). + + + Methods that have exactly this many arguments. + + + Methods that are static / instance. + + + The on which the methods (if any) are to be found. + + + An array of all of those + methods exposed on the + that match the supplied criteria. + + + + + Concrete implementation of the + and + + interfaces. + + +

+ This class is a full-fledged object factory based on object definitions + that is usable straight out of the box. +

+

+ Can be used as an object factory in and of itself, or as a superclass + for custom object factory implementations. Note that readers for + specific object definition formats are typically implemented separately + rather than as object factory subclasses. +

+

+ For an alternative implementation of the + interface, + have a look at the + + class, which manages existing object instances rather than creating new + ones based on object definitions. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + + + + Creates a new instance of the + class. + + The parent object factory. + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory. + + + + Find object instances that match the . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The type of the objects to look up. + + + An of object names and object + instances that match the , or + if none is found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + + +

+ Called by the + + so that dependant objects are able to be disposed of first. +

+
+ + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + +
+ + + Check whether the specified object matches the supplied . + + The name of the object to check. + + The to check for. + + + if the object matches the supplied , + or if the supplied is . + + + + + The instance for this class. + + + + + The mapping of object definition objects, keyed by object name. + + + + + List of object definition names, in registration order. + + + + + Resolver to use for checking if an object definition is an autowire candidate + + + + + IDictionary from dependency type to corresponding autowired value + + + + + Check if this registry contains a object definition with the given + name. + + + The name of the object to look for. + + + if this object factory contains an object + definition with the given name. + + + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + + If one of the singleton objects could not be created. + + + + + + Register a special dependency type with corresponding autowired value. + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the IObjectFactory interface itself. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. Respects any Parent-Child hierarchy the factory is participating in. + + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Check whether the specified bean would need to be eagerly initialized + in order to determine its type. + + a factory-bean reference that the bean definition defines a factory method for + whether eager initialization is necessary + + + + Check whether the given bean is defined as a . + + the name of the object + the corresponding object definition + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Determine the primary autowire candidate in the given set of beans. + + a Map of candidate names and candidate instances + that match the required type + the target dependency to match against + the name of the primary candidate, or null if none found + + + + Return whether the object definition for the given object name has been + marked as a primary object. + + the name of the bean + the corresponding bean instance + whether the given bean qualifies as primary + + + + Determine whether the given candidate name matches the bean name or the aliases + stored in this bean definition. + + + + + Raises the no such object definition exception for an unresolvable dependency + + The type. + The dependency description. + The descriptor. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + Determine whether the specified object definition qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + + Name of the object definition to check. + The merged object definiton to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + + + + Should object definitions registered under the same name as an + existing object definition be allowed? + + +

+ If , then the new object definition will + replace (override) the existing object definition. If + , an exception will be thrown when + an attempt is made to register an object definition under the same + name as an already existing object definition. +

+

+ The default is . +

+
+ + is the registration of an object definition + under the same name as an existing object definition is allowed. + +
+ + + Get or set custom autowire candidate resolver for this IObjectFactory to use + when deciding whether a bean definition should be considered as a + candidate for autowiring. Never null + + + + + Return the number of objects defined in this registry. + + + The number of objects defined in this registry. + + + + + + Default implementation of the + + interface. + + +

+ Does not support per + loading. +

+
+ Aleksandar Seovic +
+ + + Central interface for factories that can create + + instances. + + +

+ Allows for replaceable object definition factories using the Strategy + pattern. +

+
+ Aleksandar Seovic +
+ + + Factory style method for getting concrete + + instances. + + + The FullName of the of the defined object. + + The name of the parent object definition (if any). + + The against which any class names + will be resolved into instances. It can be null to register the + object class just by name. + + + An + + instance. + + + + + Factory style method for getting concrete + + instances. + + /// If no parent is specified, a RootObjectDefinition is created, otherwise a + ChildObjectDefinition. + The of the defined object. + The name of the parent object definition (if any). + The against which any class names + will be resolved into instances. + + An + + instance. + + + + + Default implementation of the interface, deleagting to + 's GenerateObjectName. + + Note that this implementation is only able to handle + subclasses such as + and + + Juergen Hoeller + Mark Pollack (.NET) + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + Convenience implementation of the interface that + delegates to an arbitrary object + method to perform the object construction. + + + + Because this implementation requires a delegate + passed to its ctor, its only possible to configure this object and register + it with the via code rather than via XML. + + + + + + + Initializes a new instance of the class. + + The builder delegate. + if set to true [is singleton]. + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + If this method is being called in the context of an enclosing IoC container and + returns , the IoC container will consider this factory + object as not being fully initialized and throw a corresponding (and most + probably fatal) exception. + + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + 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? + + + + + An + implementation that delegates to an + that is + obtained as the result of a lookup in an associated IoC container. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by delegating to + another + looked up in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the delegated call to the looked up + . + + + + + The various modes of dependency checking. + + Rick Evans (.NET) + + + + DO not do any dependency checking. + + + + + Check object references. + + + + + Just check primitive (string, int, etc) values. + + + + + Check everything. + + + + + Create a new DisposableBeanAdapter for the given bean. + + The bean instance (never null). + Name of the bean. + The merged bean definition. + the List of BeanPostProcessors (potentially IDestructionAwareBeanPostProcessor), if any. + + + + Search for all s in the List. + + The List to search. + the filtered List of IDestructionAwareObjectPostProcessors. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Invokes the custom destroy method. + + The custom destroy method. + Invoke the specified custom destroy method on the given bean. + This implementation invokes a no-arg method if found, else checking + for a method with a single boolean argument (passing in "true", + assuming a "force" parameter), else logging an error. + + + + Responsible for creating instances corresponding to a + . + + Rod Johnson + Rick Evans (.NET) + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Represents an override of a method that looks up an object in the same IoC context. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Represents the override of a method on a managed object by the IoC container. + + +

+ Note that the override mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + +

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

+
+ + The name of the method that is to be overridden. + + + If the supplied is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + +

+ By 'match' one means does this particular + + instance apply to the supplied ? +

+

+ This allows for argument list checking as well as method name checking. +

+
+ The method to be checked. + + if this override matches the supplied + . + +
+ + + The name of the method that is to be overridden. + + + + + Is the method that is ot be injected + () + to be considered as overloaded? + + +

+ If (the default), then argument type matching + will be performed (because one would not want to override the wrong + method). +

+

+ Setting the value of this property to can be used + to optimize runtime performance (ever so slightly). +

+
+
+ + + Creates a new instance of the + class. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ + The name of the method that is to be overridden. + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + If either of the supplied arguments is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + + + An + implementation that simply returns the result of a lookup in an + associated IoC container. + + +

+ This class is Spring.NET's implementation of Dependency Lookup via + Method Injection. +

+

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by returning the + result of an object lookup in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the object lookup. + + + + + An + implementation that supports method injection. + + +

+ Classes that want to take advantage of method injection must meet some + stringent criteria. Every method that is to be method injected + must be defined as either or + . An + will be thrown if these criteria are not met. +

+
+ Rick Evans +
+ + + Simple object instantiation strategy for use in + implementations. + + +

+ Does not support method injection, although it provides hooks for subclasses + to override to add method injection support, for example by overriding methods. +

+
+ Rod Johnson + Rick Evans (.NET) + +
+ + + The shared instance for this class (and derived classes). + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type does not have a zero-arg constructor. + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use a no-arg constructor. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be a + or zero length string if we're autowiring an object that + doesn't belong to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + +
+ + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use the supplied + and attendant . +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + +
+ + + The name of the dynamic assembly that holds dynamically created code + + + + + A cache of generated instances, keyed on + the object name for which the was generated. + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ This method dynamically generates a subclass that supports method + injection for the supplied . It then + instantiates an new instance of said type using the constructor + identified by the supplied , + passing the supplied to said + constructor. It then manually injects (generic) method replacement + and method lookup instances (of + ) into + the new instance: those methods that are 'method-injected' will + then delegate to the approriate + + instance to effect the actual method injection. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The parameter s to use to find the + appropriate constructor to invoke. + + + The aguments that are to be passed to the appropriate constructor + when the object is being instantiated. + + + A new instance of the defined by the + supplied . + +
+ + + A factory that generates subclasses of those + classes that have been configured for the Method-Injection form of + Dependency Injection. + + +

+ This class is designed as for one-shot usage; i.e. it must + be used to generate exactly one method injected subclass and + then discarded (it maintains state in instance fields). +

+
+
+ + + The name of the generated + property (for method replacement). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + The name of the generated + property (for method lookup). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + Creates a new instance of the + class. + + + The in which + the generated is to be defined. + + + The object definition that is the target of the method injection. + + + If either of the supplied arguments is . + + + + + Builds a suitable for Method-Injection. + + + A suitable for Method-Injection. + + + + + Defines overrides for those methods that are configured with an appropriate + . + + + The overarching that is defining + the generated . + + + + + Override the supplied with the logic + encapsulated by the + + defined by the supplied . + + + The builder for the subclass that is being generated. + + + The method on the superclass that is to be overridden. + + + The field defining the + + that the overridden method will delegate to to do the 'actual' + method injection logic. + + + + + Generates the MSIL for actually returning a return value if the + supplied is not + . + + + The definition of the return value; if , it + means that no return value is to required (a void + return type). + + + The to emit + the MSIL to. + + + + + Generates the MSIL for a return value if the supplied + returns a value. + + + The method to be checked. + + + The to emit + the MSIL to. + + + The return value, or if the method does not + return a value (has a void return type). + + + + + Pushes (sets up) the arguments for a call to the + + method of an appropriate + . + + + The parameters to the original method (will be bundled + up into a generic object[] and passed as the third + argument to the + + invocation. + + + The to emit + the MSIL to. + + + + + Simply generates the IL for a write only property for the + . + + + The in which the property is defined. + + + The name of the (to be) generated property. + + + The (instance) field that the property is to 'set'. + + + + + A collection (with set semantics) of method overrides, determining which, if any, + methods on a managed object the Spring.NET IoC container will override at runtime. + + Rod Johnson + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ Deep copy constructoe. +

+
+ + The instance supplying initial overrides for this new instance. + +
+ + + Copy all given method overrides into this object. + + + The overrides to be copied into this object. + + + + + Adds the supplied to the overrides contained + within this instance. + + + The to be + added. + + + + + Adds the supplied to the overloaded method names + contained within this instance. + + + The overloaded method name to be added. + + + + + Returns true if the supplied is present within + the overloaded method names contained within this instance. + + + The overloaded method name to be checked. + + + True if the supplied is present within + the overloaded method names contained within this instance. + + + + + Return the override for the given method, if any. + + + The method to check for overrides for. + + + the override for the given method, if any. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + The collection of method overrides. + + + + + Returns true if this instance contains no overrides. + + + + + Programmatic means of constructing a using the builder pattern. Intended primarily + for use when implementing custom namespace parsers. + + Set methods are used instead of properties, so that chaining of methods can be used to create + 'one-liner'definitions that set multiple properties at one. + Rod Johnson + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class, private + to force use of factory methods. + + + + + Creates a new used to construct a . + + + + + Creates a new used to construct a . + + the of the object that the definition is being created for + + + + Creates a new used to construct a . + + the name of the of the object that the definition is being created for + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + The type name of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Name of the object type. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a child object definition.. + + The object definition factory. + Name of the parent object. + + + + + Adds the property value under the given name. + + The name. + The value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the specified object name under the property specified. + + The name. + Name of the object. + The current ObjectDefinitionBuilder. + + + + Adds an index constructor arg value. The current index is tracked internally and all addtions are + at the present point + + The constructor arg value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the named object as a constructor argument. + + Name of the object. + + + + + Sets the name of the factory method to use for this definition. + + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the factory object to use for this definition. + + The factory object. + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets whether or not this definition describes a singleton object. + + if set to true [singleton]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects or not this definition is abstract. + + if set to true [flag]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects for this definition should be lazily initialized or not. + + if set to true [lazy]. + The current ObjectDefinitionBuilder. + + + + Sets the autowire mode for this definition. + + The autowire mode. + The current ObjectDefinitionBuilder. + + + + Sets the autowire candidate value for this definition. + + The autowire candidate value + + + + + Sets the primary value for this definition. + + If object is primary + + + + + Sets the dependency check mode for this definition. + + The dependency check. + The current ObjectDefinitionBuilder. + + + + Sets the name of the destroy method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the init method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the resource description for this definition. + + The resource description. + The current ObjectDefinitionBuilder. + + + + Adds the specified object name to the list of objects that this definition depends on. + + Name of the object. + The current ObjectDefinitionBuilder. + + + + Gets the current object definition in its raw (unvalidated) form. + + The raw object definition. + + + + Validate and gets the object definition. + + The object definition. + + + + Utility methods that are useful for + + implementations. + + Juergen Hoeller + Rick Evans (.NET) + + + + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Registers the supplied with the + supplied . + + +

+ This is a convenience method that registers the + + of the supplied under the + + property value of said . If the + supplied has any + , + then those aliases will also be registered with the supplied + . +

+
+ + The object definition holder containing the + that + is to be registered. + + + The registry that the supplied + is to be registered with. + + + If either of the supplied arguments is . + + + If the could not be registered + with the . + +
+ + + Generates an object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied . + + The + that requires a generated name. + The + + that the supplied is to be + registered with (needed so that the uniqueness of any generated + name can be guaranteed). + if set to true if the given object + definition will be registed as an inner object or as a top level objener objects + verses top level objects. + + An object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied and + never . + + + If either of the or + arguments is . + + + If a unique name cannot be generated. + + + + + Generates the name of the object for a top-level object definition unique within the given object factory. + + The object definition to generate an object name for. + The registry to check for existing names. + The generated object name + if no unique name can be generated for the given + object definition + + + + Factory method for getting concrete + instances. + + + The name of the event handler method. This may be straight text, a regular + expression, , or empty. + + + The name of the event being wired. This too may be straight text, a regular + expression, , or empty. + + + A concrete + instance. + + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Thrown when the validation of an object definition failed. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + The detail message. + + + + Creates a new instance of the + + class. + + + The detail message. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Helper class for use in object factory implementations, + resolving values contained in object definition objects + into the actual values applied to the target object instance. + + + Used by . + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The object factory. + + + + Given a property value, return a value, resolving any references to other + objects in the factory if necessary. + + +

+ The value could be : + + +

+ An , + which leads to the creation of a corresponding new object instance. + Singleton flags and names of such "inner objects" are always ignored: inner objects + are anonymous prototypes. +

+ + +

+ A , which must + be resolved. +

+
+ +

+ An . This is a + special placeholder collection that may contain + s or + collections that will need to be resolved. +

+
+ +

+ An ordinary object or , in which case it's left alone. +

+
+ +

+
+ + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + +
+ + + TODO + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Resolve the target type of the passed . + + The who's target type is to be resolved + The resolved target type, if any. otherwise. + + + + Resolves an inner object definition. + + + The name of the object that surrounds this inner object definition. + + + The name of the inner object definition... note: this is a synthetic + name assigned by the factory (since it makes no sense for inner object + definitions to have names). + + + The name of the property the value of which is being resolved. + + + The definition of the inner object that is to be resolved. + + + if the owner of the property is a singleton. + + + The resolved object as defined by the inner object definition. + + + + + Checks the given bean name whether it is unique. If not already unique, + a counter is added, increasing the counter until the name is unique. + + Original Name of the inner object. + The Adapted name for the inner object + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + The possible object scope values. + + Aleksandar Seovic + + + + + + + + + Application scope. + + + + + Session scope. + + + + + Request scope. + + + + + + + + + + Default scope (currently + ). + + + + + + Object definition reader for a simple properties format. + + + Provides object definition registration methods for + and + instances. Typically applied to a + . + + Rod Johnson + Juergen Hoeller + Simon White (.NET) + + + + Value of a T/F attribute that represents true. + Anything else represents false. Case seNsItive. + + + + + Separator between object name and property name. + + + + + Prefix for the class property of a root object definition. + + + + + Special string added to distinguish if the object will be + a singleton. + + +

+ Default is true. +

+
+ +

+ owner.(singleton)=true +

+
+
+ + + Special string added to distinguish if the object will be + lazily initialised. + + +

+ Default is false. +

+
+ +

+ owner.(lazy-init)=true +

+
+
+ + + Reserved "property" to indicate the parent of a child object definition. + + + + + Property suffix for references to other objects in the current + : e.g. + owner.dog(ref)=fido. + + +

+ Whether this is a reference to a singleton or a prototype + will depend on the definition of the target object. +

+
+
+ + + Prefix before values referencing other objects. + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the specified properties file. + + + The resource descriptor for the properties file. + + + The match or filter for object definition names, e.g. 'objects.' + + in case of loading or parsing errors + the number of object definitions found + + + + Register object definitions contained in a + , using all property keys (i.e. + not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Similar syntax as for an . + This method is useful to enable standard .NET internationalization support. +

+
+ + The containing object definitions. + + + The match or filter for object definition names, e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions registered. +
+ + + Register object definitions contained in an + , using all property keys + (i.e. not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Registers object definitions contained in an + using all property keys ( i.e. not filtering by prefix ) + + The containing + object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Get all property values, given a prefix (which will be stripped) + and add the object they define to the factory with the given name + + The name of the object to define. + + The containing string pairs. + + The prefix of each entry, which will be stripped. + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + + + + Name of default parent object + + + + + Gets or sets object definition factory to use. + + + + + A implementation to use that checks + the object definitions only (no attributes) + + Mark Fisher + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Determine whether a default value is suggested for the given dependency. + + The descriptor for the target method parameter or field + The value suggested (typically an expression String), + or null if none found + + + + + Static factory that permits the registration of existing singleton instances. + + +

+ Does not have support for prototype objects, aliases, and post startup object + configuration. +

+

+ Serves as a simple example implementation of the + interface, that manages existing object instances as opposed to creating new ones + based on object definitions. +

+

+ The + method is not supported by this class; this class deals exclusively with + existing singleton instances, thus the methods mentioned previously make little sense in this context. +

+
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Map from object name to object instance. + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + This method is not supported by . + + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + is not currently supported. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + True if an object with the given name is defined. + + + + Is this object a singleton? + + +

+ That is, will + or + always return the same object? +

+
+ The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Determine the type of the object with the given name. + + +

+ More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. +

+
+ The name of the object to query. + + The of the object or if + not determinable. + +
+ + + Determines whether the object with the given name matches the specified type. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Not supported. + + The name of the object. + + The registered + . + + + Always, as object definitions are not supported by this + implementation. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Will not consider s, + as the type of their created objects is not known before instantiation. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Since this implementation of the + + interface does not support the notion of ptototype objects, the + parameter is ignored. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). Ignored. + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Tests whether this object factory contains an object definition for the + specified object name. + + The object name to query. + + True if an object defintion is contained within this object factory. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Add a new singleton object. + + + The name to be associated with the object name. + + The singleton object. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + This feature is not currently supported. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Defines a method to release allocated unmanaged resources. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + + + + Abstract implementation providing + a number of convenience methods and a + template method + that subclasses must override to provide the actual parsing logic. + + + Use this implementation when you want + to parse some arbitrarily complex XML into one or more + ObjectDefinitions. If you just want to parse some + XML into a single IObjectDefinition, you may wish to consider + the simpler convenience extensions of this class, namely + and + + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Constant for the ID 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. +

+
+
+ + + Resolves the ID for the supplied . + + + When using generation, a name is generated automatically. + Otherwise, the ID is extracted from the "id" attribute, potentially with a + fallback to a generated id. + + The element that the object definition has been built from. + The object definition to be registered. + The the object encapsulating the current state of the parsing process; + provides access to a + the resolved id + + if no unique name could be generated for the given object definition + + + + + Registers the supplied with the supplied + . + + Subclasses can override this method to control whether or not the supplied + is actually even registered, or to + register even more objects. + + The default implementation registers the supplied + with the supplied only if the IsNested + parameter is false, because one typically does not want inner objects + to be registered as top level objects. + + + + The object definition to be registered. + The registry that the bean is to be registered with. + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + Gets a value indicating whether an ID should be generated instead of read + from the passed in XmlElement. + + Note that this flag is about always generating an ID; the parser + won't even check for an "id" attribute in this case. + + true if should generate id; otherwise, false. + + + + Gets a value indicating whether an ID should be generated instead if the + passed in XmlElement does not specify an "id" attribute explicitly. + + Disabled by default; subclasses can override this to enable ID generation + as fallback: The parser will first check for an "id" attribute in this case, + only falling back to a generated ID if no value was specified. + + true if should generate id if no value was specified; otherwise, false. + + + + + Convenient base class for when there exists a one-to-one mapping + between attribute names on the element that is to be parsed and + the property names on the Type being configured. + + + + + Mark Pollack + + + + Base Type for those implementations that + need to parse and define just a single IObjectDefinition. + + + Extend this parser Type when you want to create a single object definition + from an arbitrarily complex XML element. You may wish to consider extending + the when you want to create a + single Object definition from a relatively simple custom XML element. + The resulting ObjectDefinition will be automatically registered + with the ObjectDefinitionRegistry. Your job simply is to parse the + custom XML element into a single ObjectDefinition + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + + Determine the name for the parent of the currently parsed object, + in case of the current object being defined as a child object. + The default implementation returns null + indicating a root object definition. + + + the name of the parent object for the currently parsed object. + + + + Gets the type of the object corresponding to the supplied XmlElement. + + Note that, for application classes, it is generally preferable to override + GetObjectTypeName instad, in order to avoid a direct + dependence on the object implementation class. The ObjectDefinitionParser + and its IXmlObjectDefinitionParser (namespace parser) can be used within an + IDE add-in then, even if the application classses are not available in the add-ins + AppDomain. + + The element. + The Type of the class that is being defined via parsing the supplied + Element. + + + + Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. + + The element. + The type name of the object that is being defined via parsing the supplied + XmlElement. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation delegates to the DoParse version without + ParameterContext argument. + The element. + The parser context. + The builder used to define the IObjectDefinition. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation does nothing. + The element. + The builder used to define the IObjectDefinition. + + + + Default implementation of the interface. + Resolves namespace URIs to implementation types based on mappings. + + Erich Eichinger + + + + + + Used by to locate + implementations for a particular namespace URI. + + TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now + Erich Eichinger + + + + + + + Lookup a for the given namespace URI. + + the namespace URI + the located namespace handler or null + + + + Resolve the namespace URI and return the corresponding + implementation. + + the namespace URI to get the matching parser for. + the matching parser or null + + + + XML resource reader. + + +

+ Navigates through an XML resource and invokes parsers registered + with the . +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + SPI for parsing an XML document that contains Spring object definitions. + Used by for actually parsing a DOM + document. + + Instantiated per document to parse: Implementations can hold state in + instance variables during the execution of the RegisterObjectDefinitions + method, for example global settings that are defined for all object definitions + in the document. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the DefaultObjectDefinitionDocumentReader class. + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + Parses object definitions starting at the given + using the passed . + + The root element to start parsing from. + The instance to use. + + in case an error happens during parsing and registering object definitions + + + + + Process an alias element. + + + + + Process the object element + + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + + If the resource could not be imported. + + + + + Parses the given alias element, registering the alias with the registry. + + The alias element. + The registry. + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The helper. + + + + + + Allow the XML to be extensible by processing any custom element types last, + after we finished processing the objct definitions. This method is a natural + extension point for any other custom post-processing of the XML. + + The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. + + + The root. + + + + Allow the XML to be extensible by processing any custom element types first, + before we start to process the object definitions. + + This method is a natural + extension point for any other custom pre-processing of the XML. +

The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. +

+
+ The root element of the XML document. +
+ + + Creates an instance for the given and element. + + the to create the + the root to start reading from + a new instance + + + + Gets the reader context. + + The reader context. + + + + Simple class that holds the defaults specified at the <objects> + level in a standard Spring XML object definition document: + default-lazy-init, default-autowire, etc. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Gets or sets the autowire setting for the document that's currently parsed. + + The autowire. + + + + Gets or sets the dependency-check setting for the document that's currently parsed + + The dependency check. + + + + Gets or sets the lazy-init flag for the document that's currently parsed. + + The lazy init. + + + + Gets or sets the merge setting for the document that's currently parsed. + + The merge. + + + + Get or sets the init method for the document that's currently parsed. + + The init method + + + + Gets or sets the destroy method for the document that's currently parsed. + + The destroy methood + + + + Gets or sets autowire candidates for the document that's currently parsed + + The Autowire Candidates + + + + Attribute that should be used to specify the default namespace + and schema location for a custom namespace parser. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Gets or sets the default namespace for the configuration parser. + + + The default namespace for the configuration parser. + + + + + Gets or sets the default schema location for the configuration parser. + + + The default schema location for the configuration parser. + + + If the property is set, the will always resolve to an assembly-resource + and the set will be interpreted relative to this assembly. + + + + + Gets or sets a type from the assembly containing the schema + + + If this property is set, the will always resolve to an assembly-resource + and the will be interpreted relative to this assembly. + + + + + Provides a resolution mechanism for configuration parsers. + + +

+ The uses this registry + class to find the parser handling a specific namespace. +

+
+ Aleksandar Seovic +
+ + + Name of the .Net config section that contains definitions + for custom config parsers. + + + + + Creates a new instance of the NamespaceParserRegistry class. + + + + + Reset the list of registered parsers to "factory"-setting + + use for unit tests only + + + + Registers the type for wellknown namespaces + + true if the parser could be registered, false otherwise + + + + Constructs a "assembly://..." qualified schemaLocation url using the given type + to obtain the assembly name. + + + + + Returns a parser for the given namespace. + + + The namespace for which to lookup the parser implementation. + + + A parser for a given , or + if no parser was found. + + + + + Returns a schema collection containing validation schemas for all registered parsers. + + + A schema collection containing validation schemas for all registered parsers. + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The of the parser that will be activated + when an element in its default namespace is encountered. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The of the parser that will be activated + when the attendant is + encountered. + + + The namespace with which to associate instance of the parser. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If the is not a + that implements the + interface. + + + If is . + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The parser instance. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The namespace with which to associate instance of the parser. + + + The parser instance. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If is , or if + is not specified and parser class + does not have default value defined using . + + + + + Register a schema as well-known + + + + + + + Returns default values for the parser namespace and schema location as + defined by the . + + + A type of the parser. + + + A instance containing + default values for the parser namsepace and schema location + + + + + Resolves xml entities by using the infrastructure. + + + + + Adapts the interface to . + Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 + + + + + Constants defining the structure and values associated with the + Spring.NET XML object definition format. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Value of a boolean attribute that represents + . + + +

+ Anything else represents . +

+
+
+ + + Value of a boolean attribute that represents + . + + + + + Signifies that a default value is to be applied. + + + + + Defines an external XML object definition resource. + + + + + Specifies the relative path to an external XML object definition + resource. + + + + + Defines an alias for an object definition. + + + + + Specifies the alias of an object definition. + + + + + Specifies the default lazy initialization mode. + + + + + Specifies the default dependency checking mode. + + + + + Specifies the default autowire mode. + + + + + Specifies the default autowire candidates. + + + + + Specifies the default collection merge mode. + + + + + Specifies the default init method. + + + + + Specifies the default destroy method. + + + + + Defines a single named object. + + + + + Element containing informative text describing the purpose of the + enclosing element. + + +

+ Always optional. +

+

+ Used primarily for user documentation of XML object definition + documents. +

+
+
+ + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but it is recommended + that the names of one's objects are + specified explicitly. +

+
+
+ + + The name or alias of the parent object definition that a child + object definition inherits from. + + + + + Objects can be identified by an id, to enable reference checking. + + +

+ There are constraints on a valid XML id: if you want to reference + your object in .NET code using a name that's illegal as an XML id, + use the optional "name" attribute + (). + If neither given, the objects name is + used as id. +

+
+
+ + + Can be used to create one or more aliases illegal in an id. + + +

+ Multiple aliases can be separated by any number of spaces, + semicolons, or commas + (). +

+

+ Always optional. +

+
+
+ + + Is this object a "singleton" (one shared instance, which will + be returned by all calls to + with the id), or a + "prototype" (independent instance resulting from each call to + ). + + +

+ Singletons are most commonly used, and are ideal for multi-threaded + service objects. +

+
+ +
+ + + Controls object scope. Only applicable to ASP.NET web applications. + + +

+ Scope can be defined as either application, session or request. It + defines when "singleton" instances are initialized, but has no + effect on prototype definitions. +

+
+
+ + + The names of the objects that this object depends on being + initialized. + + +

+ The object factory will guarantee that these objects + get initialized before this object definition. +

+ + Dependencies are normally expressed through object properties or + constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Optional attribute for the name of the custom initialization method + to invoke after setting object properties. + + +

+ The method must have no arguments. +

+
+
+ + + Optional attribute for the name of the custom destroy method to + invoke on object factory shutdown. + + +

+ Valid destroy methods have either of the following signatures... + + void MethodName() + void MethodName(bool force) + +

+ + Only invoked on singleton objects! + +
+
+ + + A constructor argument : the constructor-arg tag can have an + optional type attribute, to specify the exact type of the + constructor argument + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 single + argument constructors that can both be converted from a + . +

+
+
+ + + The constructor-arg tag can have an optional index attribute, + to specify the exact index in the constructor argument list. + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 arguments of + the same type. +

+
+
+ + + The constructor-arg tag can have an optional named parameter + attribute, to specify a named parameter in the constructor + argument list. + + + + + Is this object "abstract", i.e. not meant to be instantiated itself + but rather just serving as parent for concrete child object + definitions? + + +

+ Default is . Specify + to tell the object factory to not try to instantiate that + particular object in any case. +

+
+
+ + + A property definition : object definitions can have zero or more + properties. + + +

+ Spring.NET supports primitives, references to other objects in the + same or related factories, lists, dictionaries, and name value + collections. +

+
+
+ + + A qualifier definition used for fine grained autowiring + + + + + A reference to another managed object or static + . + + + + + ID refs must specify a name of the target object. + + + + + A reference to the name of another managed object in the same + context. + + + + + A reference to the name of another managed object in the same + context. + + +

+ Local references, using the "local" attribute, have to use object + ids; they can be checked by a parser, thus should be preferred for + references within the same object factory XML file. +

+
+
+ + + Alternative to type attribute for factory-method usage. + + +

+ If this is specified, no type attribute should be used. This should + be set to the name of an object in the current or ancestor + factories that contains the relevant factory method. This allows + the factory itself to be configured using Dependency Injection, and + an instance (rather than static) method to be used. +

+
+
+ + + Optional attribute specifying the name of a factory method to use + to create this object. + + +

+ Use constructor-arg elements to specify arguments to the factory + method, if it takes arguments. Autowiring does not apply to + factory methods. +

+

+ If the "type" attribute is present, the factory method will be a + static method on the type specified by the "type" attribute on + this object definition. Often this will be the same type as that + of the constructed object - for example, when the factory method + is used as an alternative to a constructor. However, it may be on + a different type. In that case, the created object will *not* be + of the type specified in the "type" attribute. This is analogous + to behaviour. +

+

+ If the "factory-object" attribute is present, the "type" attribute + is not used, and the factory method will be an instance method on + the object returned from a + + call with the specified object name. The factory object may be + defined as a singleton or a prototype. +

+

+ The factory method can have any number of arguments. Use indexed + constructor-arg elements in conjunction with the factory-method + attribute. +

+

+ Setter Injection can be used in conjunction with a factory method. + Method Injection cannot, as the factory method returns an instance, + which will be used when the container creates the object. +

+
+
+ + + A list can contain multiple inner object, ref, collection, or + value elements. + + +

+ Lists are untyped, pending generics support, although references + will be strongly typed. +

+

+ A list can also map to an array type. The necessary conversion is + automatically performed by the + . +

+
+
+ + + A set can contain multiple inner object, ref, collection, or value + elements. + + +

+ Sets are untyped, pending generics support, although references + will be strongly typed. +

+
+
+ + + A Spring.NET map is a mapping from a string key to object (a .NET + ). + + +

+ Dictionaries may be empty. +

+
+
+ + + A lookup key (for a dictionary or name / value collection). + + + + + A lookup key (for a dictionary or name / value collection). + + + + + Contains a string representation of a value. + + +

+ This is used by name-value, ctor argument, and property elements. +

+
+
+ + + Contains delimiters that should be used to split delimited string values. + + +

+ This is used by name-value element. +

+
+
+ + + A reference to another objects. + + +

+ Used as a convenience shortcut on property and constructor-arg + elements to refer to other objects. +

+
+
+ + + Contains a string representation of an expression. + + +

+ This is used by ctor argument and property elements. +

+
+
+ + + A map entry can be an inner object, ref, collection, or value. + + +

+ The name of the property is given by the "key" attribute. +

+
+
+ + + Contains a string representation of a property value. + + +

+ The property may be a string, or may be converted to the + required using the + + machinery. This makes it possible for application developers to + write custom + implementations that can convert strings to objects. +

+ + This is recommended for simple objects only. Configure more complex + objects by setting properties to references to other objects. + +
+
+ + + Contains a string representation of an expression. + + + + + Denotes value. + + +

+ Necessary because an empty "value" tag will resolve to an empty + , which will not be resolved to + value unless a special + does so. +

+
+
+ + + 'name-values' elements differ from dictionary elements in that + values must be strings. + + +

+ May be empty. +

+
+
+ + + Element content is the string value of the property. + + +

+ The "key" attribute is the name of the property. +

+
+
+ + + The lazy initialization mode for an individual object definition. + + + + + The dependency checking mode for an individual object definition. + + + + + Defines a subscription to one or more events published by one or + more event sources. + + + + + The name of an event handling method. + + +

+ Defaults to On${event}. + Note : this default will probably change before the first 1.0 + release. +

+
+
+ + + The name of an event. + + + + + The autowiring mode for an individual object definition. + + + + + The autowiring mode for an individual object definition. + + + + + Attribute element to farther deifne the qualifier of an object + + + + + The primary object for autwired injection + + + + + Shortcut alternative to specifying a key element in a + dictionary entry element with <ref object="..."/>. + + + + + Shortcut alternative to specifying a value element in a + dictionary entry element with <ref object="..."/>. + + + + + Specify if the collection values should be merged with the parent. + + + + + Defined meta attributes to be used for Autowire objects + + + + + The string of characters that delimit object names. + + + + + A lookup method causes the IoC container to override a given method and return + the object with the name given in the attendant object attribute. + + +

+ This is a form of Method Injection. +

+

+ It's particularly useful as an alternative to implementing the + interface, + in order to be able to make + + calls for non-singleton instances at runtime. In this case, Method Injection + is a less invasive alternative. +

+
+
+ + + The name of a lookup method. This method must take no arguments. + + + + + The name of the object in the IoC container that the lookup method + must resolve to. + + +

+ Often this object will be a prototype, in which case the lookup method + will return a distinct instance on every invocation. This is useful + for single-threaded objects. +

+
+
+ + + A replaced method causes the IoC container to override a given method + with an (arbitrary) implementation at runtime. + + +

+ This (again) is a form of Method Injection. +

+
+
+ + + Name of the method whose implementation should be replaced by the + IoC container. + + +

+ If this method is not overloaded, there's no need to use arg-type + subelements. +

+

+ If this method is overloaded, arg-type subelements must be + used for all override definitions for the method. +

+
+
+ + + The object name of an implementation of the + interface. + + +

+ This may be a singleton or prototype. If it's a prototype, a new + instance will be used for each method replacement. Singleton usage + is the norm. +

+
+
+ + + Subelement of replaced-method identifying an argument for a + replaced method in the event of method overloading. + + + + + + Specification of the of an overloaded method + argument as a . + + +

+ For convenience, this may be a substring of the FQN. E.g. all the following would match + : +

+

+ + + System.String + + + string + + + str + + +

+
+ +
+ + + Check everything. + + + + + Just check primitive (string, int, etc) values. + + + + + Check object references. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Stateful class used to parse XML object definitions. + + Not all parsing code has been refactored into this class. See + BeanDefinitionParserDelegate in Java for how this class should evolve. + Rob Harrop + Juergen Hoeller + Rod Johnson + Mark Pollack (.NET) + + + + The shared instance for this class (and derived classes). + + + + + Initializes a new instance of the class. + + The reader context. + + + + Initializes a new instance of the class. + + The reader context. + The root element of the definition document to parse + + + + Initialize the default lazy-init, dependency check, and autowire settings. + + The root element + + + + Determines whether the Spring object namespace is equal to the the specified namespace URI. + + The namespace URI. + + true if is the default Spring namespace; otherwise, false. + + + + + Decorates the object definition if required. + + The element. + The holder. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The containing object definition if is a nested element. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Create an instance from the given and . + + + This method may be used as a last resort to post-process an object definition before it gets added to the registry. + + + + + Allows deriving classes to post process the name and aliases for the current element. By default + does nothing and returns the unmodified . + + + The list passed in may be modified by an implementation of this method to reflect special needs. + + the object name obtained by the default algorithm from 'id' and 'name' attributes so far. + the object aliases obtained by the default algorithm from 'name' attribute so far. + the currently processed element. + the containing object definition, may be null + the new object name to be used. + + + + Validate that the specified object name and aliases have not been used already. + + + + + Parses an element in a custom namespace. + + + the parsed object definition or null if not supported by the corresponding parser. + + + + Parses an element in a custom namespace. + + + if a nested element, the containing object definition + the parsed object definition or null if not supported by the corresponding parser. + + + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Determines whether the string represents a 'true' boolean value. + + The value. + + true if is 'true' string value; otherwise, false. + + + + + Convenience method to create a builder for a root object definition. + + Name of the object type. + A builder for a root object definition. + + + + Convenience method to create a builder for a root object definition. + + Type of the object. + a builder for a root object definition + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Report a parser error. + + + + + Gets the defaults definition object, or null if the + default have not yet been initialized. + + The defaults. + + + + Gets the reader context. + + The reader context. + + + + Creates an instance + populated with the object definitions supplied in the configuration + section. + + +

+ Applications will typically want to use an + , and instantiate it + via the use of the + class (which is similar in functionality to this class). This class is + provided for those times when only an + is required. +

+ Creates an instance of the class XmlObjectFactory +
+ +

+ +

+
+ Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a + instance populated with the object definitions supplied in the + configuration section. + + + The configuration settings in a corresponding parent configuration + section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + A instance + populated with the object definitions supplied in the configuration + section. + + + + + Default implementation of the + interface. + + +

+ Parses object definitions according to the standard Spring.NET schema. +

+

+ This schema is typically located at + http://www.springframework.net/xsd/spring-objects.xsd. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The namespace URI for the standard Spring.NET object definition schema. + + + + + The shared instance for this class (and derived classes). + + + + + Invoked by after construction but before any + elements have been parsed. + + This is a NoOp + + + + 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. +

+
+
+ + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + The parser context. + + If the resource could not be imported. + + + + Parses an event listener definition. + + The name associated with the object that the event handler is being defined on. + + The events being populated. + + The element containing the event listener definition. + + + The namespace-aware parser. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The parser context. + if set to true if we are processing an inner + object definition. + + The object (definition) wrapped within an + + instance. + + +

+ Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. +

+

+ If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. +

+
+
+ + + Calculates an id for an object definition. + + +

+ Called when an object definition has not been explicitly defined + with an id. +

+
+ + The element containing the object definition. + + + The list of names defined for the object; may be + or even empty. + + + A calculated object definition id. + +
+ + + Parse a standard object definition. + + The element containing the object definition. + The id of the object definition. + parsing state holder + The object (definition). + + + + Parse method override argument subelements of the given object element. + + + + + Parse element and add parsed element to + + + + + Parse element and add parsed element to + + + + + Parse constructor argument subelements of the given object element. + + + + + Parse event handler subelements of the given object element. + + + + + Parse the meta upplied meta attributes if the given object element + + + + + Parse qualifier sub-elements of the given bean element. + + + + + Parse a qualifier element. + + + + + Parse property value subelements of the given object element. + + + The name of the object (definition) associated with the property element (s) + + + The element containing the top level object definition. + + + The namespace-aware parser. + + + The property (s) associated with the object (definition). + + + + + Parse a constructor-arg element. + + + The name of the object (definition) associated with the ctor arg. + + + The list of constructor args associated with the object (definition). + + + The name of the element containing the ctor arg definition. + + + The namespace-aware parser. + + + + + Parse a property element. + + + The name of the object (definition) associated with the property. + + + The list of properties associated with the object (definition). + + + The name of the element containing the property definition. + + + The namespace-aware parser. + + + + + Get the value of a property element (may be a list). + +

+ Please note that even though this method is named GetPropertyValue, + it is called by both the property and constructor argument element + handlers. +

+
+ The property element. + + The name of the object associated with the property. + + + The namespace-aware parser. + +
+ + + Parse a value, ref or collection subelement of a property element. + + + Subelement of property element; we don't know which yet. + + + The name of the object (definition) associated with the top level property. + + + The namespace-aware parser. + + + + + Gets a list definition. + + + The element describing the list definition. + + + The name of the object (definition) associated with the list definition. + + + The namespace-aware parser. + + The list definition. + + + + Gets a set definition. + + + The element describing the set definition. + + + The name of the object (definition) associated with the set definition. + + + The namespace-aware parser. + + The set definition. + + + + Gets a dictionary definition. + + The element describing the dictionary definition. + The name of the object (definition) associated with the dictionary definition. + The namespace-aware parser. + The dictionary definition. + + + + Selects sub-elements with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child nodes to look for. + + + The child s of the supplied + with the supplied + . + +
+ + + Selects a single sub-element with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child node to look for. + + + The first child of the supplied + with the supplied + . + +
+ + + Gets a name value collection mapping definition. + + + The element describing the name value collection mapping definition. + + + The name of the object (definition) associated with the + name value collection mapping definition. + + the context carrying parsing state information + The name value collection definition. + + + + Returns the text of the supplied , + or the empty string value if said is empty. + + +

+ If the supplied is , + then the empty string value will be returned. +

+
+
+ + + Strips the dependency check value out of the supplied string. + + +

+ If the supplied is an invalid dependency + checking mode, the invalid value will be logged and this method will + return the value. + No exception will be raised. +

+
+ + The string containing the dependency check value. + + The dependency check value. + +
+ + + Strips the autowiring mode out of the supplied string. + + +

+ If the supplied is an invalid autowiring mode, + the invalid value will be logged and this method will return the + value. No exception will be raised. +

+
+ + The string containing the autowiring mode definition. + + The autowiring mode. + +
+ + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Context that gets passed along an object definition parsing process, encapsulating + all relevant configuraiton as well as state. + + + + + Initializes a new instance of the class. + + The parser helper. + + + + Initializes a new instance of the class. + + The parser helper. + The containing object definition. + + + + Gets the reader context. + + The reader context. + + + + Gets the registry. + + The registry. + + + + Gets the parser helper. + + The parser helper. + + + + Gets the containing object definition. + + The containing object definition. + + + + Gets a value indicating whether this instance is nested. + + true if this instance is nested; otherwise, false. + + + + Gets a value indicating whether this instance is default lazy init. + + + true if this instance is default lazy init; otherwise, false. + + + + + Represents the replacement of a method on a managed object by the IoC + container. + + +

+ Note that this mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the method that is to be overridden. + + + The object name of the + instance in the surrounding IoC container. + + + If either of the supplied arguments is or + contains only whitespace character(s). + + + + + Add a fragment of a instance's + such as 'Exception or System.Excep to identify an argument + for a dependency injected method. + + + A (sub) string of a instance's . + + + If the supplied is or + contains only whitespace character(s). + + + + + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The object name of the + instance in the surrounding IoC container. + + + + + Object definition reader for Spring's default XML object definition format. + + +

+ Typically applied to a + instance. +

+

+ This class registers each object definition with the given object factory superclass, + and relies on the latter's implementation of the + interface. +

+

+ It supports singletons, prototypes, and references to either of these kinds of object. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + the to use for creating new s + + + + Load object definitions from the supplied XML . + + + The XML resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Actually load object definitions from the specified XML file. + + The input stream to read from. + The resource for the XML data. + + + + + Validation callback for a validating XML reader. + + The source of the event. + Any data pertinent to the event. + + + + Register the object definitions contained in the given DOM document. + + The DOM document. + + The original resource from where the + was read. + + + The number of object definitions that were registered. + + + In case of parsing errors. + + + + + Creates the to use for actually + reading object definitions from an XML document. + + Default implementation instantiates the specified + or if no reader type is specified. + + + + + Creates the to be passed along + during the object definition reading process. + + The underlying that is currently processed. + A new + + + + Create a instance for handling custom namespaces. + + + TODO (EE): make protected virtual, see remarks on + + + + + The to be used for parsing. + + + + + Sets the IObjectDefinitionDocumentReader implementation to use, responsible for + the actual reading of the XML object definition document.stype of the document reader. + + The type of the document reader. + + + + Specify a to use. If none is specified a default + instance will be created by + + + + + Specify a for creating instances of . + + + + + For retrying the parse process + + + + + Convenience extension of + + that reads object definitions from an XML document or element. + + +

+ Delegates to + + underneath; effectively equivalent to using a + for a + . +

+ + objects doesn't need to be the root element of + the XML document: this class will parse all object definition elements in the + XML stream. + +

+ This class registers each object definition with the + + superclass, and relies on the latter's implementation of the + interface. It supports + singletons, prototypes and references to either of these kinds of object. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Gets object definition reader to use. + + + + + Extension of specific to use with an XmlObjectDefinitionReader. + Provides access to configured in + + + + + The maximum length of any XML fragment displayed in the error message + reporting. + + +

+ Hopefully this will display enough context so that a user + can pinpoint the cause of the error. +

+
+
+ + + Initializes a new instance of the class. + + The resource. + The reader. + + + + Initializes a new instance of the class. + + The resource. + The reader. + The factory to use for creating new instances. + + + + Generates the name of the object. + + The object definition. + the generated object name + + + + Registers the name of the with generated. + + The object definition. + the generated object name + + + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + + +
+ + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the error. + + + The root cause of the parse error (if any - may be ). + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + +
+ + + This method can be overwritten in order to implement validators + capable of displaying a full list of errors found in the definition. + + + The node that triggered the parse error. + + + A message about the exception. + + + + + Gets the reader. + + The reader. + + + + Gets the resource loader. + + The resource loader. + + + + Gets the registry. + + The registry. + + + + Gets or sets the object definition factory. + + The object definition factory. + + + + Get the instance to lookup parsers for custom namespaces. + + + + + Exception thrown if an + is not fully + initialized, for example if it is involved in a circular reference. + + +

+ This is usually indicated by any of the variants of the + + method returning . +

+

+ A circular reference with an + cannot be solved by eagerly caching singleton instances (as is the + case with normal objects. The reason is that every + needs to be fully + initialized before it can return the created object, while only specific + normal objects need to be initialized - that is, if a collaborating object + actually invokes them on initialization instead of just storing the reference. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Thrown when an + encounters an error when attempting to create an object from an object + definition. + + Juergen Hoeller + Rick Evans (.NET) + + + + 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 name of the object that triggered 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. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Describes the creation failure trace of this exception. + + + + + Creates a new instance of the + FactoryObjectNotInitializedException class. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + FactoryObjectCircularReferenceException class. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectCircularReferenceException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + is asked for an object instance name for which it cannot find a definition. + + Rod Johnson + Rick Evans (.NET) + + + + 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. + + + Name of the missing object. + + + A further, detailed message describing the problem. + + + + + Initializes a new instance of the class. + + The required type of the object. + A description of the originating dependency. + A message describing the problem. + + + + Creates a new instance of the + class. + + + The of the missing object. + + + A further, detailed message describing the problem. + + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Return the required of object, if it was a + lookup by that failed. + + + + + Return the name of the missing object, if it was a lookup by name that + failed. + + + + + Thrown in case of a reference to an object that is currently in creation. + + +

+ Typically happens when constructor autowiring matches the currently + constructed object. +

+
+ Juergen Hoeller + Rick Evans +
+ + + The default error message text to be used, if none is specified. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectCurrentlyInCreationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + encounters an error when attempting to parse an object + definition. + + Federico Spinazzi (.NET) + + + + Creates a new instance of the ObjectDefinitionException class. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The value of the xml class attribute thet can be resolved + as a type + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The message about the exception. + + + + + Convenience methods operating on object factories, returning object instances, + names, or counts. + + +

+ The nesting hierarchy of an object factory is taken into account by the various methods + exposed by this class. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Used to dereference an + and distinguish it from managed objects created by the factory. + + +

+ For example, if the managed object identified as foo is a + factory, getting &foo will return the factory, not the + instance returned by the factory. +

+
+
+ + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Count all object definitions in any hierarchy in which this + factory participates. + + +

+ Includes counts of ancestor object factories. +

+

+ Objects that are "overridden" (specified in a descendant factory + with the same name) are counted only once. +

+
+ The object factory. + + The count of objects including those defined in ancestor factories. + +
+ + + Return all object names in the factory, including ancestor factories. + + The object factory. + The array of object names, or an empty array if none. + + + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s + if is set to true, + which means that s will get initialized. +

+
+ + If this isn't also an + , + this method will return the same as it's own + + method. + + + The that objects must match. + + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + The array of object names, or an empty array if none. + +
+ + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+
+ + If this isn't also an , + this method will return the same as it's own method. + + + The that objects must match. + + + The array of object names, or an empty array if none. + +
+ + + Return all objects of the given type or subtypes, also picking up objects + defined in ancestor object factories if the current object factory is an + . + + +

+ The return list will only contain objects of this type. + Useful convenience method when we don't care about object names. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the objects could not be created. + + + The of object instances, or an + empty if none. + +
+ + + Return a single object of the given type or subtypes, also picking up objects defined + in ancestor object factories if the current object factory is an + . + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If more than one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. + This version of ObjectOfType automatically includes prototypes and + instances. +

+
+ The object factory. + The of object to match. + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return the object name, stripping out the factory dereference prefix if necessary. + + The name of the object. + The object name sans any factory dereference prefix. + + + + Given an (object) name, builds a corresponding factory object name such that + the return value can be used as a lookup name for a factory object. + + + The name to be used to build the resulting factory object name. + + + The transformed into its factory object name + equivalent. + + + + + + + Is the supplied a factory dereference? + + +

+ That is, does the supplied begin with + the + ? +

+
+ The name to check. + + if the supplied is a + factory dereference; if not, or the + aupplied is or + consists solely of the + + value. + + +
+ + + Exception that an object implementation is suggested to throw if its own + factory-aware initialization code fails. + thrown by object factory methods + themselves should simply be propagated as-is. + + +

+ Note that non-factory-aware initialization methods like AfterPropertiesSet () + or a custom "init-method" can throw any exception. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectInitializationException class. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectInitializationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to an attempt to lookup a factory object, and + the object identified by the lookup key is not a factory. + + +

+ An object is a factory if it implements (either directly or indirectly + via inheritance) the + interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Thrown when an object doesn't match the required . + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + Name of the object requested. + + + The required of the actual object + instance that was retrieved. + + + The instance actually returned, whose class did not match the + expected . + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The actual of the actual object + instance that was retrieved. + + + + + The required of the actual object + instance that was retrieved. + + + + + The instance actually returned, whose class did not match the + expected . + + + + + The name of the object requested. + + + + + 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 name of the object that was being retrieved from the factory. + + + The object instance that was retrieved. + + + + + 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. + + + + + Exception thrown when an object depends on other objects or simple properties + that were not specified in the object factory definition, although dependency + checking was enabled. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The constructor argument index at which the dependency is + unsatisfied. + + + The of the constructor argument at + which the dependency is unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The name identifying the property on which the dependency is + unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Base class implementation for classes that describe an event handler. + + Rick Evans + + + + Describes an event handler. + + Rick Evans + + + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + The source of the event. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

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

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Returns a stringified representation of this object. + + A stringified representation of this object. + + + + The source of the event (may be unresolved, as in the case + of a + value). + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Convenience base class for implementations. + + + + + Abstracts the state sharing strategy used + by + + Erich Eichinger + + + + Indicate, whether the given instance can be served by this factory + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state can + be served for the given instance or not. + + + + + Returns the shared state for the given instance. + + the instance to obtain shared state for. + the name of this instance + a dictionary containing shared state for or null. + + + + Gets a dictionary acc. to the type of . + If no dictionary is found, create it according to + + the instance to obtain shared state for + the name of the instance. + + A dictionary containing the 's state, + or null if no state can be served by this provider. + + + + + Creates a dictionary to hold the shared state identified by . + + a key to create the dictionary for. + a dictionary according to and . + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Create the key used for obtaining the state dictionary for . + + the instance to create the key for + the name of the instance. + + the key identifying the state dictionary to be used for + or null, if this state manager doesn't serve the given instance. + + + + Implementations may choose to return null from this method to indicate, + that they won't serve state for the given instance. + + + Note:Keys returned by this method are always treated case-sensitive! + + + + + + Create shared state dictionaries case-sensitive or case-insensitive? + + + + + A number indicating the priority of this ( for more). + + + + + Base class for all + implemenations that actually perform event wiring. + + Rick Evans + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

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

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Resolves the method metadata that describes the method that is to be used + as the argument to a delegate constructor. + + + The exposing the method. + + + The of the delegate (e.g. System.EventHandler). + + + The custom binding flags to use when searching for the method. + + The method metadata. + + If the method could not be found. + + + + + Describes an implementation + that autowires events to handler methods. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Wires up the specified handler to the named event on the supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a , + etc). + + + + + The name of the method that is going to handle the event. + + + + + Performs the matching up of handler methods to one or more source events. + + +

+ This class merely marshals the matching of handler methods to the events exposed + by an event source, and then delegates to a concrete + implementation (such as + or + ) to do the heavy lifting of + actually wiring a handler method to an event. +

+

+ Note : the order in which handler's are wired up to events is non-deterministic. +

+
+
+ + + Creates a new instance of the + class. + + + The object exposing the event (s) being wired up. + + + The name of the event that is being wired up. + + + The object exposing the method (s) being wired to the event. + + + The name of the method that is going to handle the event. + + + + + Wires up events on the source to methods exposed on the handler. + + + + + Wires up the supplied event to any handler methods that match the event + signature. + + The event being wired up. + + + + Only replaces the first occurrence of the placeholder. + + The event whose name is going to be used. + + The method name customised for the name of the supplied event. + + + + + The object exposing the event (s) being wired up. + + + + + The object exposing the method (s) being wired to an event source. + + + + + The of the object that is handling any events. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Serves shared state on a by-type basis. + + + + + Creates a new instance matching all types by default. + + + + + Creates a new instance matching only specified list of types. + + the list of types to serve. + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Returns the for the given . + + the instance to obtain the key for. + the name of the instance (ignored by this provider) + instance.GetType() if it matches the list. Null otherwise. + + This method will only be called if returned true previously. + + + + + Limit object types to be served by this state manager. + + + Only objects assignable to one of the types in this list + will be served state by this manager. + + + + + Describes an event handler for an object instance. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Definition for sorting object instances by a property. + + Juergen Hoeller + Simon White (.NET) + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Mutable implementation of the + interface that + supports toggling the ascending value on setting the same property again. + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using + the specified . + + + The to use + as a source for initial property values. + + + + + Creates a new instance of the + class. + + + The name of the property to sort by. + + + Whether upper and lower case in string values should be ignored. + + + Whether or not the sorting should be ascending or descending. + + + + + Creates a new instance of the + class. + + + Whether or not the + + property should be toggled if the same name is set on the + + property. + + + + + Overrides the default method + + + The object to test against this instance for equality. + + + True if the supplied is equal to this instance. + + + + + Overrides the default method. + + The hashcode for this instance. + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Performs a comparison of two objects, using the specified object property via + an . + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + The to use for any + sorting. + + + If the supplied is . + + + + + Compares two objects and returns a value indicating whether one is less + than, equal to or greater than the other. + + The first object to compare. + The second object to compare. + + + + + Get the 's property + value for the given object. + + The object to get the property value for. + The property value. + + + + Sort the given according to the + given sort definition. + + + The to be sorted. + + The parameters to sort by. + + In the case of a missing property name. + + + If the supplied is . + + + + + Gets the to + use for any sorting. + + + The to use for + any sorting. + + + + + Describes an event handler for a static class method. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + The central interface of Spring.NET's low-level object infrastructure. + + +

+ Typically not directly used by application code but rather implicitly + via an . +

+

+ Implementing classes have the ability to get and set property values + (individually or in bulk), get property descriptors and query the + readability and writability of properties. +

+

+ This interface supports nested properties enabling the setting + of properties on subproperties to an unlimited depth. +

+

+ If a property update causes an exception, a + will be thrown. Bulk + updates continue after exceptions are encountered, throwing an exception + wrapping all exceptions encountered during the update. +

+

+ implementations can be used + repeatedly, with their "target" or wrapped object changed. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + Get the value of a property. + + The name of the property to get the value of. May be nested. + + The value of the property. + + if the property isn't readable, or if the getting the value throws + an exception. + + + + + Get the for a particular + property. + + + The property to be retrieved. + + + The for the particular + property. + + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Get all of the instances for + all of the properties of the wrapped object. + + + An array of instances. + + + + + Set a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ The new property value. +
+ + + Set a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new property value. +
+ + Set a number of property values in bulk. + +

+ This is the preferred way to perform a bulk update. +

+

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

+ Does not allow the setting of unknown fields. Equivalent to + + with an argument of false for the second parameter. +

+
+ + The collection of instances to + set on the wrapped object. + +
+ + + Set a number of property values in bulk with full control over behavior. + + +

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

Does not allow the setting of unknown fields. +

+
+ + The to set on the target object + + + Should we ignore unknown values (not found in the object!?) + +
+ + + The object wrapped by the wrapper (cannot be ). + + +

+ Implementations are required to allow the type of the wrapped + object to change. +

+
+ The object wrapped by this wrapper. +
+ + + Convenience method to return the + of the wrapped object. + + The of the wrapped object. + + + + A collection style container for + instances. + + Rod Johnson + Mark Pollack (.NET) + + + + Return the instance with the + given name. + + The name to search for. + the , or null if a + the with the supplied + did not exist in this collection. + + + + + Is there a instance for this + property name? + + The name to search for. + + True if there is a instance for + the supplied . + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + +

+ Subclasses should also override Equals. +

+
+ The old property values. + + An containing any changes, or + an empty instance if there were + no changes. + +
+ + + Return an array of the objects + held in this object. + + An array of the objects held + in this object. + + + + + This interface should be implemented by classes that want to + have access to the shared state. + + +

+ Shared state is very useful if you have data that needs to be shared by all instances + of e.g. the same webform (or other IHttpHandlers). +

+

+ For example, Spring.Web.UI.Page class implements this interface, which allows + each page derived from it to cache localizalization resources and parsed data binding + expressions only once and then reuse the cached values, regardless of how many instances + of the page are created. +

+
+
+ + + Gets or sets the that should be used + to store shared state for this instance. + + + + + Default implementation of the + interface. + + +

+ Allows simple manipulation of properties, and provides constructors to + support deep copy and construction from a number of collection types such as + and + . +

+
+ Rod Johnson + Mark Pollack (.NET) + Rick Evans (.NET) +
+ + + The list of objects. + + + + + Creates a new instance of the + class. + + +

+ The returned instance is initially empty... + s can be added with the various + overloaded , + , + , + and + methods. +

+
+ + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. Guarantees + references are independent, although it can't deep copy objects currently + referenced by individual objects. +

+
+
+ + + Creates a new instance of the + class. + + + The with property values + keyed by property name, which must be a . + + + + + Overloaded version of Add that takes a property name and a property value. + + + The name of the property. + + + The value of the property. + + + + + Add the supplied object, + replacing any existing one for the respective property. + + + The object to add. + + + + + Merges the value of the supplied 'new' with that of + the current if merging is supported and enabled. + + + The new pv. + The current pv. + The possibly merged PropertyValue + + + + Add all property values from the given + . + + + The map of property values, the keys of which must be + s. + + + + + Add all property values from the given + . + + + The list of s to be added. + + + + + Remove the given , if contained. + + + The to remove. + + + + + Removes the named , if contained. + + + The name of the property. + + + + + Modify a object held in this object. Indexed from 0. + + + + + Return the property value given the name. + + + The property name is checked in a case-insensitive fashion. + + + The name of the property. + + + The property value. + + + + + Does the container of properties contain one of this name. + + The name of the property to search for. + + True if the property is contained in this collection, false otherwise. + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + Another property values collection. + + The collection of property values that are different than the supplied one. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + Convert the object to a string representation. + + + A string representation of the object. + + + + + Property to retrieve the array of property values. + + + + + Holder for a key-value style attribute that is part of a bean definition. + Keeps track of the definition source in addition to the key-value pair. + + + + + Create a new AttributeValue instance. + + the name of the attribute (never null) + the value of the attribute (possibly before type conversion) + + + + Return the name of the attribute. + + + + + Return the value of the attribute. + + + + + Set the configuration source Object for this metadata element. +

The exact type of the object will depend on the configuration mechanism used.

+
+
+ + + Default implementation of the + interface that should be sufficient for all normal uses. + + +

+ will convert + and array + values to the corresponding target arrays, if necessary. Custom + s that deal with + s or arrays can be written against a + comma delimited as + arrays are converted in such a format if the array itself is not assignable. +

+
+ Rod Johnson + Juergen Hoeller + Jean-Pierre Pawlak + Mark Pollack (.NET) + Aleksandar Seovic(.NET) +
+ + The wrapped object. + + + + The ILog instance for this class. We'll create a lot of these objects, + so we don't want a new instance every time. + + + + + Creates a new instance of the class. + + +

+ The wrapped target instance will need to be set afterwards. +

+
+ +
+ + + Creates a new instance of the class. + + + The object wrapped by this . + + + If the supplied is . + + + + + Creates a new instance of the class, + instantiating a new instance of the specified and using + it as the . + + +

+ Please note that the passed as the + argument must have a no-argument constructor. + If it does not, an exception will be thrown when this class attempts + to instantiate the supplied using it's + (non-existent) constructor. +

+
+ + The to instantiate and wrap. + + + If the is , or if the + invocation of the s default (no-arg) constructor + fails (due to invalid arguments, insufficient permissions, etc). + +
+ + Gets the value of a property. + + The name of the property to get the value of. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + Gets the value of a property. + + The property expression that should be used to retrieve the property value. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + + Sets a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new value. +
+ + + Sets a property value. + + + The property expression that should be used to set the property value. + + The new value. + + + + Sets a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ + The object containing new property value. + +
+ + Set a number of property values in bulk. + +

+ Does not allow unknown fields. Equivalent to + + with and for + arguments. +

+
+ + The to set on the target + object. + + + If an error is encountered while setting a property. + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Perform a bulk update with full control over behavior. + + +

+ This method may throw a reflection-based exception, if there is a critical + failure such as no matching field... less serious exceptions will be accumulated + and thrown as a single . +

+
+ + The s to set on the target object. + + + Should we ignore unknown values (not found in the object!?). + + + If an error is encountered while setting a property (only thrown if the + parameter is set to ). + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Returns PropertyInfo for the specified property + + The name of the property to search for. + The for the specified property. + If cannot be determined. + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Returns MemberInfo for the specified property or field + + The name of the property or field to search for. + The or for the specified property or field. + If does not resolve to a property or field. + + + + Get the properties of the wrapped object. + + + An array of s. + + + + + This method is expensive! Only call for diagnostics and debugging reasons, + not in production. + + + A string describing the state of this object. + + + + + Attempts to parse property expression first and falls back to full expression + if that fails. Performance optimization. + + Property expression to parse. + Parsed proeprty expression. + + + + The object wrapped by this . + + + If the object cannot be changed; or an attempt is made to set the + value of this property to . + + + + + Convenience method to return the of the wrapped object. + + +

+ Do not use this (convenience) method prior to setting the + property. +

+
+ + The of the wrapped object. + + + If the property + is . + +
+ + + Return the collection of property descriptors. + + + + + Combined exception, composed of individual binding + s. + + +

+ An object of this class is created at the beginning of the binding + process, and errors added to it as necessary. +

+

+ The binding process continues when it encounters application-level + s, applying those changes + that can be applied and storing rejected changes in an instance of this class. +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) +
+ + + Creates a new instance of the PropertyAccessExceptionsException class. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Create new empty PropertyAccessExceptionsException. + We'll add errors to it as we attempt to bind properties. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The IObjectWrapper wrapping the target object at the root of the exception. + + + + The list of PropertyAccessException objects. + + + + Return the + for the supplied , or + if there isn't one. + + + + + Describe the number of exceptions contained in this container class. + + A description of the instance contents. + + + + Return the that generated + this exception. + + + + + Return the object we're binding to. + + + + + If this returns zero (0), no errors were encountered during binding. + + + + + Return an array of the s + stored in this object. + + +

+ Will return the empty array (not ) if there were no errors. +

+
+
+ + + Describe the group of exceptions. + + + + + Holds information and value for an individual property. + + +

+ Using an object here, rather than just storing all properties in a + map keyed by property name, allows for more flexibility, and the + ability to handle indexed properties in a special way if necessary. +

+

+ Note that the value doesn't need to be the final required + : an + implementation must + handle any necessary conversion, as this object doesn't know anything + about the objects it will be applied to. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + + If the supplied is or + contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + Pre-parsed property name. + + If the supplied or + is , or if the name contains only whitespace characters. + + + + + Print a string representation of the property. + + A string representation of the property. + + + + Determines whether the supplied + is equal to the current . + + The other instance. + + if they are equal in content. + + + + + 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 name of the property. + The name of the property. + + + + Parsed property expression. + + + + + Return the value of the property. + + +

+ Note that type conversion will not have occurred here. + It is the responsibility of the + implementation to + perform type conversion. +

+
+ The (possibly unresolved) value of the property. +
+ + + A simple pool implementation + + +

+ Based on the implementation found in Concurrent Programming in Java, + 2nd ed., by Doug Lea. +

+
+ Doug Lea + Federico Spinazzi + Mark Pollack +
+ + + A simple pooling interface for managing and monitoring a pool + of objects. + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + Obtain an instance from the pool. + + +

+ By contract, clients must return the borrowed + instance using + or a related method as defined in an implementation or + sub-interface. +

+
+ An instance from the pool. + + In case the pool is unusable. + + +
+ + + Return an instance to the pool. + + +

+ By contract, the object must have been obtained using + + or a related method as defined in an implementation or sub-interface. +

+
+ The instance to be returned to the pool. + +
+ + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This is an optional operation. AddObject is useful for "pre-loading" a + pool with idle objects. +

+
+ + If the implementation does not support the operation. + +
+ + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently borrowed from the pool. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently idle in the pool. + + +

+ This is an optional operation. +

+

+ This may be considered an approximation of the number of objects + that can be borrowed without creating any new instances. +

+
+ + If the implementation does not support the operation. + +
+ + + Set the factory used to create new instances. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Set of permits + + + + + Creates a new instance of the + class. + + + The factory used to instantiate and manage the lifecycle of pooled objects. + + The initial size of the pool. + + If the supplied is . + + + If the supplied is less than or equal to zero. + + + + + Obtain an instance from the pool. + + + In case the pool is unusable. + + + + + + + Return an instance to the pool. + + The instance to be returned to the pool. + + + + + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Synchronized borrow logic. + + + + + + Synchronized release logic. + + + The object to release to the pool. + + + if the object was not a busy one. + + + + + Instantiates the supplied number of instances and adds + them to the pool. + + + The initial number of objects to build. + + + If the supplied number of is + less than or equal to zero. + + + + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Change the state of the pool to unusable. + + + + + Gets the number of instances currently borrowed from the pool. + + + If the implementation does not support the operation. + + + + + + Gets the number of instances currently idle in the pool. + + + If the implementation does not support the operation. + + + + + + Set the factory used to create new instances. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Defines lifecycle methods for objects that are to be used in an + implementation. + + +

+ The following methods summarize the contract between an + and an + an . +

+ + + + is called whenever a new instance is needed. + + + + is invoked on every instance before it is returned from + the pool. + + + + is invoked on every instance when it is returned to the pool. + + + + is invoked on every instance when it is being dropped from the + pool (see + + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + 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. + + +

+ Invoked on every instance when it is being "dropped" + from the pool (whether due to the return value from a call to the + + method, or for reasons specific to the pool implementation.) +

+
+ 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. + + +

+ Invoked in an implementation-specific fashion to determine if an + instance is still valid to be returned by the pool. + It will only be invoked on an "activated" instance. +

+
+ 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. + + +

+ Invoked on every instance before it is returned from the pool. +

+
+ The instance to be activated. +
+ + + Uninitialize an instance to be returned to the pool. + + +

+ Invoked on every instance when it is returned to the pool. +

+
+ The instance returned to the pool. +
+ + + Base class for all pooling exceptions. + + Federico Spinazzi + + + + 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. + + + + + Implementation of IProxyMethodBuilder that delegates method calls to the base class. + + Bruno Baia + + + + 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 . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Builds a proxy type using composition. + + + + In order for this builder to work, the target must implement + one or more interfaces. + + + Aleksandar Seovic + Bruno Baia + + + + Target instance calls should be delegated to. + + + + + Creates a new instance of the + class. + + + + + Creates a proxy that delegates calls to an instance of the + target object. + + +

+ Only interfaces can be proxied using composition, so the target + must implement one or more interfaces. +

+
+ The generated proxy class. + + If the + does not implement any interfaces. + +
+ + + Create an to create interface implementations + + + + + Allows subclasses to generate additional code + + + + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + Deaclares a field that holds the target object instance. + + + The builder to use for code generation. + + + + + Generates the proxy constructor. + + +

+ This implementation creates instance of the target object for delegation + using constructor arguments. +

+
+ The constructor builder to use. + The IL generator to use. + The constructor to delegate the creation to. +
+ + + Gets or sets a value indicating whether interfaces should be implemented explicitly. + + + if they should be; otherwise, . + + + + + Allows easy access to existing and creation of new dynamic proxies. + + Aleksandar Seovic + Bruno Baia + + + + The name of the assembly that defines proxy types created. + + + + + The attributes of the proxy type to generate. + + + + + Creates an appropriate type builder. + + The proxy type name. + The type to extends if provided. + The type builder to use. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + This attribute can be used to mark interfaces that should not be proxied + + Bruno Baia + + + + Creates a new instance of the + class. + + + + + Implementation of IProxyMethodBuilder that delegates method calls to target object. + + Bruno Baia + + + + 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 . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Base class for dynamic members. + + Aleksandar Seovic + + + + Method attributes constant. + + + + + Sets up target instance for invocation. + + IL generator to use. + Type of target instance. + + + + Sets up invocation argument. + + IL generator to use. + Argument type. + Argument position. + + + + Generates method invocation code. + + IL generator to use. + Flag specifying whether method is static. + Flag specifying whether method is on the value type. + Method to invoke. + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Defines constructors that dynamic constructor class has to implement. + + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Safe wrapper for the dynamic constructor. + + + will attempt to use dynamic + constructor if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached constructor info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe constructor wrapper. + + Constructor to wrap. + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Factory class for dynamic constructors. + + Aleksandar Seovic + + + + Creates dynamic constructor instance for the specified . + + Constructor info to create dynamic constructor for. + Dynamic constructor for the specified . + + + + Defines methods that dynamic field class has to implement. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Safe wrapper for the dynamic field. + + + will attempt to use dynamic + field if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached fieldInfo or creates a new entry, if none is found. + + + + + Creates a new instance of the safe field wrapper. + + Field to wrap. + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Holds cached Getter/Setter delegates for a Field + + + + + Factory class for dynamic fields. + + Aleksandar Seovic + + + + Creates dynamic field instance for the specified . + + Field info to create dynamic field for. + Dynamic field for the specified . + + + + Defines methods that dynamic indexer class has to implement. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer arguments. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer arguments. + + + A new indexer value. + + + + + Defines methods that dynamic method class has to implement. + + + + + Invokes dynamic method on the specified target object. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Safe wrapper for the dynamic method. + + + will attempt to use dynamic + method if possible, but it will fall back to standard + reflection if necessary. + + + + + Creates a new instance of the safe method wrapper. + + Method to wrap. + + + + Invokes dynamic method. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Gets the class, that declares this method + + + + + Factory class for dynamic methods. + + Aleksandar Seovic + + + + Creates dynamic method instance for the specified . + + Method info to create dynamic method for. + Dynamic method for the specified . + + + + Defines methods that dynamic property class has to implement. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Safe wrapper for the dynamic property. + + + will attempt to use dynamic + property if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached property info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe property wrapper. + + Property to wrap. + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Internal PropertyInfo accessor. + + + + + Holds cached Getter/Setter delegates for a Property + + + + + Factory class for dynamic properties. + + Aleksandar Seovic + + + + Creates safe dynamic property instance for the specified . + + +

This factory method will create a dynamic property with a "safe" wrapper.

+

Safe wrapper will attempt to use generated dynamic property if possible, + but it will fall back to standard reflection if necessary.

+
+ Property info to create dynamic property for. + Safe dynamic property for the specified . + +
+ + + Creates dynamic property instance for the specified . + + Property info to create dynamic property for. + Dynamic property for the specified . + + + + Represents a Get method + + the target instance when calling an instance method + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + Represents an Indexer Get method + + the target instance when calling an instance method + + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + + Represents a method + + the target instance when calling an instance method + arguments to be passed to the method + the value return by the method. null when calling a void method + + + + Represents a constructor + + arguments to be passed to the method + the new object instance + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Allows easy access to existing and creation of new dynamic relection members. + + Aleksandar Seovic + + + + The name of the assembly that defines reflection types created. + + + + + The attributes of the reflection type to generate. + + + + + Cache for dynamic property types. + + + + + Cache for dynamic field types. + + + + + Cache for dynamic indexer types. + + + + + Cache for dynamic method types. + + + + + Cache for dynamic constructor types. + + + + + Creates an appropriate type builder. + + + The base name to use for the reflection type name. + + The type builder to use. + + + + Returns dynamic property if one exists. + + Property to look up. + callback function that will be called to create the dynamic property + An for the given property info. + + + + Returns dynamic field if one exists. + + Field to look up. + callback function that will be called to create the dynamic field + An for the given field info. + + + + Returns dynamic indexer if one exists. + + Indexer to look up. + callback function that will be called to create the dynamic indexer + An for the given indexer. + + + + Returns dynamic method if one exists. + + Method to look up. + callback function that will be called to create the dynamic method + An for the given method. + + + + Returns dynamic constructor if one exists. + + Constructor to look up. + callback function that will be called to create the dynamic constructor + An for the given constructor. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG mode, per ConditionalAttribute rules. + + + + + Create a new Get method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field + + + + Create a new Set method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field. + + If the field's returns true, the returned method + will throw an when called. + + + + + Create a new Get method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to read the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new Set method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to write the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new method delegate for the specified method using + + the method to create the delegate for + a delegate that can be used to invoke the method. + + + + Creates a new delegate for the specified constructor. + + the constructor to create the delegate for + delegate that can be used to invoke the constructor. + + + + Creates a instance with the highest possible code access security. + + + If allowed by security policy, associates the method with the s declaring type. + Otherwise associates the dynamic method with . + + + + + Delegates a Method(object target, params object[] args) call to the actual underlying method. + + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Converts to an instance of if necessary to + e.g. avoid e.g. double/int cast exceptions. + + + + This method mimics the behavior of the compiler that + automatically performs casts like int to double in "Math.Sqrt(4)".
+ See about implicit, widening type conversions on MSDN - Type Conversion Tables +
+ + Note: is expected to be a value type! + +
+
+ + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Indicates that an annotated class is a "Controller" (e.g. a MVC Controller). + + + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Thomas Trageser + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + + + + Indicates that an annotated class is a "Repository" (or "DAO"). + + + A class with this attribute is eligible for Spring DataAccessException translation. A class + with the Repository attribute is also clarified as to its role in the overall application + architecture for the purpose of tools, aspects, etc. + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Rod Johnson + Jueren Hoeller + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the repository. + + + + Indicates that an annotated class is a "Service" (e.g. a business service facade). + + + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + + + + Implements by using . + + Erich Eichinger + + + + Specifies the contract a strategy must be implement to store and + retrieve data that is specific to the executing thread. + + + All implementations of this interface must treat keys case-sensitive. + + Erich Eichinger + + + + Retrieves an object with the specified . + + The name of the item. + + The object in the current thread's context associated with the + specified or null if no object has been stored previously + + + + + Stores a given object and associates it with the specified . + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + + If the object with the specified is not found, the method does nothing. + + The name of the object to remove. + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + + Acquire/Release protocol, base of many concurrency utilities. + + + +

objects isolate waiting and notification for particular logical + states, resource availability, events, and the like that are shared + across multiple threads.

+ +

Use of s sometimes (but by no means always) adds + flexibility and efficiency compared to the use of plain + .Net monitor methods and locking, and are sometimes (but by no means + always) simpler to program with.

+ +

Used for implementation of a

+
+ + Doug Lea + Federico Spinazzi (.Net) +
+ + Wait (possibly forever) until successful passage. + Fail only upon interuption. Interruptions always result in + `clean' failures. On failure, you can be sure that it has not + been acquired, and that no + corresponding release should be performed. Conversely, + a normal return guarantees that the acquire was successful. + + + + + Potentially enable others to pass. +

+ Because release does not raise exceptions, + it can be used in `finally' clauses without requiring extra + embedded try/catch blocks. But keep in mind that + as with any java method, implementations may + still throw unchecked exceptions such as Error or NullPointerException + when faced with uncontinuable errors. However, these should normally + only be caught by higher-level error handlers. +

+
+
+ + + Wait at most msecs to pass; report whether passed. +

+ The method has best-effort semantics: + The msecs bound cannot + be guaranteed to be a precise upper bound on wait time in Java. + Implementations generally can only attempt to return as soon as possible + after the specified bound. Also, timers in Java do not stop during garbage + collection, so timeouts can occur just because a GC intervened. + So, msecs arguments should be used in + a coarse-grained manner. Further, + implementations cannot always guarantee that this method + will return at all without blocking indefinitely when used in + unintended ways. For example, deadlocks may be encountered + when called in an unintended context. +

+
+ the number of milleseconds to wait + An argument less than or equal to zero means not to wait at all. + However, this may still require + access to a synchronization lock, which can impose unbounded + delay if there is a lot of contention among threads. + + true if acquired +
+ + A latch is a boolean condition that is set at most once, ever. + Once a single release is issued, all acquires will pass. +

+ Sample usage. Here are a set of classes that use + a latch as a start signal for a group of worker threads that + are created and started beforehand, and then later enabled. +

+ + class Worker implements IRunnable { + private readonly Latch startSignal; + Worker(Latch l) + { + startSignal = l; + } + + public void Run() { + startSignal.acquire(); + DoWork(); + } + + void DoWork() { ... } + } + + class Driver { // ... + void Main() { + Latch go = new Latch(); + for (int i = 0; i < N; ++i) // make threads + new Thread(new ThreadStart(new Worker(go)).Start(); + DoSomethingElse(); // don't let run yet + go.Release(); // let all threads proceed + } + } + +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + can acquire ? + + + + + Method mainly used by clients who are trying to get the latch + + + + Wait at most msecs millisconds for a permit + + + + Enable all current and future acquires to pass + + + + + An abstraction to safely store "ThreadStatic" data. + + + By default, is used to store thread-specific data. + You may switch the storage strategy by calling .

+ NOTE: Access to the underlying storage is not synchronized for performance reasons. + You should call only once at application startup! + + Erich Eichinger + + +

+ Holds the current strategy. + + + Access to this variable is not synchronized on purpose for performance reasons. + Setting a different strategy should happen only once + at application startup. + +
+ + + Set the new strategy. + + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + +

Base class for counting semaphores based on Semaphore implementation + from Doug Lea.

+
+ + +

Conceptually, a semaphore + maintains a set of permits. Each acquire() blocks if + necessary until a permit is available, and then takes it.

+ +

Each release adds a permit. However, no actual permit objects are used; + the Semaphore just keeps a count of the number available + and acts accordingly.

+ +

A semaphore initialized to 1 can serve as a mutual exclusion lock.

+ + Used for implementation of a +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + current number of available permits + + + + +

Create a Semaphore with the given initial number of permits.

+

Using a seed of 1 makes the semaphore act as a mutual + exclusion lock.

+ +

Negative seeds are also allowed, + in which case no acquires will proceed until the number of + releases has pushed the number of permits past 0.

+
+
+ + + Release a permit + + + + + Acquire a permit + + + + + Wait at most msecs millisconds for a permit + + number of ms to wait + true if aquired + + + Release N permits. release(n) is + equivalent in effect to: +
+            for (int i = 0; i < n; ++i) release();
+            
+ But may be more efficient in some semaphore implementations. +
+ if n is negative. + + +
+ + Return the current number of available permits. + Returns an accurate, but possibly unstable value, + that may change immediately after returning. + + + + + Utility class to use an with the + C# using () {} idiom + + + + + Creates a new trying to the given + + + the to be held + + + + Creates a new trying to the given + + + the to be held + millisecond to try to acquire the lock + + + + Releases the held + + + + + initializes and acquire access to the + + + + + + Implements by using a hashtable. + + Erich Eichinger + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + Thrown by synchronization classes that report + timeouts via exceptions. The exception is treated + as a form (subclass) of InterruptedException. This both + simplifies handling, and conceptually reflects the fact that + timed-out operations are artificially interrupted by timers. + + + + + The approximate time that the operation lasted before + this timeout exception was thrown. + + + + + + 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. + + + 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. + + + + + Override of GetObjectData to allow for private serialization + + serialization info + streaming context + + + Constructs a TimeoutException with given duration value. + + + + + Constructs a TimeoutException with the + specified duration value and detail message. + + + + + Gets the approximate time that the operation lasted before + this timeout exception was thrown. + + + + A TimeoutSync is an adaptor class that transforms all + calls to acquire to instead invoke attempt with a predetermined + timeout value. + + + + + + the adapted sync + + + + + timeout value + + + + Create a TimeoutSync using the given Sync object, and + using the given timeout value for all calls to acquire. + + + + + Try to acquire the sync before the timeout + + In case a time out occurred + + + + + + + + + + + + + + Support to account for differences between java nad .NET: +
    +
+
+
+ + + .NET threads have not a method to check if they have been interrupted. + Moreover, differently from java threads, when entering locked + blocks, Monitor, Sleep, SpinWait and so on, a + will be raised by the runtime. +

Spring.Threading classes usually call this method before entering a lock block, to mirror java code +

Usually this is non issue because the same exception will be raised entering the monitor + associated with the lock () +

+
+ if the thread has been interrupted +
+ + + Normalize the given so that + is is comparable with . + + Date. + + + + + + + + + the difference between millisecodns of the first and second date + + + + Returns the number of nanoseconds for the current value of + + Current number of nanoseconds + + + + Returns the number of nano seconds represented by the + + to use + Number of nano seconds for + + + + Returns a representing the number of nanoseconds passed in via . + + Number of nanoseconds. + representing the number of nanoseconds passed in. + + + + Placeholder for java.lang.System.currentTimeMillis + + The current machine time in milliseconds + + + + Has been interrupted this thread + + + + + Miscellaneous generic collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Various utility methods relating to the manipulation of arrays. + + Aleksandar Seovic + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Use this sort method instead of to overcome + bugs in Mono. + + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Tests equality of two single-dimensional arrays by checking each element + for equality. + + The first array to be checked. + The second array to be checked. + True if arrays are the same, false otherwise. + + + + Returns hash code for an array that is generated based on the elements. + + + Hash code returned by this method is guaranteed to be the same for + arrays with equal elements. + + + Array to calculate hash code for. + + + A hash code for the specified array. + + + + + Returns string representation of an array. + + + Array to return as a string. + + + String representation of the specified . + + + + + Concatenates 2 arrays of compatible element types + + + If either of the arguments is null, the other array is returned as the result. + The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. + + + + + Assertion utility methods that simplify things such as argument checks. + + +

+ Not intended to be used directly by applications. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Checks, whether may be invoked on . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the method to test for + + if is null + + + if it is not possible to invoke on + + + + + checks, whether supports the methods of . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the type to test for + + if is null + + + if it is not possible to invoke methods of + type on + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + If the supplied is . + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is . + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + An arbitrary message that will be passed to any thrown . + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is , contains no elements or only null elements. + + The array or collection to check. + The argument name. + + If the supplied is , + contains no elements or only null elements. + + + + + Checks whether the specified can be cast + into the . + + + The argument to check. + + + The name of the argument to check. + + + The required type for the argument. + + + An arbitrary message that will be passed to any thrown + . + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + The exception message to use if the assertion fails. + + if expression is false + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + + if expression is false + + + + + Assert a bool expression, throwing InvalidOperationException + if the expression is false. + + a boolean expression. + The exception message to use if the assertion fails + if expression is false + + + + Creates a new instance of the class. + + +

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

+
+
+ + + General utility methods for working with annotations + + + + + Find a single Attribute of the type 'attributeType' from the supplied class, + traversing it interfaces and super classes if no attribute can be found on the + class iteslf. + + + This method explicitly handles class-level attributes which are not declared as + inherited as well as attributes on interfaces. + + The class to look for attributes on . + Type of the attribibute to look for. + the attribute of the given type found, or null + + + + Get all attribute properties with values for a specific attribute type + + attribute to check against + collection of all properties with values + + + + Get the default name value of an attribute and a specific property + + attribute from where to get the default value + property to get the default value + + + + + Miscellaneous collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Adds the specified to the specified . + + The collection to add the element to. + The object to add to the collection. + + + + Adds the specified to the specified . + + The enumerable to add the element to. + The object to add to the collection. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Converts an instance to an instance. + + The instance to be converted. + An instance in which its elements are the elements of the instance. + if the is null. + + + + Copies the elements of the to a + new array of the specified element type. + + The instance to be converted. + The element of the destination array to create and copy elements to + An array of the specified element type containing copies of the elements of the . + + + + Returns the first element contained in both, and . + + The implementation assumes that <<< + the source enumerable. may be null + the list of candidates to match against elements. may be null + the first element found in both enumerables or null + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a value of the given type found, or null if none. + If more than one value of the given type is found + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a collection of matching values of the given type found, empty if none found, or null if the input collection was null. + + + + Find a value of one of the given types in the given Collection, + searching the Collection for a value of the first type, then + searching for a value of the second type, etc. + + The collection to search. + The types to look for, in prioritized order. + a value of the given types found, or null if none + If more than one value of the given type is found + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified dictionary is null empty. + + The dictionary to check. + + true if the specified dictionary is empty or null; otherwise, false. + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A callback method used for comparing to items. + + + + the first object to compare + the second object to compare + Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. + + + + + + Utility class containing helper methods for object comparison. + + Aleksandar Seovic + + + Compares two objects. + First object. + Second object. + + 0, if objects are equal; + less than zero, if the first object is smaller than the second one; + greater than zero, if the first object is greater than the second one. + + + + Utility class for .NET configuration files management. + + Aleksandar Seovic + + + + Avoid BeforeFieldInit pitfall + + + + + Parses the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. + Object created by a corresponding . +
+ + + Refresh the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. +
+ + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Configuration exception. + + + + Creates the configuration exception. + + Configuration exception. + + + + Determines whether the specified exception is configuration exception. + + The exception to check. + + true if the specified exception is configuration exception; otherwise, false. + + + + + Returns the line number of the specified node. + + Node to get the line number for. + The line number of the specified node. + + + + Returns the name of the file specified node is defined in. + + Node to get the file name for. + The name of the file specified node is defined in. + + + + Sets the current to be used by . + + + íf implements , this method invokes + on the new configSystem to chain them.
+ Note, that this method requires reflection on internals of +
+ the configuration system to set + bypasses the check if the current system has already been initialized + the previous config system, if any +
+ + + Resets the global configuration system instance. Use for unit testing only! + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Gets a string specifying the file/resource name related to the configuration details. + + + + + Gets an integer specifying the line number related to the configuration details. + + + + + Gets an integer specifying the line position related to the configuration details. + + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + An implementation, who's elements retain information + about their location in the original XML text document the were read from. + + + When loading a document, the used must implement . + Typical XmlReader implementations like support this interface. + + Erich Eichinger + + + + Overridden to create a retaining the current + text position information. + + + + + Overridden to create a retaining the current + text position information. + + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store null as their property. + + The XML source + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store as their property. + + + The new XmlNode or null if no more nodes exist. + + the name of the resource + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store null as their property. + + + The new XmlNode or null if no more nodes exist. + + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Get info about the current text position during loading a document. + Outside loading a document, the properties of + will always be null. + + + + + Holds the current text position during loading a document + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + Collects information on the constructor to use to create the instance and the argument instances to pass into the + constructor. + + + + + Initializes a new instance of the class. + + The constructor info. + The arg instances. + + + + Gets the constructor info. + + The constructor info. + + + + Gets the arg instances. + + The arg instances. + + + + Discovers the attributes of a + and provides access to the + s metadata. + + Rick Evans + + + + The method name associated with a delegate invocation. + + + + + Creates a new instance of the + class. + + + The event used to extract the delegate + from. + + + if the supplied is + . + + + + + Creates a new instance of the + class. + + + The delegate . + + + If the supplied is not a subclass of the + class, or is . + + + + + Checks to see if the method encapsulated by the supplied method + metadata is compatible with the method signature associated with + this delegate type. + + The method to be checked. + + if the method signature is compatible with + the signature of this delegate; if not, or + if the supplied parameter is + . + + + + + Gets the s of the parameters of the + method signature associated with this delegate type. + + +

+ This method will never return ; the returned + array may be empty, but it most certainly + will not be . +

+
+ + A array of the parameter + s; or the + array if the method signature has no parameters. + +
+ + + Gets the return of the + method signature associated with this delegate type. + + The return . + + + + Gets the metadata about the method signature associated + with this delegate type. + + + The metadata about the method signature associated + with this delegate type. + + + + + Determines whether the supplied + is a type. + + + The to be checked. + + + if the supplied + is a ; + if not or the supplied + is . + + + + + Checks if the signature of the supplied + is compatible with the signature expected by the supplied + . + + The event to be checked against. + + The method signature to check for compatibility. + + + if the signature of the supplied + is compatible with the signature + expected by the supplied ; + if not or either of the supplied + parameters is . + + + + + + The of the delegate. + + + + + Use this class for obtaining instances for dynamic code generation. + + +

+ The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. +

+ + Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. + +
+ +

The following excerpt from demonstrates usage:

+ + public class DynamicProxyManager + { + public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; + + public static TypeBuilder CreateTypeBuilder(string name, Type baseType) + { + // Generates type name + string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); + ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); + return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); + } + } + +
+ Erich Eichinger + + + +
+ + + prevent instantiation + + + + + Returns the for the dynamic module within the specified assembly. + + + If the assembly does not exist yet, it will be created.
+ This factory caches any dynamic assembly it creates - calling GetModule() twice with + the same name will *not* create 2 distinct modules! +
+ The assembly-name of the module to be returned + the that can be used to define new types within the specified assembly +
+ + + Persists the specified dynamic assembly to the file-system + + the name of the dynamic assembly to persist + + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + Removes all registered s. + + + + + A utility class for raising events in a generic and consistent fashion. + + Rick Evans + + + + Create a new EventRaiser instance + + + + + Raises the event encapsulated by the supplied + , passing the supplied + to the event. + + The event to be raised. + The arguments to the event. + a map of sink/exception entries that occurred during event raising + + + + Invokes the supplied , passing the supplied + to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Raises events defensively. + + +

+ Raising events defensively means that as the raised event is passed to each handler, + any thrown by a handler will be caught and silently + ignored. +

+
+ Rick Evans +
+ + + Defensively invokes the supplied , passing the + supplied to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Implement this interface to create your own, delegating + and set them using + + + + + + + + + + + A strategy for handling errors. This is especially useful for handling + errors that occur during asynchronous execution as in such cases it may not be + possible to throw the error to the original caller. + + Mark Fisher + Mark Pollack (.NET) + + + + Handles the error. + + The exception. + + + + Utility methods for IO handling + + + + + Copies one stream into another. + (Don't forget to call on the destination stream!) + + + Does not close the input stream! + + + + + Reads a stream into a byte array. + + + Does not close the input stream! + + + + + Various utility methods relating to numbers. + + +

+ Mainly for internal use within the framework. +

+
+ Aleksandar Seovic +
+ + + Determines whether the supplied is an integer. + + The object to check. + + if the supplied is an integer. + + + + + Determines whether the supplied is a decimal number. + + The object to check. + + if the supplied is a decimal number. + + + + + Determines whether the supplied is of numeric type. + + The object to check. + + true if the specified object is of numeric type; otherwise, false. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to a number. + + The object to check. + + true if the specified object is decimal number; otherwise, false. + + + + + Is the supplied equal to zero (0)? + + The number to check. + + id the supplied is equal to zero (0). + + + + + Negates the supplied . + + The number to negate. + The supplied negated. + + If the supplied is not a supported numeric type. + + + + + Returns the bitwise not (~) of the supplied . + + The number. + The value of ~. + + If the supplied is not a supported numeric type. + + + + + Bitwise ANDs (&) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise ORs (|) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise XORs (^) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Adds the specified numbers. + + The first number. + The second number. + + + + Subtracts the specified numbers. + + The first number. + The second number. + + + + Multiplies the specified numbers. + + The first number. + The second number. + + + + Divides the specified numbers. + + The first number. + The second number. + + + + Calculates remainder for the specified numbers. + + The first number (dividend). + The second number (divisor). + + + + Raises first number to the power of the second one. + + The first number. + The second number. + + + + Coerces the types so they can be compared. + + The right. + The left. + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Helper methods with regard to objects, types, properties, etc. + + +

+ Not intended to be used directly by applications. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The instance for this class. + + + + + An empty object array. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Instantiates the type using the assembly specified to load the type. + + This is a convenience in the case of needing to instantiate a type but not + wanting to specify in the string the version, culture and public key token. + The assembly. + Name of the type. + + + If the or is + + + If cannot load the type from the assembly or the call to InstantiateType(Type) fails. + + + + + Convenience method to instantiate a using + its no-arg constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The to instantiate* + + A new instance of the . + + If the is + + + If the is an abstract class, an interface, + an open generic type or does not have a public no-argument constructor. + +
+ + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. + + + + + Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains + open generic type parameters. + + The type. + + + + Convenience method to instantiate a using + the given constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The constructor to use for the instantiation. + + + The arguments to be passed to the constructor. + + A new instance. + + If the is + + + If the 's declaring type is an abstract class, + an interface, an open generic type or does not have a public no-argument constructor. + +
+ + + Checks whether the supplied is not a transparent proxy and is + assignable to the supplied . + + +

+ Neccessary when dealing with server-activated remote objects, because the + object is of the type TransparentProxy and regular is testing for assignable + types does not work. +

+

+ Transparent proxy instances always return when tested + with the 'is' operator (C#). This method only checks if the object + is assignable to the type if it is not a transparent proxy. +

+
+ The target to be checked. + The value that should be assigned to the type. + + if the supplied is not a + transparent proxy and is assignable to the supplied . + +
+ + + Determine if the given is assignable from the + given value, assuming setting by reflection and taking care of transparent proxies. + + +

+ Considers primitive wrapper classes as assignable to the + corresponding primitive types. +

+

+ For example used in an object factory's constructor resolution. +

+
+ The target . + The value that should be assigned to the type. + True if the type is assignable from the value. +
+ + + Check if the given represents a + "simple" property, + i.e. a primitive, a , a + , or a corresponding array. + + +

+ Used to determine properties to check for a "simple" dependency-check. +

+
+ + The to check. + +
+ + + Check if the given class represents a primitive array, + i.e. boolean, byte, char, short, int, long, float, or double. + + + + + Determines whether the specified array is null or empty. + + The array to check. + + true if the specified array is null empty; otherwise, false. + + + + + Determine if the given objects are equal, returning + if both are respectively + if only one is . + + The first object to compare. + The second object to compare. + + if the given objects are equal. + + + + + Return as hash code for the given object; typically the value of + {@link Object#hashCode()}. If the object is an array, + this method will delegate to any of the nullSafeHashCode + methods for arrays in this class. If the object is null, + this method returns 0. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + If the supplied is . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + If the supplied is . + + + + + Gets the qualified name of the given method, consisting of + fully qualified interface/class name + "." method name. + + The method. + qualified name of the method. + + + + Return a String representation of an object's overall identity. + + The object (may be null). + The object's identity as String representation, + or an empty String if the object was null + + + + + Gets a hex String form of an object's identity hash code. + + The obj. + The object's identity code in hex notation + + + + Support matching of file system paths in a manner similar to that of the + NAnt FileSet. + + +

+ Any (back)slashes are converted to forward slashes. +

+
+ + + // true + PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); + PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); + PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); + // false + PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); + + + Federico Spinazzi +
+ + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + should the match consider the case + + if the path is matched by the pattern; + otherwise . + + + + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + + if the path is matched by the pattern; + otherwise . + + + + + Replaces back(slashes) with forward slashes. + + + The path or the pattern to modify. + + A forward-slashed string. + + + + Helper method to convert a NAnt-like pattern into the + appropriate pattern for a regular expression. + + The NAnt-like pattern. + A regex-compatible pattern. + + + + Creates a new instance of the class. + + +

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

+
+
+ + Utility methods for simple pattern matching, in particular for + Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. + + Juergen Hoeller + Mark Pollack + + + Match a String against the given pattern, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the pattern to match against + + the String to match + + whether the String matches the given pattern + + + + Match a String against the given patterns, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the patterns to match against + + the String to match + + whether the String matches any of the given patterns + + + + + An implementation of the Java Properties class. + + + For the complete syntax see java.util.Properties JavaDoc. + This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. + + + key1 = value + key2: + key3 + + will result in the name/value pairs: + + key1:="value" + key2:=string.Empty + key3:=<null> + + note, that to specify a null value, the key must not be followed by any character except newline. + + + Simon White + + + + Creates an empty property list with no default values. + + + + + Creates a property list with the specified initial properties. + + The initial properties. + + + + Reads a property list (key and element pairs) from the input stream. + + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + The text reader to load from. + + + + Reads a property list (key and element pairs) from the input stream. + + the dictionary to put it in + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + the dictionary to put it in + The text reader to load from. + + + + Strips whitespace from the front of the specified string. + + The string. + The string with all leading whitespace removed. + + + + Splits the specified string into a key / value pair. + + The line to split. + An array containing the key / value pair. + + + + Searches for the property with the specified key in this property list. + + The key. + The property, or null if the key was not found. + + + + Searches for the property with the specified key in this property list. + + The key. + + The default value to be returned if the key is not found. + + The property, or the default value. + + + + Writes this property list out to the specified stream. + + The stream to write to. + + + + Sets the specified property key / value pair. + + The key. + The value. + + + + Writes the properties in this instance out to the supplied stream. + + The stream to write to. + Arbitrary header information. + + + + Removes the key / value pair identified by the supplied key. + + + The key identifying the key / value pair to be removed. + + + + + Adds the specified key / object pair to this collection. + + The key. + The value. + + + + Adds the specified key / object pair to this collection. + + + + + Various reflection related methods that are missing from the standard library. + + Rod Johnson + Juergen Hoeller + Aleksandar Seovic (.NET) + Stan Dvoychenko (.NET) + Bruno Baia (.NET) + + + + Convenience value that will + match all private and public, static and instance members on a class + in a case inSenSItivE fashion. + + + + + Avoid BeforeFieldInit problem + + + + + Checks, if the specified type is a nullable + + + + + Returns signature for the specified , method name and argument + s. + + The the method is in. + The method name. + + The argument s. + + The method signature. + + + + Returns method for the specified , method + name and argument + s. + + + Searches with BindingFlags + When dealing with interface methods, you probable want to 'normalize' method references by calling + . + + + + The target to find the method on. + + The method to find. + + The argument s. May be + if the method has no arguments. + + The target method. + + + + + Returns method for the specified , method + name and argument + s. + + + Searches with BindingFlags + When dealing with interface methods, you probable want to 'normalize' method references by calling + . + + + + The target to find the method on. + + The method to find. + + The argument s. May be + if the method has no arguments. + + Number of Generic Arguments in the method + The target method. + + + + + Resolves a given to the representing the actual implementation. + + + see article How To Get an Explicit Interface Implementation Method. + + a + the type to lookup + the representing the actual implementation method of the specified + + + + Returns an array of parameter s for the specified method + or constructor. + + The method (or constructor). + An array containing the parameter s. + + If is . + + + + + Returns an array of parameter s for the + specified parameter info array. + + The parameter info array. + An array containing parameter s. + + If is or any of the + elements is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The method. + An array containing the parameter names. + + If is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The parameter info array. + An array containing parameter names. + + If is or any of the + elements is . + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the type of method (used for exception reporting only) + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of constructors, selects the constructor having an exact match on the given ' types. + + the list of constructors to choose from + the arguments to the method + the constructor matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + Packages arguments into argument list containing parameter array as a last argument. + + Argument vaklues to package. + Total number of oarameters. + Type of the param array element. + Packaged arguments. + + + + Convenience method to convert an interface + to a array that contains + all the interfaces inherited and the specified interface. + + The interface to convert. + An array of interface s. + + If the specified is not an interface. + + + If is . + + + + + Is the supplied the default indexer for the + supplied ? + + + The name of the property on the supplied to be checked. + + + The to be checked. + + + if the supplied is the + default indexer for the supplied . + + + If the supplied is . + + + + + Is the supplied declared on one of these interfaces? + + The method to check. + The array of interfaces we want to check. + + if the method is declared on one of these interfaces. + + + If any of the s specified is not an interface. + + + If or any of the specified interfaces is + . + + + + + Returns the default value for the specified + + +

+ Follows the standard .NET conventions for default values where + relevant; for example, all numeric types default to the value + 0. +

+
+ + The to return default value for. + + + The default value for the specified . + + + If the supplied is an enumerated type that + has no values. + +
+ + + Returns an array consisting of the default values for the supplied + . + + + The array of s to return default values for. + + + An array consisting of the default values for the supplied + . + + + If any of the elements in the supplied + array is an enumerated type that has no values. + + + + + + Checks that the parameter s of the + supplied match the parameter + s of the supplied + . + + The method to be checked. + + The array of parameter s to check against. + + + if the parameter s + match. + + + + + Returns an array containing the s of the + objects in the supplied array. + + + The objects array for which the corresponding s + are needed. + + + An array containing the s of the objects + in the supplied array; this array will be empty (but not + if the supplied + is null or has no elements. + + +

+ [C#]
+ Given an array containing the following objects, + [83, "Foo", new object ()], the + array returned from this method call would consist of the following + elements... + [Int32, String, Object]. +

+
+
+ + + Given the return its representation as + it would appear in the source code files. + + + Largely intended to handle generic types where .ToString() will typically return: + "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" + and this method will instead return: + "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" + + The type. + Friendly string representing the Type + + + + Does the given and/or it's superclasses + have at least one or more methods with the given name (with any + argument types)? + + +

+ Includes non-public methods in the methods searched. +

+
+ + The to be checked. + + + The name of the method to be searched for. Case inSenSItivE. + + + if the given or / and it's + superclasses have at least one or more methods (with any argument types); + if not, or either of the parameters is . + +
+ + + Within , counts the number of overloads for the method with the given (case-insensitive!) + + The type to be searched + the name of the method for which overloads shall be counted + The number of overloads for method within type + + + + Creates a . + + +

+ Note that if a non- + is supplied, any read write properties exposed by the + will be used to overwrite values that may have been passed in via the + . That is, the will be used + to initialize the custom attribute, and then any read-write properties on the + will be plugged in. +

+
+ + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + If the parameter is . + + + If the parameter is not a + that derives from the class. + + +
+ + + Creates a . + + + The desired . + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + + + Creates a . + + + The source attribute to copy properties from. + + A custom attribute builder. + + If the supplied is + . + + + + + Creates a . + + + The desired . + + A custom attribute builder. + + + + Creates a . + + + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + A custom attribute builder. + + + + Creates a . + + + The to create + the custom attribute builder from. + + A custom attribute builder. + + + + Calculates and returns the list of attributes that apply to the + specified type or method. + + The type or method to find attributes for. + + A list of custom attributes (CustomAttributeData or Attribute instances) + that should be applied to type or method. + + + + + Tries to find matching methods in the specified + for each method in the supplied list. + + + The to look for matching methods in. + + The methods to match. + + A flag that specifies whether to throw an exception if a matching + method is not found. + + A list of the matched methods. + + If either of the or + parameters are . + + + + + Returns the of the supplied + . + + +

+ If the is a + instance, the return value of this method call with be the + parameter cast to a + . If the is + anything other than a , the return value + will be the result of invoking the 's + method. +

+
+ + A or instance. + + + The argument if it is a + or the result of invoking + on the argument if it + is an . + + + If the is . + +
+ + + Unwraps the supplied + and returns the inner exception preserving the stack trace. + + + The to unwrap. + + The unwrapped exception. + + + + Is the supplied can be accessed outside the assembly ? + + The type to check. + + if the type can be accessed outside the assembly; + Otherwise . + + + + + Determines whether the specified type is nullable. + + The type. + + true if the specified type is ullable]; otherwise, false. + + + + + Is the supplied can be accessed + from the supplied friendly assembly ? + + The type to check. + The friendly assembly name. + + if the type can be accessed + from the supplied friendly assembly; Otherwise . + + + + + Gets all of the interfaces implemented by + the specified . + + + The object to get the interfaces of. + + + All of the interfaces implemented by the + . + + + + + Returns the explicit that is the root cause of an exception. + + + If the InnerException property of the current exception is a null reference + or a , returns the current exception. + + The last exception thrown. + + The first explicit exception thrown in a chain of exceptions. + + + + + Copies all fields from one object to another. + + + The types of both objects must be related. This means, that either of the following is true: + + fromObject.GetType() == toObject.GetType() + fromObject.GetType() is derived from toObject.GetType() + toObject.GetType() is derived from fromObject.GetType() + + + The source object + The object, who's fields will be populated with values from the source object + If the object's types are not related + + + + Convenience method that uses reflection to return the value of a non-public field of a given object. + + Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. + The instance of the object from which to retrieve the field value. + Name of the field on the object from which to retrieve the value. + + + + + Convenience method that uses reflection to set the value of a non-public field of a given object. + + Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. + The instance of the object from which to set the field value. + Name of the field on the object to which to set the value. + The field value to set. + + + + Creates a . + + Bruno Baia + + + + Creates a new instance of the + class. + + The custom attribute type. + + + + Creates a new instance of the + class. + + The custom attribute type. + The custom attribute constructor arguments. + + + + Adds the specified values to the constructor argument list + used to create the custom attribute. + + An array of argument values. + + + + Adds a property value to the custom attribute. + + The property name. + The property value. + + + + Creates the . + + The created . + + + + Utility class to be used from within this assembly for executing security critical code + NEVER EVER MAKE THIS PUBLIC! + + Erich Eichinger + + + + Miscellaneous utility methods. + + +

+ Mainly for internal use within the framework. +

+
+ Rod Johnson + Juergen Hoeller + Keith Donald + Aleksandar Seovic (.NET) + Mark Pollack (.NET) + Rick Evans (.NET) + Erich Eichinger (.NET) +
+ + + The string that signals the start of an Ant-style expression. + + + + + The string that signals the end of an Ant-style expression. + + + + + An empty array of instances. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + An array of the tokens. +
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + + + Pairs of quote characters. within a pair of quotes are ignored + + An array of the tokens. +
+ + + Convert a CSV list into an array of s. + + + Values may also be quoted using doublequotes. + + A CSV list. + + An array of s, or the empty array + if is . + + + + + Take a which is a delimited list + and convert it to a array. + + +

+ If the supplied is a + or zero-length string, then a single element + array composed of the supplied + will be + eturned. If the supplied + is , then an empty, + zero-length array will be returned. +

+
+ + The to be parsed. + + + The delimeter (this will not be returned). Note that only the first + character of the supplied is used. + + + An array of the tokens in the list. + +
+ + + Convenience method to return an + as a delimited + (e.g. CSV) . + + + The to parse. + + + The delimiter to use (probably a ','). + + The delimited string representation. + + + + Convenience method to return an + as a CSV + . + + + The to display. + + The delimited string representation. + + + + Convenience method to return an array as a CSV + . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + + + Convenience method to return a + array as a delimited (e.g. CSV) . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + The delimiter to use (probably a ','). + + + + Checks if a string has length. + + The string to check, may be . + + + if the string has length and is not + . + + + + StringUtils.HasLength(null) = false + StringUtils.HasLength("") = false + StringUtils.HasLength(" ") = true + StringUtils.HasLength("Hello") = true + + + + + + Checks if a has text. + + +

+ More specifically, returns if the string is + not , it's is > + zero (0), and it has at least one non-whitespace character. +

+
+ + The string to check, may be . + + + if the is not + , + > zero (0), and does not consist + solely of whitespace. + + + + StringUtils.HasText(null) = false + StringUtils.HasText("") = false + StringUtils.HasText(" ") = false + StringUtils.HasText("12345") = true + StringUtils.HasText(" 12345 ") = true + + +
+ + + Checks if a is + or an empty string. + + +

+ More specifically, returns if the string is + , it's is equal + to zero (0), or it is composed entirely of whitespace + characters. +

+
+ + The string to check, may (obviously) be . + + + if the is + , has a length equal to zero (0), or + is composed entirely of whitespace characters. + + + + StringUtils.IsNullOrEmpty(null) = true + StringUtils.IsNullOrEmpty("") = true + StringUtils.IsNullOrEmpty(" ") = true + StringUtils.IsNullOrEmpty("12345") = false + StringUtils.IsNullOrEmpty(" 12345 ") = false + + +
+ + + Returns , if it contains non-whitespaces. null otherwise. + + + + + Strips first and last character off the string. + + The string to strip. + The stripped string. + + + + Returns a list of Ant-style expressions from the specified text. + + The text to inspect. + + A list of expressions that exist in the specified text. + + + If any of the expressions in the supplied + is empty (${}). + + + + + Replaces Ant-style expression placeholder with expression value. + + +

+ +

+
+ The string to set the value in. + The name of the expression to set. + The expression value. + + A new string with the expression value set; the + value if the supplied + is , has a length + equal to zero (0), or is composed entirely of whitespace + characters. + +
+ + + Surrounds (prepends and appends) the string value of the supplied + to the supplied . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The prefix and suffix that respectively will be prepended and + appended to the target . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + The surrounded string. +
+ + + Surrounds (prepends and appends) the string values of the supplied + and to the supplied + . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The value that will be prepended to the . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + + The value that will be appended to the . If this value + is not a value, it's attendant + value will be used. + + The surrounded string. +
+ + + Converts escaped characters (for example "\t") within a string + to their real character. + + The string to convert. + The converted string. + + + + Utility class containing miscellaneous system-level functionality. + + Aleksandar Seovic + + + + Registers assembly resolver that iterates over the + assemblies loaded into the current + in order to find an assembly that cannot be resolved. + + + This method has to be called if you need to serialize dynamically + generated types in transient assemblies, such as Spring AOP proxies, + because standard .NET serialization engine always tries to load + assembly from the disk. + + + + + Returns true if running on Mono + + Tests for the presence of the type Mono.Runtime + + + + Returns true if running on CLR 4.0 under InProc SxS mode + + + + + Gets the thread id for the current thread. Use thread name is available, + otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and + CurrentThread.ManagedThreadId otherwise. + + The thread id. + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Creates a new TextPositionInfo instance. + + + + + Creates a new TextPositionInfo instance, copying values from another instance. + + + + + The filename related to this text position + + + + + The line number related to this text position + + + + + The line position related to this text position + + + + + UniqueKey allows for generating keys unique to a type or particular instance and a partial name, + that can e.g. be used as keys in . + + + // shows usage type-scoped keys + UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); + UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); + + HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; + Assert.AreEqual( "some value unique for class A having key 'myKey'", value); + + HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; + Assert.AreEqual( "some value unique for class B having key 'myKey'", value); + + + + + Initialize a new instance of from its string representation. + See and See for details. + + The string representation of the new instance. + + + + Compares this instance to another. + + + + + Compares this instance to another. + + + + + Returns the hash code for this key. + + + + + + Returns a string representation of this key. + + + + + Creates a new key instance unique to the given instance. + + The instance the key shall be unique to + The partial key to be made unique + + + If is of type + + + + Creates a new key instance unique to the given type. + + The type the key shall be unique to + The partial key to be made unique + + + + Returns a key unique for the given instance. + + The instance the key shall be unique to + The partial key to be made unique + A key formatted as typename[instance-id].partialkey + + + + Returns a key unique for the given type. + + The type the key shall be unique to + The partial key to be made unique + A key formatted as typename.partialkey + + + + XML utility methods. + + Aleksandar Seovic + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + to be used for resolving external references + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + + A non-validating implementation. + + + + + Implementation of that adds error message + to the validation errors container. + + Aleksandar Seovic + + + + Abstract base class that should be extended by all + validation actions. + + +

+ This class implements template Execute method + and defines OnValid and OnInvalid methods that + can be overriden + by specific validation actions. +

+
+ Aleksandar Seovic +
+ + + An action that should be executed after validator is evaluated. + + +

+ This interface allows us to define the actions that should be executed + after validation in a generic fashion. +

+

+ For example, addition of error messages to validation errors collection + is performed by one specific implementation of this interface, . +

+
+ Aleksandar Seovic +
+ + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Initializes a new instance of the class. + + + + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is not valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Evaluates 'when' expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + Error message resource identifier. + Names of the error providers this message should be added to. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Resolves the error message. + + Validation context to resolve message parameters against. + Additional context parameters. + Resolved error message + + + + Resolves the message parameters. + + List of parameters to resolve. + Validation context to resolve parameters against. + Additional context parameters. + Resolved message parameters. + + + + Sets the expressions that should be resolved to error message parameters. + + The expressions that should be resolved to error message parameters. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression that defines the exception to throw when the validator is not valid. + + + + Initializes a new instance of the class with an expression + that defines the exception to throw. + + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the exception to throw + + The throws. + + + + Implementation of that allows you + to define Spring.NET expressions that should be evaluated after + validation. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression to execute when validator is valid. + + The expression to execute when validator is valid. + + + + Gets or sets the expression to execute when validator is not valid. + + The expression to execute when validator is not valid. + + + + Implementation of the custom configuration parser for validator definitions. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parses the validator definition. + + Validator's identifier. + The element to parse. + The parser helper. + Validator object definition. + + + + Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with + the parsed value. + + + + + Parses and potentially registers a validator. + + + Only validators that have id attribute specified are registered + as separate object definitions within application context. + + Validator XML element. + The parser helper. + Validator object definition. + + + + Gets the name of the object type for the specified element. + + The element. + The name of the object type. + + + + Creates an error message action based on the specified message element. + + The message element. + The parser helper. + The error message action definition. + + + + Creates a generic action based on the specified element. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Creates object definition for the validator reference. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Evaluates validator test using condition evaluator. + + Aleksandar Seovic + + + + Base class that defines common properties for all single validators. + + +

+ Custom single validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class that defines common properties for all validators. + + +

+ Custom validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + An object that can validate application-specific objects. + + +

+ The primary motivation for this interface is to enable validation to be + decoupled from the (user) interface and placed in business objects. +

+

+ Application developers writing their own custom + implementations will + typically not implement this interface directly. In most cases, custom + validators woud be better served deriving from the + class, with the + custom validation ligic being implemented in an override of the + + + template method. +

+
+ Aleksandar Seovic + +
+ + + Validates the specified object. + + The object to validate. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Evaluates when expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Processes the error messages. + + Whether validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Gets or sets the validation actions. + + The actions that should be executed after validation. + + + + Creates a new instance of the validator without any + and criteria + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates test object. + + Object to validate. + True if specified object is valid, False otherwise. + + + + Evaluates test expression. + + Root context to use for expression evaluation. + Additional context parameters. + Result of the test expression evaluation, or validation context if test is null. + + + + Gets or sets the test expression. + + The test expression. + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Evaluates the test using condition evaluator. + + +

+ Test can be any logical expression that is supported by the Spring.NET logical + expression evaluation engine, and can use any variables that can be resolved + by the variable resolver used by the validation engine. +

+
+ The object to validate. + + if the supplied is valid. + +
+ + + Perform credit card validations. + + + By default, all supported card types are allowed. You can specify + which credit card type validator should be used by setting + the value of property to a concrete + instance. + + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid credit card number. + + The object to validate. + + if the supplied is valid + credit card number. + + + + + Checks if the is a valid credit card number. + + + The card number to validate. + + + true if the card number is valid. + + + + + Validates card number with the specified validator. + + + Credit card number to validate. + + + true if credit card number is a valid number of credit card type specified. + + + + + Checks for a valid credit card number. + + + Credit Card Number. + + + true if the card number passes the LuhnCheck. + + + + + Credit card type validator to use. + + + Can be concrete implementations of + interface. The following are available implementations: + , , , + . + + + + + CreditCardType interface defines how validation is performed + for one type/brand of credit card. + + + + + Returns true if the card number matches this type of + credit card. + + + The card number, never null. + + + true if the number matches. + + + + + Visa credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a visa number. + + + + + American Express credit card type validation support. + + + + + Indicates, wheter the given credit card number matches an amex number. + + + + + Discover credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a discover number. + + + + + Mastercard credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a mastercard number. + + + + + Perform email validations. + + +

+ This implementation is not guaranteed to catch all possible errors in an + email address. For example, an address like nobody@noplace.nowhere will + pass validator, even though there is no TLD "nowhere". + + Goran Milosavljevic + + +

+ Creates a new instance of the EmailValidator class. + +
+ + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid e-mail address. + + The object to validate. + + if the supplied is valid + e-mail address. + + + + + Regular expression used for validation of object passed to this . + + + + + Validates that the object is valid ISBN-10 or ISBN-13 value. + + Goran Milosavljevic + + + + Creates a new instance of the ISBNValidator class. + + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the ISBN-10 or + ISBN-13 validation rules. + + The object to validate. + + if the supplied is valid ISBN. + + + + + Validates against ISBN-10 or ISBN-13 validation + rules. + + + ISBN string to validate. + + + true if is a valid ISBN-10 or ISBN-13 code. + + + + + ISBN-10 consists of 4 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 1-5 characters, second 1-7, third 1-6, + and fourth is 1 digit or an X. + + + + + ISBN-13 consists of 5 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 978 or 979, the second group is + 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. + + + + + Validates that object matches specified regular expression. + + +

+ The test expression must evaluate to a ; + otherwise, an exception is thrown. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Validates an object. + + Object to validate. + + if the supplied + object is valid. + + + If the supplied is not a + + + + + + The regular expression text to match against. + + The regular expression text. + + + + Gets or sets a value indicating whether to do a partial match instead of a full match. + Default is false. + + + + + The for the regular expression evaluation. + + The regular expression evaluation options. + + + + + Validates that required value is not empty. + + +

+ This validator uses following rules to determine if target value is valid: + + + + + + + + + + + + + + + + + + + + + + + + + +
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
+

+

+ You cannot use this validator to validate any value types other than the ones + specified in the table above. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a variable expression that will be evaluated and the object + obtained as a result of this evaluation will be tested using the rules described + in the class overview of the + class. + + The object to validate. + + if the supplied is valid. + + + + + Validates that the value is valid URL. + + Goran Milosavljevic + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the URL validation rules. + + The object to validate. + + if the supplied is valid. + + + + + Regular expression used for validation of object passed to this . + + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one or more of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

Note, that defaults to true for this validator type!

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class for composite validators + + + + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Gets or sets the child validators. + + The validators. + + + + When set true, shortcircuits evaluation. + + + Setting this property true causes the evaluation process to prematurely abort + if the end result is known. Any remaining child validators will not be considered then. + Setting this value false causes implementations to evaluate all child validators, regardless + of the potentially already known result. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + implementation that supports validating collections. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid for all of the objects in the specified collection. +

+

+ You can specify if you want to validate all of the collection elements regardless of the errors by + setting the property to false. +

+

Note, that defaults to true for this validator type!

+

+ If you set the IncludeElementErrors property to true, + ValidationErrors collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. +

+
+ Damjan Tomic + Aleksandar Seovic +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The bool that determines if all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Validates the specified collection of objects. + If the IncludeElementErrors property was set to true, + collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. + + The collection to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Gets or sets the value that indicates whether to validate all elements of the collection + regardless of the errors. + + This is just an alias for property + + + + Gets or sets the value that indicates whether to capture all the errors of the specific + elements of the collection + + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one and only one of the validators in the Validators collection are valid +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

+ By default, this validator group uses == true semantics. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + An interface that validation errors containers have to implement. + + Aleksandar Seovic + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied error . + + +

+ If there are no errors for the supplied , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all error providers. + + + + + Allows developers to specify which validator should be used + to validate method argument. + + Damjan Tomic + Aleksandar Seovic + + + + Creates an attribute instance. + + + The name of the validator to use (must be defined within + Spring application context). + + + + + Gets the name of the validator to use. + + The name of the validator to use. + + + + A container for validation errors. + + +

+ This class groups validation errors by validator names and allows + access to both the complete errors collection and to the errors for a + certain validator. +

+
+ Aleksandar Seovic + Goran Milosavljevic +
+ + + Default constructor. + + + + + This property is reserved, apply the + + to the class instead. + + + An that describes the + XML representation of the object that is produced by + the + method and consumed by the + + method. + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all providers. + + + + + Thrown by the validation advice if the method parameters validation fails. + + Aleksandar Seovic + + + + Creates a new instance of the ValidationException class. + + + + + Creates a new instance of the ValidationException class with + specified validation errors. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the ValidationException class with the + specified message and validation errors. + + + A message about the exception. + + + Validation errors. + + + + + Creates a new instance of the ValidationException 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 ValidationException class with the + specified message, root cause and validation errors. + + + A message about the exception. + + + The root exception that is being wrapped. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Implements object serialization. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Gets validation errors. + + Validation errors. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Represents a reference to an externally defined validator object + + +

+ This class allows validation groups to reference validators that + are defined outside of the group itself. +

+

+ It also allows users to narrow the context for the referenced validator + by specifying value for the Context property. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + The expression that determines if this validator should be evaluated. + + + + + Creates a new instance of the class. + + + The expression that determines if this validator should be evaluated. + + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Gets or sets the name of the referenced validator. + + The name of the referenced validator. + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + 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. + +
+ + diff --git a/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.dll b/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.dll new file mode 100644 index 0000000..943a370 Binary files /dev/null and b/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.dll differ diff --git a/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.pdb b/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.pdb new file mode 100644 index 0000000..684b4b5 Binary files /dev/null and b/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.pdb differ diff --git a/packages/Spring.Core.1.3.2/lib/net40/Spring.Core.xml b/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.xml similarity index 91% rename from packages/Spring.Core.1.3.2/lib/net40/Spring.Core.xml rename to packages/Spring.Core.2.0.1/lib/net45/Spring.Core.xml index a7bd651..fd8f020 100644 --- a/packages/Spring.Core.1.3.2/lib/net40/Spring.Core.xml +++ b/packages/Spring.Core.2.0.1/lib/net45/Spring.Core.xml @@ -1,49291 +1,52934 @@ - - - - Spring.Core - - - - - An abstract implementation that can - be used as base class for concrete implementations. - - Aleksandar Seovic - Erich Eichinger - - - - Defines a contract that all cache implementations have to fulfill. - - Aleksandar Seovic - Erich Eichinger - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method have no expiration time - and default cache priority. - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method use the default - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - If equals , - or is true, this cache - instance's value will be applied. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Actually does the cache implementation specific insert operation into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Gets/Set the Default time-to-live (TTL) for items inserted into this cache. - Used by - - - - - Gets/Sets a value, whether the this cache instance's - shall be applied to all items, regardless of their individual TTL - when is called. - - - - - Gets the number of items in the cache. - - - May be overridden by subclasses for cache-specific efficient implementation. - - - - - Gets a collection of all cache item keys. - - - - - Abstract base class containing shared properties for all cache attributes. - - Aleksandar Seovic - - - - The instance used to parse values. - - - - - - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - The cache key cannot evaluate be null or an empty string. - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the cache key for the item. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - Gets an expression instance that should be evaluated in order - to determine the cache key for the item. - - - An expression instance that should be evaluated in order to determine - the cache key for the item. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether the item should be cached. - - - An expression string that should be evaluated in order to determine - whether the item should be cached. - - - - - Gets an expression instance that should be evaluated in order - to determine whether the item should be cached. - - - An expression instance that should be evaluated in order to determine - whether the item should be cached. - - - - - The amount of time an object should remain in the cache. - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache - formatted to be recognizable by . - - - - - The amount of time an object should remain in the cache (in seconds). - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache (in seconds). - - - - - This attribute should be used to mark methods whose argument(s) - need to be cached. - - -

- This attribute allows application developers to specify that an argument - of the method should be cached, but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheParameterAdvice to - all of the members that have this attribute defined. -

-

- You can specify this attribute multiple times on the same method in order to - cache several method parameters. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark methods whose result - needs to be cached. - - -

- This attribute allows application developers to mark that a result - of the method invocation should be cached, but it will not do any - caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used with methods that return an - in order to cache each item separately. - - -

- This attribute allows application developers to specify that each item - from the collection returned by the method should be cached, - but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark method that should - invalidate one or more cache items when invoked. - - -

- This attribute allows application developers to specify that some - cache items should be evicted from cache when the method is invoked, - but it will not do any eviction by itself. -

-

- In order to actually evict cache items, an application developer - must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression string that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether items should be evicted. - - - An expression string that should be evaluated in order to determine - whether items should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine whether items should be evicted. - - - An expression instance that should be evaluated in order to determine - whether items should be evicted. - - - - - A simple implementation backed by a dictionary that - never expires cache items. - - Aleksandar Seovic - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL) in milliseconds. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - -

DictionarySet is an abstract class that supports the creation of new Set - types where the underlying data store is an IDictionary instance.

- -

You can use any object that implements the IDictionary interface to hold set data. - You can define your own, or you can use one of the objects provided in the Framework. - The type of IDictionary you choose will affect both the performance and the behavior - of the Set using it.

- -

To make a Set typed based on your own IDictionary, simply derive a - new class with a constructor that takes no parameters. Some Set implmentations - cannot be defined with a default constructor. If this is the case for your class, - you will need to override Clone() as well.

- -

It is also standard practice that at least one of your constructors takes an ICollection or - an ISet as an argument.

-
-
- -

A collection that contains no duplicate elements. This class models the mathematical - Set abstraction, and is the base class for all other Set implementations. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - Operator - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - | - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - & - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - ^ - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - - - -
-
- - -

A collection that contains no duplicate elements. This interface models the mathematical - Set abstraction. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns if this set contains no elements. - - - - - A collection that contains no duplicate elements. - - -

- This interface models the mathematical - abstraction. The order of - elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various - methods, and thus is not - guaranteed. -

-

- overrides the - method to test for "equivalency": - whether the two sets contain the same elements. The "==" and "!=" - operators are not overridden by design, since it is often desirable to - compare object references for equality. -

-

- Also, the method is not - implemented on any of the set implementations, since none of them are - truly immutable. This is by design, and it is the way almost all - collections in the .NET framework function. So as a general rule, don't - store collection objects inside - instances. You would typically want to use a keyed - instead. -

-

- None of the implementations in - this library are guaranteed to be thread-safe in any way unless wrapped - in a . -

-

- The following table summarizes the binary operators that are supported - by the class. -

- - - Operation - Description - Method - - - Union (OR) - - Element included in result if it exists in either A OR - B. - - Union() - - - Intersection (AND) - - Element included in result if it exists in both A AND - B. - - InterSect() - - - Exclusive Or (XOR) - - Element included in result if it exists in one, but not both, - of A and B. - - ExclusiveOr() - - - Minus (n/a) - - Take all the elements in A. Now, if any of them exist in - B, remove them. Note that unlike the other operators, - A - B is not the same as B - A. - - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - -

- That is, the element is included if it is in either - or this set. Neither this set nor the input - set are modified during the operation. The return value is a - clone of this set with the extra elements added in. -

-
- A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included if it exists in both sets. The - Intersect() operation does not modify the input sets. It - returns a clone of this set with the appropriate elements - removed. -

-
- A set of elements. - - The intersection of this set with . - -
- - - Performs a "minus" of this set from the - set. - - -

- This returns a set of all the elements in set - , removing the elements that are also in - this set. The original sets are not modified during this operation. - The result set is a clone of this - containing the elements from - the operation. -

-
- A set of elements. - - A set containing the elements from this set with the elements in - removed. - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of this set containing the elements - from the exclusive-or operation. -

-
- A set of elements. - - A set containing the result of - ^ this. - -
- - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains no elements. - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns a clone of the Set instance. This will work for derived Set - classes if the derived class implements a constructor that takes no arguments. - - A clone of this object. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the Set is synchronized across threads. Note that - enumeration is inherently not thread-safe. Use the SyncRoot to lock the - object during enumeration. - - - - - An object that can be used to synchronize this collection to make it thread-safe. - When implementing this, if your object uses a base object, like an IDictionary, - or anything that has a SyncRoot, return that object instead of "this". - - - - - Indicates whether the given instance is read-only or not - - - if the ISet is read-only; otherwise, . - In the default implementation of Set, this property always returns false. - - - - - Provides the storage for elements in the Set, stored as the key-set - of the IDictionary object. Set this object in the constructor - if you create your own Set class. - - - - - Adds the specified element to this set if it is not already present. - - The to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. Needed for - non-generic ISet methods implementation - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - The placeholder object used as the value for the IDictionary instance. - - - There is a single instance of this object globally, used for all Sets. - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - None of the objects based on DictionarySet are synchronized. Use the - SyncRoot property instead. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates wether the Set is read-only or not - - - - - Implements a Set based on a Dictionary (which is equivalent of - non-genric HashTable) This will give the best lookup, add, and remove - performance for very large data-sets, but iteration will occur in no particular order. - - - - - Creates a new set instance based on a Dictinary. - - - - - Creates a new set instance based on a Dictinary and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - -

Implements an immutable (read-only) Set wrapper.

-

Although this is advertised as immutable, it really isn't. Anyone with access to the - basisSet can still change the data-set. So GetHashCode() is not implemented - for this Set, as is the case for all Set implementations in this library. - This design decision was based on the efficiency of not having to Clone() the - basisSet every time you wrap a mutable Set.

-
-
- - - Constructs an immutable (read-only) Set wrapper. - - The Set that is wrapped. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - nothing - is always thrown - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - nothing - is always thrown - - - - Removes all objects from the set. - - is always thrown - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - nothing - is always thrown - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - nothing - is always thrown - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - nothing - is always thrown - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns an object that can be used to synchronize use of the Set across threads. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates that the given instance is read-only - - - - - Implements an ordered Set based on a dictionary. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - A collection of elements that defines the initial set contents. - - - - Represents a read only wrapper around a generic IDictionary. The design pattern - mirrors ReadOnlyCollection, and follows the apparent pattern that write operations - do not throw an exception, but simply make no change to the underlying collection. - - Originally put into the public domain. - http://www.simple-talk.com/community/forums/thread/2263.aspx - - - - Original from Public Domain - Mark Pollack (.NET) - - - - Inner storage for ReadOnlyDictionary - - - - - Easy access to non-generic dictionary API - - - - - Initializes a new instance of the class. - - The dictionary to wrap. - - - - Add does not change a read only Dictionary - - The object to use as the key of the element to add. - The object to use as the value of the element to add. - The is read-only. - - - - Determines whether the contains an element with the specified key. - - The key to locate in the . - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Remove does not change a read only Dictionary, will throw an exception. - - The is read-only. - - - - Tries the get value. - - The key. - The value. - - - - - Add does not change a read only Dictionary - - The object to add to the . - The is read-only. - - - - Clear does not change a read only Dictionary. - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if item is found in the ; otherwise, false. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - arrayIndex is less than 0. - array is null. - array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. - - - - Remove does not change a read only Dictionary. Throws an exception - - The object to remove from the . - - true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . - - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Add does not change a read only Dictionary. Throws an exception. - - The to use as the key of the element to add. - The to use as the value of the element to add. - The is read-only.-or- The has a fixed size. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Remove does not change a read only Dictionary. Throws an exception. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. - - - - Runs when the entire object graph has been deserialized. - - The object that initiated the callback. The functionality for this parameter is not currently implemented. - - - - Populates a with the data needed to serialize the target object. - - The to populate with data. - The destination (see ) for this serialization. - The caller does not have the required permission. - - - - Gets a read only containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the value with the specified key. - Set will throw an exception - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether the is read-only. - - - true if the is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets an containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the with the specified key. Set throws an exception. - - - The is read-only. - if try to set value - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Implements a Set based on a sorted tree. This gives good performance for operations on very - large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration - occurs in order. Elements that you put into this type of collection must implement IComparable, - and they must actually be comparable. You can't mix string and int values, for example. - - - - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree. - - The to use for sorting. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - The to use for sorting. - - - -

Implements a thread-safe Set wrapper. The implementation is extremely conservative, - serializing critical sections to prevent possible deadlocks, and locking on everything. - The one exception is for enumeration, which is inherently not thread-safe. For this, you - have to lock the SyncRoot object for the duration of the enumeration.

-
-
- - - Constructs a thread-safe Set wrapper. - - The Set object that this object will wrap. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot - to synchronize the entire enumeration process. - - - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns , indicating that this object is thread-safe. The exception to this - is enumeration, which is inherently not thread-safe. Use the SyncRoot object to - lock this object for the entire duration of the enumeration. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates whether given instace is read-only or not - - - - - This class provides skeletal implementations of some - operations. - - -

- The implementations in this class are appropriate when the base - implementation does not allow elements. The methods - , - , and - are based on - the , - , and - methods - respectively but throw exceptions instead of indicating failure via - or returns. -

- An implementation that extends this class must - minimally define a method - which does - not permit the insertion of elements, along with methods - , and - . Typically, - additional methods will be overridden as well. If these requirements - cannot be met, consider instead subclassing - }. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - A collection designed for holding elements prior to processing. - - -

- Besides basic operations, - queues provide additional insertion, extraction, and inspection - operations. -

-

- Each of these methods exists in two forms: one throws - an exception if the operation fails, the other returns a special - value (either or , depending on the - operation). The latter form of the insert operation is designed - specifically for use with capacity-restricted - implementations; in most implementations, insert operations cannot - fail. -

-

- Queues typically, but do not necessarily, order elements in a - FIFO (first-in-first-out) manner. Among the exceptions are - priority queues, which order elements according to a supplied - comparator, or the elements' natural ordering, and LIFO queues (or - stacks) which order the elements LIFO (last-in-first-out). - Whatever the ordering used, the head of the queue is that - element which would be removed by a call to - or - . In a FIFO queue, all new - elements are inserted at the tail of the queue. Other kinds of queues may - use different placement rules. Every implementation - must specify its ordering properties. -

-

- The method inserts an - element if possible, otherwise returning . This differs from the - method, which can fail to - add an element only by throwing an exception. The - method is designed for - use when failure is a normal, rather than exceptional occurrence, for example, - in fixed-capacity (or "bounded" queues. -

-

- The - methods remove and - return the head of the queue. Exactly which element is removed from the - queue is a function of the queue's ordering policy, which differs from - implementation to implementation. The - and - methods differ only in their - behavior when the queue is empty: the - method throws an exception, - while the method returns - . -

-

- The and - methods return, but do - not remove, the head of the queue. -

-

- The interface does not define the blocking queue - methods, which are common in concurrent programming. -

-

- implementations generally do not allow insertion - of elements, although some implementations, such as - a linked list, do not prohibit the insertion of . - Even in the implementations that permit it, should - not be inserted into a , as is also - used as a special return value by the - method to - indicate that the queue contains no elements. -

-

- implementations generally do not define - element-based versions of methods - and , but instead inherit the - identity based versions from the class object, because element-based equality - is not always well-defined for queues with the same elements but different - ordering properties. -

-

- Based on the back port of JCP JSR-166. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the class of the supplied prevents it - from being added to this queue. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue - - if this queue is empty -
- - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue. - - If this queue is empty. -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Returns if there are no elements in the , otherwise. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Inserts the specified element into this queue if it is possible - to do so immediately without violating capacity restrictions. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that - it throws an exception if this queue is empty. -

-
- - The head of this queue - - - If this queue is empty. - -
- - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-

- ALso note that this implementation returns the result of - unless the queue - is empty. -

-
- The head of this queue. - - If this queue is empty. - -
- - - Removes all of the elements from this queue. - - -

- The queue will be empty after this call returns. -

-

- This implementation repeatedly invokes - until it - returns . -

-
-
- - - Adds all of the elements in the supplied - to this queue. - - -

- Attempts to - - of a queue to itself result in . - Further, the behavior of this operation is undefined if the specified - collection is modified while the operation is in progress. -

-

- This implementation iterates over the specified collection, - and adds each element returned by the iterator to this queue, in turn. - An exception encountered while trying to add an element (including, - in particular, a element) may result in only some - of the elements having been successfully added when the associated - exception is thrown. -

-
- - The collection containing the elements to be added to this queue. - - - if this queue changed as a result of the call. - - - If the supplied or any one of its elements are . - - - If the collection is the current or - the collection size is greater than the queue capacity. - -
- - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns if there are no elements in the , otherwise. - - - - - Returns the current capacity of this queue. - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. - - Erich Eichinger - - - - Creates a case-insensitive hashtable using . - - - - - Creates a case-insensitive hashtable using the given . - - the to calculate the hashcode - - - - Creates a case-insensitive hashtable using the given , initially - populated with entries from another dictionary. - - the dictionary to copy entries from - the to calculate the hashcode - - - - Initializes a new, empty instance of the class that is serializable using the specified and objects. - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the object. - info is null. - - - - Implements the interface and returns the data needed to serialize the . - - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the . - info is null. - - - - Calculate the hashcode of the given string key, using the configured culture. - - - - - - - Compares two keys - - - - - Creates a shallow copy of the current instance. - - - - - is an - class that supports the creation of new - types where the underlying data - store is an instance. - - -

- You can use any object that implements the - interface to hold set - data. You can define your own, or you can use one of the objects - provided in the framework. The type of - you - choose will affect both the performance and the behavior of the - using it. -

-

- This object overrides the method, - but not the method, because - the class is mutable. - Therefore, it is not safe to use as a key value in a dictionary. -

-

- To make a typed based on your - own , simply derive a new - class with a constructor that takes no parameters. Some - implmentations cannot be defined - with a default constructor. If this is the case for your class, you - will need to override clone as well. -

-

- It is also standard practice that at least one of your constructors - takes an or an - as an argument. -

-
- -
- - - A collection that contains no duplicate elements. - - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs a "union" of two sets, where all the elements in both are - present. - - -

- That is, the element is included if it is in either - or . The return - value is a clone of one of the sets ( - if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. -

-
- A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - -
- - - Performs a "union" of two sets, where all the elements in both are - present. - - A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included only if it exists in both - and . Neither input - object is modified by the operation. The result object is a - clone of one of the input objects ( - if it is not ) containing the elements from - the intersect operation. -

-
- A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs a "minus" of set from set - . - - -

- This returns a set of all the elements in set - , removing the elements that are also in - set . The original sets are not modified - during this operation. The result set is a clone of set - containing the elements from the operation. -

-
- A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - -
- - - Performs a "minus" of set from set - . - - A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of one of the sets ( - if it is not ) - containing the elements from the exclusive-or operation. -

-
- A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Returns a clone of the - instance. - - -

- This will work for derived - classes if the derived class implements a constructor that takes no - arguments. -

-
- A clone of this object. -
- - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - This method will test the - against another for - "equality". - - -

- In this case, "equality" means that the two sets contain the same - elements. The "==" and "!=" operators are not overridden by design. - If you wish to check for "equivalent" - instances, use - Equals(). If you wish to check to see if two references are - actually the same object, use "==" and "!=". -

-
- - A object to compare to. - - - if the two sets contain the same elements. - -
- - - Gets the hashcode for the object. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - -

- When implementing this, if your object uses a base object, like an - , or anything that has - a SyncRoot, return that object instead of "this". -

-
- - An object that can be used to synchronize this collection to make - it thread-safe. - -
- - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Provides the storage for elements in the - , stored as the key-set - of the object. - - -

- Set this object in the constructor if you create your own - class. -

-
-
- - - The placeholder object used as the value for the - instance. - - - There is a single instance of this object globally, used for all - s. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Implements an based on a - hash table. - - -

- This will give the best lookup, add, and remove performance for very - large data-sets, but iteration will occur in no particular order. -

-
- -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class, and - initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an that automatically - changes from a list based implementation to a hashtable based - implementation when the size reaches a certain threshold. - - -

- This is good if you are unsure about whether you data-set will be tiny - or huge. -

- - Because this uses a dual implementation, iteration order is not - guaranteed! - -
- -
- - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size, and initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an immutable (read-only) - wrapper. - - -

- Although this class is advertised as immutable, it really isn't. - Anyone with access to the wrapped - can still change the data. So - is not implemented for this , as - is the case for all - implementations in this library. This design decision was based on the - efficiency of not having to clone the wrapped - every time you wrap a mutable - . -

-
-
- - - Constructs an immutable (read-only) - wrapper. - - - The that is to be wrapped. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - - Removes all objects from this set. - - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the - instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - Simple linked list implementation. - - Simon White - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class that contains all - elements of the specified list. - - - A list of elements that defines the initial contents. - - - - - Removes the object at the specified index. - - The lookup index. - - If the specified is greater than the - number of objects within the list. - - - - - Inserts an object at the specified index. - - The lookup index. - The object to be inserted. - - If the specified is greater than the - number of objects within the list. - - - - - Removes the first instance of the specified object found. - - The object to remove - - - - Returns if this list contains the specified - element. - - The element to look for. - - if this list contains the specified element. - - - - - Removes all objects from the list. - - - - - Returns the index of the first instance of the specified - found. - - The object to search for - - The index of the first instance found, or -1 if the element was not - found. - - - - - Adds the specified object to the end of the list. - - The object to add - The index that the object was added at. - - - - Adds all of the elements of the supplied - list to the end of this list. - - The list of objects to add. - - - - Checks whether the list can be modified. - - - If the list cannot be modified. - - - - - Validates the specified index. - - The lookup index. - - If the index is invalid. - - - - - Returns the node at the specified index. - - The lookup index. - The node at the specified index. - - If the specified is greater than the - number of objects within the list. - - - - - Returns the node (and index) of the first node that contains - the specified value. - - The value to search for. - - The node, or if not found. - - - - - Removes the specified node. - - The node to be removed. - - - - Copies the elements in this list to an array. - - -

- The type of array needs to be compatible with the objects in this - list, obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - - - If the supplied is . - - - If the supplied is less than zero - or is greater than the length of . - - - If the supplied is of insufficient size. - -
- - - Gets an enumerator for the elements in the - . - - -

- Enumerators are fail fast. -

-
- - An over the elements - in the . - -
- - - Is list read only? - - - if the list is read only. - - - - - Returns the node at the specified index. - - -

- This is the indexer for the - class. -

-
- -
- - - Is the list a fixed size? - - - if the list is a fixed size list. - - - - - Returns if the list is synchronized across - threads. - - - - This implementation always returns . - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - The number of objects within the list. - - - - - An object that can be used to synchronize this - to make it thread-safe. - - - An object that can be used to synchronize this - to make it thread-safe. - - - - - Implements a based on a list. - - -

- Performance is much better for very small lists than either - or . - However, performance degrades rapidly as the data-set gets bigger. Use a - instead if you are not sure your data-set - will always remain very small. Iteration produces elements in the order they were added. - However, element order is not guaranteed to be maintained by the various - mathematical operators. -

-
-
- - - Creates a new set instance based on a list. - - - - - Creates a new set instance based on a list and initializes it based on a - collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Thrown when an element is requested from an empty . - - Griffin Caprio - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - An unbounded priority based on a priority - heap. This queue orders elements according to an order specified - at construction time, which is specified either according to their - natural order (see , or according to a - , depending on which constructor is - used. A priority queue does not permit elements. - A priority queue relying on natural ordering also does not - permit insertion of non-comparable objects (doing so will result - . - -

- The head of this queue is the lowest element - with respect to the specified ordering. If multiple elements are - tied for lowest value, the head is one of those elements -- ties are - broken arbitrarily. - -

- A priority queue is unbounded, but has an internal - capacity governing the size of an array used to store the - elements on the queue. It is always at least as large as the queue - size. As elements are added to a priority queue, its capacity - grows automatically. The details of the growth policy are not - specified. - -

- This class and its enumerator implement all of the - optional methods of the and - interfaces. - The enumerator provided in method - is not guaranteed to traverse the elements of the PriorityQueue in any - particular order. - -

- Note that this implementation is NOT synchronized. - Multiple threads should not access a - instance concurrently if any of the threads modifies the list - structurally. Instead, use the thread-safe PriorityBlockingQueue. -

- Josh Bloch - Griffin Caprio (.NET) -
- - - Priority queue represented as a balanced binary heap: the two children - of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is - ordered by comparator, or by the elements' natural ordering, if - comparator is null: For each node n in the heap and each descendant d - of n, n <= d. - - The element with the lowest value is in queue[1], assuming the queue is - nonempty. (A one-based array is used in preference to the traditional - zero-based array to simplify parent and child calculations.) - - queue.length must be >= 2, even if size == 0. - - - - The number of elements in the priority queue. - - - - The comparator, or null if priority queue uses elements' - natural ordering. - - - - - The number of times this priority queue has been - structurally modified. - - - - - Creates a with the default initial capacity - (11) that orders its elements according to their natural - ordering (using ). - - - - - Creates a with the specified initial capacity - that orders its elements according to their natural ordering - (using ). - - the initial capacity for this priority queue. - - if is less than 1. - - - - Creates a with the specified initial capacity - that orders its elements according to the specified comparator. - - the initial capacity for this priority queue. - the comparator used to order this priority queue. - If then the order depends on the elements' natural ordering. - - if is less than 1. - - - - Creates a containing the elements in the - specified collection. The priority queue has an initial - capacity of 110% of the size of the specified collection or 1 - if the collection is empty. If the specified collection is an - instance of a , the priority queue will be sorted - according to the same comparator, or according to its elements' - natural order if the collection is sorted according to its - elements' natural order. Otherwise, the priority queue is - ordered according to its elements' natural order. - - the collection whose elements are to be placed into this priority queue. - if elements of cannot be - compared to one another according to the priority queue's ordering - if or any element with it is - - - - - - Common code to initialize underlying queue array across - constructors below. - - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - - Establishes the heap invariant assuming the heap - satisfies the invariant except possibly for the leaf-node indexed by k - (which may have a nextExecutionTime less than its parent's). - - - This method functions by "promoting" queue[k] up the hierarchy - (by swapping it with its parent) repeatedly until queue[k] - is greater than or equal to its parent. - - - - - Establishes the heap invariant (described above) in the subtree - rooted at k, which is assumed to satisfy the heap invariant except - possibly for node k itself (which may be greater than its children). - - - This method functions by "demoting" queue[k] down the hierarchy - (by swapping it with its smaller child) repeatedly until queue[k] - is less than or equal to its children. - - - - - Establishes the heap invariant in the entire tree, - assuming nothing about the order of the elements prior to the call. - - - - - Returns the of or - 1, - whichever is smaller. - - base size - percentage to return - of - - - - Initially fill elements of the queue array under the - knowledge that it is sorted or is another , in which - case we can just place the elements in the order presented. - - - - - Initially fill elements of the queue array that is not to our knowledge - sorted, so we must rearrange the elements to guarantee the heap - invariant. - - - - - Removes and returns element located at from queue. (Recall that the queue - is one-based, so 1 <= i <= size.) - - - Normally this method leaves the elements at positions from 1 up to i-1, - inclusive, untouched. Under these circumstances, it returns . - Occasionally, in order to maintain the heap invariant, it must move - the last element of the list to some index in the range [2, i-1], - and move the element previously at position (i/2) to position i. - Under these circumstances, this method returns the element that was - previously at the end of the list and is now at some position between - 2 and i-1 inclusive. - - - - Resize array, if necessary, to be able to hold given index - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - and this queue does not permit - elements. - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - - - Removes a single instance of the specified element from this - queue, if it is present. - - - - - Returns an over the elements in this queue. - The enumeratoar does not return the elements in any particular order. - - an enumerator over the elements in this queue. - - - - Removes all elements from the priority queue. - The queue will be empty after this call returns. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Queries the queue to see if it contains the specified - - element to look for. - if the queue contains the , - otherwise. - - - Returns the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering - (using ). - - - the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering. - - - - - Save the state of the instance to a stream (that - is, serialize it). - - The length of the array backing the instance is - emitted (int), followed by all of its elements (each an - ) in the proper order. - - the stream - the context - - - - Reconstitute the instance from a stream (that is, - deserialize it). - - the stream - the context - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Copies the elements of the to an , starting at index 0. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Gets the Capacity of this queue. Will equal - - - - - Returns the queue count. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Returns if there are no elements in the , otherwise. - - - - - Index (into queue array) of element to be returned by subsequent call to next. - - - - - Implements an based on a sorted - tree. - - -

- This gives good performance for operations on very large data-sets, - though not as good - asymptotically - as a - . However, iteration occurs - in order. -

-

- Elements that you put into this type of collection must implement - , and they must actually be comparable. - You can't mix and - values, for example. -

-

- This implementation does - not support elements that are . -

-
- -
- - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree using for ordering. - - - - - Creates a new set instance based on a sorted tree and initializes - it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Synchronized that should be returned by synchronized - dictionary implementations in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that should be returned by synchronized - collections in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that, unlike hashtable created - using method, synchronizes - reads from the underlying hashtable in addition to writes. - - -

- In addition to synchronizing reads, this implementation also fixes - IEnumerator/ICollection issue described at - http://msdn.microsoft.com/en-us/netframework/aa570326.aspx - (search for SynchronizedHashtable for issue description), by implementing - interface explicitly, and returns thread safe enumerator - implementations as well. -

-

- This class should be used whenever a truly synchronized - is needed. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of - - - - - Initializes a new instance of - - - - - Initializes a new instance of , copying inital entries from - handling keys depending on . - - - - - Creates a instance that - synchronizes access to the underlying . - - the hashtable to be synchronized - - - - Creates a wrapper that synchronizes - access to the passed . - - the hashtable to be synchronized - - - - Adds an element with the provided key and value to the object. - - The to use as the value of the element to add. - The to use as the key of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. 2 - - - - Removes all elements from the object. - - The object is read-only. 2 - - - - Creates a new object that is a copy of the current instance. - - - A new object that is a copy of this instance. - - - - - Determines whether the object contains an element with the specified key. - - - true if the contains an element with the key; otherwise, false. - - The key to locate in the object. - key is null. 2 - - - - Returns, whether this contains an entry with the specified . - - The key to look for - , if this contains an entry with this - - - - Returns, whether this contains an entry with the specified . - - The valúe to look for - , if this contains an entry with this - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets or sets the element with the specified key. - - - The element with the specified key. - - The key of the element to get or set. - The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. - key is null. 2 - - - - Implements a thread-safe wrapper. - - -

- The implementation is extremely conservative, serializing critical - sections to prevent possible deadlocks, and locking on everything. The - one exception is for enumeration, which is inherently not thread-safe. - For this, you have to lock the SyncRoot object for the - duration of the enumeration. -

-
- -
- - - Constructs a thread-safe - wrapper. - - - The object that this object - will wrap. - - - If the supplied ecposes a - SyncRoot value. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the instance. - - A clone of this object. - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Simple listener that logs application events to the console. - - -

- Intended for use during debugging only. -

-
- Rod Johnson - Griffin Caprio (.NET) - -
- - - A listener for application events. - - Rod Johnson - Griffin Caprio (.NET) - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Creates a new instance of the - class. - - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle events. - - Griffin Caprio (.NET) - - - - - - - Encapsulates the data associated with an event raised by an - . - - Rod Johnson - Mark Pollack (.NET) - Griffin Caprio (.NET) - - - - - Creates a new instance of the - class. - - - - - The date and time when the event occured. - - - The date and time when the event occured. - - - - - The system time in milliseconds when the event happened. - - - The system time in milliseconds when the event happened. - - - - - Creates a new instance of the ContextEventArgs class to represent the - supplied context event. - - The type of context event. - - - - Returns a string representation of this object. - - A string representation of this object. - - - - The event type. - - - - - The various context event types. - - - - - The event type when the context is refreshed or created. - - - - - The event type when the context is closed. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Partial implementation of the - interface. - - -

- Does not mandate the type of storage used for configuration, but does - implement common functionality. Uses the Template Method design - pattern, requiring concrete subclasses to implement - methods. -

-

- In contrast to a plain vanilla - , an - is supposed - to detect special objects defined in its object factory: therefore, - this class automatically registers - s, - s - and s that are - defined as objects in the context. -

-

- An may be also supplied as - an object in the context, with the special, well-known-name of - "messageSource". Else, message resolution is delegated to the - parent context. -

-
- Rod Johnson - Juergan Hoeller - Griffin Caprio (.NET) - - -
- - - Configurable implementation of the - interface. - - -

- This implementation - supports the configuration of resource access protocols and the - corresponding .NET types that know how to handle those protocols. -

-

- Basic protocol-to-resource type mappings are also defined by this class, - while others can be added either internally, by application contexts - extending this class, or externally, by the end user configuring the - context. -

-

- Only one resource type can be defined for each protocol, but multiple - protocols can map to the same resource type (for example, the - "http" and "ftp" protocols both map to the - type. The protocols that are - mapped by default can be found in the following list. -

-

- - - assembly - - - config - - - file - - - http - - - https - - -

-
- Aleksandar Seovic - - - -
- - - Describes an object that can load - s. - - -

- An implementation is - generally required to support the functionality described by this - interface. -

-

- The class is a - standalone implementation that is usable outside an - ; the aforementioned - class is also used by the - class. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Return an handle for the - specified resource. - - -

- The handle should always be a reusable resource descriptor; this - allows one to make repeated calls to the underlying - . -

-

-

    -
  • - Must support fully qualified URLs, e.g. "file:C:/test.dat". -
  • -
  • - Should support relative file paths, e.g. "test.dat" (this will be - implementation-specific, typically provided by an - implementation). -
  • -
-

- - An handle does not imply an - existing resource; you need to check the value of an - 's - property to determine - conclusively whether or not the resource actually exists. - -
- The resource location. - - An appropriate handle. - - - - -
- - - The separator between the protocol name and the resource name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified default protocol for unqualified resources. - - - - - Returns a that has been - mapped to the protocol of the supplied . - - The name of the resource. - - A new instance for the - supplied . - - - If a - mapping does not exist for the supplied . - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - - Checks that the supplied starts - with one of the protocol names currently mapped by this - instance. - - The name of the resource. - - if the supplied - starts with one of the known - protocols; if not, or if the supplied - is itself . - - - - - Extracts the protocol name from the supplied - . - - The name of the resource. - - The extracted protocol name or if the - supplied is unqualified (or - is itself ). - - - - - The default protocol to use for unqualified resources. - - -

- The initial value is "file". -

-
-
- - - Provides the means to configure an application context in addition to - the methods exposed on the - interface. - - -

- This interface is to be implemented by most (if not all) - implementations. -

-

- Configuration and lifecycle methods are encapsulated here to avoid - making them obvious to - client code. -

-

- Calling will close this - application context, releasing all resources and locks that the - implementation might hold. This includes disposing all cached - singleton objects. -

- - does not invoke the - attendant on any parent - context. - -
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - The central interface to Spring.NET's IoC container. - - -

- implementations - provide: - - - - Object factory functionality inherited from the - - and - interfaces. - - - - - The ability to resolve messages, supporting internationalization. - Inherited from the - interface. - - - - - The ability to load file resources in a generic fashion. - Inherited from the - interface. - - - - - Acts an an event registry for supporting loosely coupled eventing - between objecs. Inherited from the - interface. - - - - - The ability to raise events related to the context lifecycle. Inherited - from the - interface. - - - - - Inheritance from a parent context. Definitions in a descendant context - will always take priority. - - - -

-

- In addition to standard object factory lifecycle capabilities, - implementations need - to detect - , - , and - objects and supply - their attendant dependencies accordingly. -

-

- This interface is the central client interface in Spring.NET's IoC - container implementation. As such it does inherit a quite sizeable - number of interfaces; implementations are strongly encouraged to use - composition to satisfy each of the inherited interfaces (where - appropriate of course). -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - -
- - - Extension of the interface - to be implemented by object factories that can enumerate all their object instances, - rather than attempting object lookup by name one by one as requested by clients. - - -

- implementations that preload - all their objects (for example, DOM-based XML factories) may implement this - interface. This interface is discussed in - "Expert One-on-One J2EE Design and Development", by Rod Johnson. -

-

- If this is an , - the return values will not take any - hierarchy into account, but - will relate only to the objects defined in the current factory. - Use the helper class to - get all objects. -

-

- With the exception of - , - the methods and properties in this interface are not designed for frequent - invocation. Implementations may be slow. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - The root interface for accessing a Spring.NET IoC container. - - - - This is the basic client view of a Spring.NET IoC container; further interfaces - such as and - - are available for specific purposes such as enumeration and configuration. - - - This is the root interface to be implemented by objects that can hold a number - of object definitions, each uniquely identified by a - name. An independent instance of any of these objects can be obtained - (the Prototype design pattern), or a single shared instance can be obtained - (a superior alternative to the Singleton design pattern, in which the instance is a - singleton in the scope of the factory). Which type of instance - will be returned depends on the object factory configuration - the API is the same. - The Singleton approach is more useful and hence more common in practice. - - - The point of this approach is that the IObjectFactory is a central registry of - application components, and centralizes the configuring of application components - (no more do individual objects need to read properties files, for example). - See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a - discussion of the benefits of this approach. - - - Normally an IObjectFactory will load object definitions stored in a configuration - source (such as an XML document), and use the - namespace to configure the objects. However, an implementation could simply return - .NET objects it creates as necessary directly in .NET code. There are no - constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties - file etc. Implementations are encouraged to support references amongst objects, - to either Singletons or Prototypes. - - - In contrast to the methods in - , all of the methods - in this interface will also check parent factories if this is an - . If an object is - not found in this factory instance, the immediate parent is asked. Objects in - this factory instance are supposed to override objects of the same name in any - parent factory. - - - Object factories are supposed to support the standard object lifecycle interfaces - as far as possible. The maximum set of initialization methods and their standard - order is: - - - - - - 's - property. - - - - - 's - property. - - - - - - (only applicable if running within an ). - - - - - The - - method of - s. - - - - - 's - method. - - - - - A custom init-method definition. - - - - - The - - method of - s. - - - - -

- - On shutdown of an object factory, the following lifecycle methods apply: - - - - - - 's - method. - - - - - A custom destroy-method definition. - - - - - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - -

- Is this object a singleton? - - - - That is, will - always return the same object? - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Does this object factory contain an object with the given name? - - - - The concrete lookup strategy depends on the implementation. E.g. s - will also search their parent factory if a name isn't found . - - - The name of the object to query. - True if an object with the given name is defined. - - - - Return the aliases for the given object name, if defined. - - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - Provides a measure of type safety by throwing an exception if the object is - not of the required . - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - Determine the type of the object with the given name. - - - - More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. - - - The name of the object to query. - - The type of the object or if not determinable. - - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - In addition to being generally useful, typically this method is used to provide - dependency injection functionality for objects that are instantiated outwith the - control of a developer. A case in point is the way that the current (1.1) - ASP.NET classes instantiate web controls... the instantiation takes place within - a private method of a compiled page, and thus cannot be hooked into the - typical Spring.NET IOC container lifecycle for dependency injection. - - - - The following code snippet assumes that the instantiated factory instance - has been configured with an object definition named - 'ExampleNamespace.BusinessObject' that has been configured to set the - Dao property of any ExampleNamespace.BusinessObject instance - to an instance of an appropriate implementation... - - namespace ExampleNamespace - { - public class BusinessObject - { - private IDao _dao; - - public BusinessObject() {} - - public IDao Dao - { - get { return _dao; } - set { _dao = value; } - } - } - } - - with the corresponding driver code looking like so... - - IObjectFactory factory = GetAnIObjectFactoryImplementation(); - BusinessObject instance = new BusinessObject(); - factory.ConfigureObject(instance, "object_definition_name"); - // at this point the dependencies for the 'instance' object will have been resolved... - - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - If there is no object definition for the supplied . - - - If any of the target object's dependencies could not be created. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - This is the indexer for the - interface. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Check if this object factory contains an object definition with the given name. - - -

- Does not consider any hierarchy this factory may participate in. -

- - Ignores any singleton objects that have been registered by other means - than object definitions. - -
- The name of the object to look for. - - if this object factory contains an object - definition with the given name. - -
- - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. - Use - to include beans in ancestor factories too. - <p>Note: Does <i>not</i> ignore singleton objects that have been registered - by other means than bean definitions. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Sub-interface implemented by object factories that can be part - of a hierarchy. - - Rod Johnson - Rick Evans (.NET) - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts, also resolving a given alias if necessary. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Return the parent object factory, or - if this factory does not have a parent. - - - The parent object factory, or - if this factory does not have a parent. - - - - - Describes an object that can resolve messages. - - -

- This enables the parameterization and internationalization of messages. -

-

- Spring.NET provides one out-of-the-box implementation for production - use: -

    -
  • .
  • -
-

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - The default message if name is not found. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - -

- This method must use the - - value to obtain a resource. -

-

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The resolved object, or if not found. - -
- - - Gets a localized resource object identified by the supplied - . - - -

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - -
- - - Applies resources to object properties. - - -

- Resource key names are of the form objectName.propertyName. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - - Encapsulates event publication functionality. - - -

- Serves as a super-interface for the - interface. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Publishes an application context event. - - - The source of the event. May be . - - - The event that is to be raised. - - - - - A registry that manages subscriptions to and the - publishing of events. - - Griffin Caprio - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - Subscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Raised in response to an application context event. - - - - - Returns the date and time this context was loaded. - - -

- This is to be set immediately after an - has been - instantiated and its configuration has been loaded. Implementations - are permitted to update this value if the context is reset or - refreshed in some way. -

-
- - The representing when this context - was loaded. - - -
- - - Gets the parent context, or if there is no - parent context. - - -

- If the parent context is , then this context - is the root of any context hierarchy. -

-
- - The parent context, or if there is no - parent. - -
- - - Gets and sets a name for this context. - - - A name for this context. - - - - - Interface defining methods for start/stop lifecycle control. - The typical use case for this is to control asynchronous processing. - - - - Can be implemented by both components (typically a Spring object defined in - a spring and containers - (typically a spring . Containers will - propagate start/stop signals to all components that apply. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Gets a value indicating whether this component is currently running. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - true if this component is running; otherwise, false. - - - - - Add an - - that will get applied to the internal object factory of this - application context on refresh, before any of the object - definitions are evaluated. - - -

- To be invoked during context configuration. -

-
- - The factory processor to register. - - -
- - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Return the internal object factory of this application context. - - -

- Can be used to access specific functionality of the factory. -

- - This is just guaranteed to return an instance that is not - after the context has been refreshed - at least once. - - - Do not use this to post-process the object factory; singletons - will already have been instantiated. Use an - - to intercept the object factory setup process before objects even - get touched. - -
- -
- - - Sets the parent of this application context. - - - - The parent should not be changed: it should only be set - outside a constructor if it isn't available when an instance of - this class is created. - - - - The parent context. - - - - - Interface for registries that hold object definitions, i.e. - - and - - instances. - - -

- Typically implemented by object factories that work with the - - hierarchy internally. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Determine whether the given object name is already in use within this registry, - i.e. whether there is a local object or alias registered under this name. - - - - - Return the names of all objects defined in this registry. - - - The names of all objects defined in this registry, or an empty array - if none defined - - - - - Check if this registry contains a object definition with the given name. - - - The name of the object to look for. - - - True if this object factory contains an object definition with the - given name. - - - - - Returns the - - for the given object name. - - - The name of the object to find a definition for. - - - The for - the given name (never null). - - - If the object definition cannot be resolved. - - - In case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Return the aliases for the given object name, if defined. - - the object name to check for aliases - - -

- Will ask the parent factory if the object cannot be found in this - factory instance. -

-
- - The aliases, or an empty array if none. - - - If there's no such object definition. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - - The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Return the number of objects defined in the registry. - - - The number of objects defined in the registry. - - - - - Name of the .Net config section that contains Spring.Net context definition. - - - - - Default name of the root context. - - - - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then message resolution - will be delegated to the parent context (if any). -

-
-
- - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then a default - will be used. -

-
-
- - - The instance for this class. - - - - - The instance we delegate - our implementation of said interface to. - - - - - The instance we - delegate our implementation of said interface to. - - - - - Creates a new instance of the - with no parent context. - - -

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

-
-
- - - Creates a new instance of the - with no parent context. - - -

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

-
- Flag specifying whether to make this context case sensitive or not. -
- - - Creates a new instance of the - with the supplied parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent application context. -
- - - Adds the given to the list of standard - processors being added to the underlying - - - Each time is called on this context, the context ensures, that - all default s are registered with the underlying . - - The instance. - - - - Closes this context and disposes of any resources (such as - singleton objects in the wrapped - ). - - - - - Subclasses must implement this method to perform the actual - configuration loading. - - -

- This method is invoked by - , - before any other initialization occurs. -

-
- - In the case of errors encountered while refreshing the object factory. - -
- - - Returns the internal object factory of the parent context if it implements - ; else, - returns the parent context itself. - - - The parent context's object factory, or the parent itself. - - - - - Raises an application context event. - - - Any arguments to the event. May be . - - - - - Raises an application context event. - - - The source of the event. - - - Any arguments to the event. May be . - - - - - Create the strategy to be used - - - - - Modify the application context's internal object factory after its standard - initialization. - - -

- All object definitions will have been loaded, but no objects - will have been instantiated yet. This allows for the registration - of special - s - in certain - implementations. -

-
- - The object factory used by the application context. - - - In the case of errors. - . -
- - - Template method which can be overridden to add context-specific - work before the underlying object factory gets refreshed. - - - - - Template method which can be overridden to add context-specific - refresh work. - - -

- Called on initialization of special objects, before instantiation - of singletons. -

-
-
- - - Template method which can be overridden to add context-specific - work after the context was refreshed but before the - event gets raised. - - - - - Instantiate and invoke all registered - - objects, respecting any explicit ordering. - - - - Must be called before singleton instantiation. - - - In the case of errors. - - - - Resets the well-known ObjectPostProcessorChecker that logs an info - message when an object is created during IObjectPostProcessor - instantiation, i.e. when an object is not eligible for being - processed by all IObjectPostProcessors. - - - - - Initializes the default event registry for this context. - - - - - Returns the internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - The internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - - - Initializes the default message source for this context. - - -

- Uses any parent context's message source if one is not available - in this context. -

-
-
- - - Add a new - that will get applied to the internal object factory of this application context - on refresh, before any of the object definitions are evaluated. - - - The factory processor to register. - - - - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Registers well-known s and - preregisters well-known dependencies using - - the raw object factory as returned from - - - - Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory - - - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Check if this object factory contains an object definition with the given name. - - The name of the object to look for. - - True if this object factory contains an object definition with the given name. - - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - - if an object with the given name is defined. - - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Is this object a singleton? - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determine the of the object with the - given name. - - The name of the object to query. - - The of the object, or - if not determinable. - - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - - - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Determine whether the given object name is already in use within this context, - i.e. whether there is a local object. May be override by subclasses, the default - implementation simply returns - - - - - Register a new object definition with this registry. - Must support - - and . - - The name of the object instance to register. - The definition of the object instance to register. - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - The name of the object. - The alias that will behave the same as the object name. - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - - Subscribes to published events of a all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Publishes an application context event. - - -

- -

-
- - The source of the event. May be . - - - The event that is to be raised. - - -
- - - An object that can be used to synchronize access to the - - - - - Set the to be used by this context. - - - - - The timestamp when this context was first loaded. - - - The timestamp (milliseconds) when this context was first loaded. - - - - - Gets a flag indicating whether context should be case sensitive. - - true if object lookups are case sensitive; otherwise, false. - - - - The for this context. - - - If the context has not been initialized yet. - - - - - The for this context. - - - If the context has not been initialized yet. - - - - - Returns the list of the - s - that will be applied to the objects created with this factory. - - -

- The elements of this list are instances of implementations of the - - interface. -

-
- - The list of the - s - that will be applied to the objects created with this factory. - -
- - - Return the internal object factory of this application context. - - - - - Gets the parent context, or if there is no - parent context. - - - The parent context, or if there is no - parent. - - - - - - Gets a value indicating whether this component is currently running. - - - true if this component is running; otherwise, false. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - - - Gets a dictionary of all singleton beans that implement the - ILifecycle interface in this context. - - A dictionary of ILifecycle objects with object name as key. - - - - Raised in response to an implementation-dependant application - context event. - - - - - The date and time this context was first loaded. - - - The representing when this context - was first loaded. - - - - - A name for this context. - - - A name for this context. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return the parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - - Allows for custom modification of new object instances, e.g. - checking for marker interfaces or wrapping them with proxies. - - -

- Application contexts can auto-detect - - objects in their object definitions and apply them before any other - objects get created. Plain object factories allow for programmatic - registration of post-processors. -

-

- Typically, post-processors that populate objects via marker interfaces - or the like will implement - , - and post-processors that wrap objects with proxies will normally implement - . -

-
- Juergen Hoeller - Aleksandar Seovic (.NET) - -
- - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Interface that can be implemented by objects that should be orderable, e.g. in an - . - - -

- The actual order can be interpreted as prioritization, the first object (with the - lowest order value) having the highest priority. -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Abstract implementation of the interface, - implementing common handling of message variants, making it easy - to implement a specific strategy for a concrete . - - -

Subclasses must implement the abstract ResolveObject - method.

-

Note: By default, message texts are only parsed through - String.Format if arguments have been passed in for the message. In case - of no arguments, message texts will be returned as-is. As a consequence, - you should only use String.Format escaping for messages with actual - arguments, and keep all other messages unescaped. -

-

Supports not only IMessageSourceResolvables as primary messages - but also resolution of message arguments that are in turn - IMessageSourceResolvables themselves. -

-

This class does not implement caching of messages per code, thus - subclasses can dynamically change messages over time. Subclasses are - encouraged to cache their messages in a modification-aware fashion, - allowing for hot deployment of updated messages. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - Harald Radi (.NET) - - - -
- - - Sub-interface of to be - implemented by objects that can resolve messages hierarchically. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - holds the logger instance shared with subclasses. - - - - - Initializes this instance. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- If the lookup is not successful throw NoSuchMessageException -
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException. -

-
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message if name is not found. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException -

-
-
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - The value object storing those attributes that are required to - properly resolve a message. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful. - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. If - the resource name resolves to null, then in .NET 1.1 the return - value will be String.Empty whereas in .NET 2.0 it will return - null. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Resolve the given code and arguments as message in the given culture, - returning null if not found. Does not fall back to the code - as default message. Invoked by GetMessage methods. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Try to retrieve the given message from the parent MessageSource, if any. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Return a fallback default message for the given code, if any. - - - Default is to return the code itself if "UseCodeAsDefaultMessage" - is activated, or return no fallback else. In case of no fallback, - the caller will usually receive a NoSuchMessageException from GetMessage - - The code to lookup up, such as 'calculator.noRateSet'. - The default message to use, or null if none. - - - - Renders the default message string. The default message is passed in as specified by the - caller and can be rendered into a fully formatted default message shown to the user. - - Default implementation passed he String for String.Format resolving any - argument placeholders found in them. Subclasses may override this method to plug - in custom processing of default messages. - - The default message. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The rendered default message (with resolved arguments) - - - - Format the given default message String resolving any - agrument placeholders found in them. - - The message to format. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The formatted message (with resolved arguments) - - - - Search through the given array of objects, find any - MessageSourceResolvable objects and resolve them. - - - Allows for messages to have MessageSourceResolvables as arguments. - - - The array of arguments for a message. - The with which the - resource is associated. - An array of arguments with any IMessageSourceResolvables resolved - - - - Gets the specified resource (e.g. Icon or Bitmap). - - The name of the resource to resolve. - - The to resolve the - code for. - - The resource if found. otherwise. - - - - Applies resources from the given name on the specified object. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Subclasses must implement this method to resolve a message. - - The code to lookup up, such as 'calculator.noRateSet'. - The with which the - resource is associated. - The resolved message from the backing store of message data. - - - - Resolves an object (typically an icon or bitmap). - - -

- Subclasses must implement this method to resolve an object. -

-
- The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - -
- - - Applies resources to object properties. - - -

- Subclasses must implement this method to apply resources - to an arbitrary object. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - Gets or Sets a value indicating whether to use the message code as - default message instead of throwing a NoSuchMessageException. - Useful for development and debugging. Default is "false". - - -

Note: In case of a IMessageSourceResolvable with multiple codes - (like a FieldError) and a MessageSource that has a parent MessageSource, - do not activate "UseCodeAsDefaultMessage" in the parent: - Else, you'll get the first code returned as message by the parent, - without attempts to check further codes.

-

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, - AbstractMessageSource contains special checks - to delegate to the internal GetMessageInternal method if available. - In general, it is recommended to just use "UseCodeAsDefaultMessage" during - development and not rely on it in production in the first place, though.

-

Alternatively, consider overriding the GetDefaultMessage - method to return a custom fallback message for an unresolvable code.

-
- - true if use the message code as default message instead of - throwing a NoSuchMessageException; otherwise, false. - -
- - - The parent message source used to try and resolve messages that - this object can't resolve. - - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - Convenient abstract superclass for - implementations that - draw their configuration from XML documents containing object - definitions as understood by an - . - - Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - class - with the given parent context. - - -

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

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent context. -
- - - Instantiates and populates the underlying - with the object - definitions yielded up by the - method. - - - In the case of errors encountered while refreshing the object factory. - - - In the case of errors encountered reading any of the resources - yielded by the method. - - - - - - Initialize the object definition reader used for loading the object - definitions of this context. - - -

- The default implementation of this method is a no-op; i.e. it does - nothing. Can be overridden in subclasses to provide custom - initialization of the supplied - ; for example, a derived - class may want to turn off XML validation. -

-
- - The object definition reader used by this context. - -
- - - Load the object definitions with the given - . - - -

- The lifecycle of the object factory is handled by - ; - therefore this method is just supposed to load and / or register - object definitions. -

-
- - The reader containing object definitions. - - In case of object registration errors. - - - In the case of errors encountered reading any of the resources - yielded by either the or - the methods. - -
- - - Loads the object definitions into the given object factory, typically through - delegating to one or more object definition readers. - - The object factory to lead object definitions into - - - - - - Create a new reader instance for importing object definitions into the specified . - - the to be associated with the reader - a new instance. - - - - Customizes the internal object factory used by this context. - - Called for each attempt. -

- The default implementation is empty. Can be overriden in subclassses to customize - DefaultListableBeanFatory's standard settings. -

- The newly created object factory for this context -
- - - Create an internal object factory for this context. - - -

- Called for each attempt. - This default implementation creates a - - with the internal object factory of this context's parent serving - as the parent object factory. Can be overridden in subclasse,s - for example to customize DefaultListableBeanFactory's settings. -

-
- The object factory for this context. -
- - - Determine whether the given object name is already in use within this context's object factory, - i.e. whether there is a local object or alias registered under this name. - - - - - An array of resource locations, referring to the XML object - definition files that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of resource locations, or if none. - -
- - - An array of resources that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of s, or if none. - -
- - - Subclasses must return their internal object factory here. - - - The internal object factory for the application context. - - - - - - - implementation that passes the application context to object that - implement the - , - , and - interfaces. - - -

- If an object's class implements more than one of the - , - , and - interfaces, then the - order in which the interfaces are satisfied is as follows... - - - - - - - - - - - -

-

- Application contexts will automatically register this with their - underlying object factory. Applications should thus never need to use - this class directly. -

-
- Juergen Hoeller - Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - The that this - instance will work with. - - - - - Apply this - to the given new object instance before any object - initialization callbacks. - - - The new object instance. - - - The name of the object. - - - The 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. - - - 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. - - - - - - Convenient superclass for application objects that want to be aware of - the application context, e.g. for custom lookup of collaborating object - or for context-specific resource access. - - -

- It saves the application context reference and provides an - initialization callback method. Furthermore, it offers numerous - convenience methods for message lookup. -

-

- There is no requirement to subclass this class: it just makes things - a little easier if you need access to the context, e.g. for access to - file resources or to the message source. Note that many application - objects do not need to be aware of the application context at all, - as they can receive collaborating objects via object references. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) -
- - - To be implemented by any object that wishes to be notified - of the that it runs in. - - -

- Implementing this interface makes sense when an object requires access - to a set of collaborating objects. Note that configuration via object - references is preferable to implementing this interface just for object - lookup purposes. -

-

- This interface can also be implemented if an object needs access to - file resources, i.e. wants to call - , or access to - the . However, it is - preferable to implement the more specific - - interface to receive a reference to the - object in that scenario. -

-

- Note that dependencies can also - be exposed as object properties of the - type, populated via strings with - automatic type conversion performed by an object factory. This obviates - the need for implementing any callback interface just for the purpose - of accessing a specific file resource. -

-

- - is a convenience implementation of this interface for your - application objects. -

-

- For a list of all object lifecycle methods, see the overview for the - interface. -

-
- Rod Johnson - Mark Pollack (.NET) - - - -
- - - 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. - - -
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - The that this - object runs in. - -
- - - Intializes the wrapped - . - - -

- This is a template method that subclasses can override for custom - initialization behavior. -

-

- Gets called by the - - instance directly after setting the context instance. -

- - Does not get called on reinitialization of the context. - -
- - In the case of any initialization errors. - - - If thrown by application context methods. - -
- - - The context class that any context passed to the - - must be an instance of. - - - The - . - - - - - Return a for the - application context used by this object, for easy message access. - - - - - Gets or sets the that this - object runs in. - - - When passed an unexpected - implementation - instance that is not compatible with the - defined by the value of the - . - property. Also, thrown when trying to re-initialize with a - different than was - originally used. - - - If thrown by any application context methods. - - - - - - - Creates an instance - using context definitions supplied in a custom configuration and - configures the with that instance. - - - Implementations of the - interface must provide the following two constructors: - - - - A constructor that takes a string array of resource locations. - - - - - A constructor that takes a reference to a parent application context - and a string array of resource locations (and in that order). - - - -

- Note that if the type attribute is not present in the declaration - of a particular context, then a default - - is assumed. This default - - is currently the - ; please note the exact - of this default is an - implementation detail, that, while unlikely, may do so in the future. - to -

-
- -

- This is an example of specifying a context that reads its resources from - an embedded Spring.NET XML object configuration file... -

- - - - -
- - - - - - - - - -

- This is an example of specifying a context that reads its resources from - a custom configuration section within the same application / web - configuration file and uses case insensitive object lookups. -

-

- Please note that you must adhere to the naming - of the various sections (i.e. '<sectionGroup name="spring">' and - '<section name="context">'. -

- - - - -
-
- - - - - - - - - - - - -

- And this is an example of specifying a hierarchy of contexts. The - hierarchy in this case is only a simple parent->child hierarchy, but - hopefully it illustrates the nesting of context configurations. This - nesting of contexts can be arbitrarily deep, and is one way... child - contexts know about their parent contexts, but parent contexts do not - know how many child contexts they have (if any), or have references - to any such child contexts. -

- - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mark Pollack - Aleksandar Seovic - Rick Evans - - - - - Creates an instance - using the context definitions supplied in a custom - configuration section. - - -

- This instance is - also used to configure the . -

-
- - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - An instance - populated with the object definitions supplied in the configuration - section. - -
- - - Create all child-contexts in the given for the given context. - - The parent context to use - The current configContext - The list of child context elements - - - - Instantiates a new context. - - - - - Gets the context's name specified in the name attribute of the context element. - - The current configContext - The context element - - - - Extracts the context-type from the context element. - If none is specified, returns the parent's type. - - - - - Extracts the case-sensitivity attribute from the context element - - - - - Gets the context specified in the type - attribute of the context element. - - -

- If this attribute is not defined it defaults to the - type. -

-
- - If the context type does not implement the - interface. - -
- - - Returns the array of resources containing object definitions for - this context. - - - - - Returns the array of child contexts for this context. - - - - - The of - created if no type attribute is specified on a context element. - - - - - - Get the context's case-sensitivity to use if none is specified - - -

- Derived handlers may override this property to change their default case-sensitivity. -

-

- Defaults to 'true'. -

-
-
- - - Specifies, whether the instantiated context will be automatically registered in the - global . - - - - - Returns if the context should be lazily - initialized. - - - - - Constants defining the structure and values associated with the - schema for laying out Spring.NET contexts in XML. - - - - - Defines a single - . - - - - - Specifies a context name. - - - - - Specifies if context should be case sensitive or not. Default is true. - - - - - Specifies a . - - -

- Does not have to be fully assembly qualified, but its generally regarded - as better form if the names of one's objects - are specified explicitly. -

-
-
- - - Specifies whether context should be lazy initialized. - - - - - Defines an - - - - - Specifies the URI for an - . - - - - - Provides access to a central registry of - s. - - -

- A singleton implementation to access one or more application contexts. Application - context instances are cached. -

-

Note that the use of this class or similar is unnecessary except (sometimes) for - a small amount of glue code. Excessive usage will lead to code that is more tightly - coupled, and harder to modify or test. Consider refactoring your code to use standard - Dependency Injection techniques or implement the interface IApplicationContextAware to - obtain a reference to an application context.

-
- Mark Pollack - Aleksandar Seovic - -
- - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the ContextRegistry class. - - -

- Explicit static constructor to tell C# compiler - not to mark type as beforefieldinit. -

-
-
- - - Registers an instance of an - . - - -

- This is usually called via a - inside a .NET - application configuration file. -

-
- The application context to be registered. - - If a context has previously been registered using the same name - -
- - - Handles events raised by an application context. - - - - - - - Removes the context from the registry - - - Has no effect if the context wasn't registered - - ´the context to remove from the registry - - - - Returns the root application context. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The root application context. -
- - - Returns context based on specified name. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The context name. - The specified context, or null, if context with that name doesn't exists. - - If the context name is null or empty - -
- - - Removes all registered - s from this - registry. - - - Raises the event while still holding a lock on - - - - - Allows to check, if a context is already registered - - The context name. - true, if the context is already registered. false otherwise - - - - This event is fired, if ContextRegistry.Clear() is called.
- Clients may register to get informed -
- - This event is fired while still holding a lock on the Registry.
- 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used -
-
- - - Gets an object that should be used to synchronize access to ContextRegistry - from the calling code. - - - - - Default implementation of the - interface. - - -

- Provides easy ways to store all the necessary values needed to resolve - messages from an . -

-
- Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Describes objects that are suitable for message resolution in a - . - - -

- Spring.NET's own validation error classes implement this interface. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - -

- The last code will therefore be the default one. -

-
- - A array of codes which are associated - with this message. - -
- - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - Creates a new instance of the - class - using a single code. - - The message code to be resolved. - - - - Initializes a new instance of the class. - - The codes to be used to resolve this message - - - - Creates a new instance of the - class - using multiple codes. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - - - Creates a new instance of the - class - using multiple codes and a default message. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - The default message used if no code could be resolved. - - - - - Creates a new instance of the - class - from another resolvable. - - -

- This is the copy constructor for the - class. -

-
- - The to be copied. - - - If the supplied is . - -
- - - Returns a representation of this - . - - - A representation of this - . - - - - - Calls the visit method on the supplied - to output a version of this class. - - The visitor to use. - - A representation of this - . - - - - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - - A array of codes which are associated - with this message. - - - - - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - - Return the default code for this resolvable. - - - The default code of this resolvable; this will be the last code in - the codes array, or if this instance has no - codes. - - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - - Default section handler that can handle any configuration section. - - -

- Simply returns the configuration section as an . -

-
- Aleksandar Seovic -
- - - Returns the configuration section as an - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is a null reference. - - - The for the section. - - Config section as XmlElement. - - - - Empty implementation that - simply delegates all method calls to it's parent - . - - -

- If no parent is available, - no messages will be resolved (and a - will be thrown). -

-

- Used as placeholder by the - class, - if the context definition doesn't define its own - . Not intended for direct use - in applications. -

-
- Juergan Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - - Generic ApplicationContext implementation that holds a single internal - instance and does not - assume a specific object definition format. - - - Implements the interface in order - to allow for aplying any object definition readers to it. - Typical usage is to register a variety of object definitions via the - interface and then call - to initialize those - objects with application context semantics (handling - , auto-detecting - ObjectFactoryPostProcessors, etc). - - In contrast to other IApplicationContext implementations that create a new internal - IObjectFactory instance for each refresh, the internal IObjectFactory of this context - is available right from the start, to be able to register object definitions on it. - may only be called once - Usage examples - - GenericApplicationContext ctx = new GenericApplicationContext(); - // register your objects and object definitions - ctx.RegisterObjectDefinition(...) - ctx.Refresh(); - - - Mark Pollack - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true names in the context are case sensitive. - - - - Initializes a new instance of the class. - - The object factory instance to use for this context. - - - - Initializes a new instance of the class. - - The parent application context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - - - - Initializes a new instance of the class. - - The object factory to use for this context - The parent applicaiton context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - The object factory to use for this context - - - - Do nothing operation. We hold a single internal ObjectFactory and rely on callers - to register objects throug our public methods (or the ObjectFactory's). - - - In the case of errors encountered while refreshing the object factory. - - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - - - - Return the internal object factory of this application context. - - - - - - Gets the underlying object factory of this context, available for - registering object definitions. - - You need to call Refresh to initialize the - objects factory and its contained objects with application context - semantics (autodecting IObjectFactoryPostProcessors, etc). - The internal object factory (as DefaultListableObjectFactory). - - - - Helper class for easy access to messages from an - , providing various - overloaded GetMessage methods. - - -

- Available from - , but also - reusable as a standalone helper to delegate to in application objects. -

-
- Juergen Hoeller - Griffin Caprio (.NET) - - -
- - - Creates a new instance of the - class - that uses the current - for all locale specific lookups. - - - The to use to locate messages. - - - - - Creates a new instance of the - class - - - The to use to locate - messages. - - - The to use for - locale specific messages. - - - - - Retrieve the message for the given code and the default - . - - The code of the message. - The message. - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - The message. - - - - Retrieve the message for the given code and the default - . - - The code of the message. - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - . - - - The . - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - in the given - . - - - The . - - - The to use for - lookups. - - The message - - If the message could not be found. - - - - - Visitor class to represent - instances. - - -

- Used in the first instance to supply stringified versions of - instances. -

-

- Other methods can be added here to return different representations, - including XML, CSV, etc.. -

-
- Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - - - Outputs the supplied - as a nicely formatted . - - - The to output. - - - - - Configuration section handler for the (recommended, Spring.NET standard) parsers - config section. - - -

- Spring.NET allows the registration of custom configuration parsers that - can be used to create simplified configuration schemas that better - describe object definitions. -

-

- For example, Spring.NET uses this facility internally in order to - define simplified schemas for various AOP, Data and Services definitions. -

-
- -

- The following example shows how to configure both this section handler - and how to define custom configuration parsers within a Spring.NET - config section. -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Registers parsers specified in the (recommended, Spring.NET standard) - parsers config section with the . - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because parsers - are registered as a side-effect of this object's execution and there - is thus no need to return anything. - - - - - An that doesn't do a whole lot. - - -

- is an implementation of - the NullObject pattern. It should be used in those situations where a - needs to be passed (say to a - method) but where the resolution of messages is not required. -

-

- There should not (typically) be a need to instantiate instances of this class; - does not maintan any state - and the instance is - thus safe to pass around. -

-
- Aleksandar Seovic -
- - - The canonical instance of the - class. - - - - - Creates a new instance of the class. - - -

- Consider using - instead. -

-
-
- - - Simply returns the supplied message as-is. - - The code of the message to resolve. - - The to resolve the - code for. - - - The supplied message as-is. - - - - - Always returns . - - The code of the object to resolve. - - The to resolve the - code for. - - - (always). - - - - - Does nothing. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Handler for Spring.NET resourceHandlers config section. - - -

- Spring allows registration of custom resource handlers that can be used to load - object definitions from. -

-

- For example, if you wanted to store your object definitions in a database instead - of in the config file, you could write a custom implementation - and register it with Spring using 'db' as a protocol name. -

-

- Afterwards, you would simply specify resource URI within the context config element - using your custom resource handler. -

-
- -

- The following example shows how to configure both this section handler, - how to define custom resource within Spring config section, and how to load - object definitions using custom resource handler: -

- - - - -
- - - - - - - - - - - - - - Aleksandar Seovic - - - - - Registers resource handlers that are specified in - the resources config section with the . - - - The configuration settings in a corresponding parent - configuration section. Ignored. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns null, because resource handlers are registered - as a sideffect of its execution and there is no need to return anything. - - - - - An implementation that - accesses resources from .resx / .resource files. - - Note that for the method - GetResourceObject if the resource name resolves to null, then in - .NET 1.1 the return value will be String.Empty whereas - in .NET 2.0 it will return null. - Griffin Caprio (.NET) - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - - - - Defines a simple initialization callback for objects that need to to some - post-initialization logic after all of their dependencies have been injected. - - -

- An implementation of the - - method might perform some additional custom initialization (over and above that - performed by the constructor), or merely check that all mandatory properties - have been set (this last example is a very typical use case of this interface). -

- - The use of the - interface - by non-Spring.NET framework code can be avoided (and is generally - discouraged). The Spring.NET container provides support for a generic - initialization method given to the object definition in the object - configuration store (be it XML, or a database, etc). This requires - slightly more configuration (one attribute-value pair in the case of - XML configuration), but removes any dependency on Spring.NET from the - class definition. - -
- Rod Johnson - Rick Evans (.NET) - -
- - - 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. - -
- - - Creates a new instance of the - class. - - - - - Resolves a given code by searching through each assembly name in - the base names array. - - The code to resolve. - - The to use for lookups. - - The message from the resource set. - - - - Resolves a given code by searching through each assembly name in the array. - - The code to resolve. - - The to use for lookups. - - The object from the resource set. - - - - Uses a System.ComponentModel.ComponentResourceManager - to apply resources to object properties. - Resource key names are of the form objectName.propertyName - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - An object that contains the property values to be applied. - - - The base name of the object to use for the key lookup. - - - The to use for lookups. - If , uses the - value. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - - - Resolves a code into an object given a base name. - - The to search. - The code to resolve. - - The to use for lookups. - - The object from the resource file. - - - - Returns a representation of the - . - - A representation of the - . - - - - Invoked by an - after it has set all object properties supplied. - - -

- The list may contain objects of type or - . types - are converted to instances using the notation - resourcename, assembly partial name. -

-
- - If the conversion from a to a - can't be performed. - -
- - - The collection of s - in this . - - - - - that allows concrete registration of - objects and messages in code, rather than from external configuration sources. - - -

- Mainly useful for testing. -

-
- Rod Johnson - Griffin Caprio (.NET) -
- - - Creates a new instance of the StaticApplicationContext class. - - - - - Creates a new instance of the StaticApplicationContext class. - - The parent application context. - - - - Creates a new, named instance of the StaticApplicationContext class. - - the context name - The parent application context. - - - - Do nothing: we rely on callers to update our public methods. - - - - - Register a singleton object with the default object factory. - - The name of the object. - The of the object. - The property values for the singleton instance. - - - - Registers a prototype object with the default object factory. - - The name of the prototype object. - The of the prototype object. - The property values for the prototype instance. - - - - Associate the given message with the given code. - - The lookup code. - - The that the message should be found within. - - The message associated with the lookup code. - - - - Simple implementation of - that allows messages to be held in an object and added programmatically. - - -

- Mainly useful for testing. -

-

- This supports internationalization. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Creates a new instance of the - class. - - - - - Returns a format string. - - The code of the message to resolve. - - The to resolve the - code for. - - - A format string or if not found. - - - - - - Resolves an object (typically an icon or bitmap). - - The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - - - - - - Applies resources to object properties. - - -

- Uses a System.ComponentModel.ComponentResourceManager - internally to apply resources to object properties. Resource key - names are of the form objectName.propertyName. -

-

- This feature is not currently supported on version 1.0 of the .NET platform. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - -
- - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The message format associated with this lookup code. - - - - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The object associated with this lookup code. - - - - - Returns a representation of this - message source. - - - A containing all of this message - source's messages. - - - - - Configuration section handler for the Spring.NET typeAliases - config section. - - -

- Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

-

- This includes type names specified within an object definition, as well - as values of the properties or constructor arguments that expect - instances. -

-
- -

- The following example shows how to configure both this section handler and - how to define type aliases within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeAliases config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of this - object's execution and thus there is no need to return anything. - - - - - Configuration section handler for the Spring.NET typeConverters - config section. - - -

- Type converters are used to convert objects from one type into another - when injecting property values, evaluating expressions, performing data - binding, etc. -

-

- They are a very powerful mechanism as they allow Spring.NET to automatically - convert string-based property values from the configuration file into the appropriate - type based on the target property's type or to convert string values submitted - via a web form into a type that is used by your data model when Spring.NET data - binding is used. Because they offer such tremendous help, you should always provide - a type converter implementation for your custom types that you want to be able to use - for injected properties or for data binding. -

-

- The standard .NET mechanism for specifying type converter for a particular type is - to decorate the type with a , passing the type - of the -derived class as a parameter. -

-

- This mechanism will still work and is a preferred way of defining type converters if - you control the source code for the type that you want to define a converter for. However, - this configuration section allows you to specify converters for the types that you don't - control and it also allows you to override some of the standard type converters, such as - the ones that are defined for some of the types in the .NET Base Class Library. -

-
- -

- The following example shows how to configure both this section handler and - how to define type converters within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeConverters config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of - its execution and thus there is no need to return anything. - - - - - An implementation that - reads context definitions from XML based resources. - - -

- Currently, the resources that are supported are the file, - http, ftp, config and assembly resource - types. -

-

- You can provide custom implementations of the - interface and and register them - with any that inherits - from the - - interface. -

- - In case of multiple config locations, later object definitions will - override ones defined in previously loaded resources. This can be - leveraged to deliberately override certain object definitions via an - extra XML file. - -
- -

- Find below some examples of instantiating an - using a - variety of different XML resources. -

- - // an XmlApplicationContext that reads its object definitions from an - // XML file that has been embedded in an assembly... - IApplicationContext context = new XmlApplicationContext - ( - "assembly://AssemblyName/NameSpace/ResourceName" - ); - - // an XmlApplicationContext that reads its object definitions from a - // number of disparate XML resources... - IApplicationContext context = new XmlApplicationContext - ( - // from an XML file that has been embedded in an assembly... - "assembly://AssemblyName/NameSpace/ResourceName", - // and from a (relative) filesystem-based resource... - "file://Objects/services.xml", - // and from an App.config / Web.config resource... - "config://spring/objects" - ); - -
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - -
- - - Initializes a new instance of the XmlApplicationContext class. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The created context will be case sensitive. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - This constructor is meant to be used by derived classes. By passing =false, it is - the responsibility of the deriving class to call to initialize the context instance. - - if true, is called automatically. - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - An array of resource locations, referring to the XML object - definition files with which this context is to be built. - - - An array of resource locations, or if none. - - - - - - An array of resources instances with which this context is to be built. - - - An array of s, or if none. - - - - - - Encapsulates arguments to the class. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - - - - Initializes a new instance of the XmlApplicationContextArgs class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - if set to true [case sensitive]. - if set to true [refresh]. - - - Exception thrown during application context initialization. - Rod Johnson - Mark Pollack (.NET) - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class. - - - - - 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. - - - - - 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. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Marks an interface as being an application event listener. - - Griffin Caprio - - - - - Creates a new instance of the - class. - - - - - The callback for application events. - - - - - To be implemented by any object that wishes to be notified - of the associated with it. - - -

- In the current implementation, the - will typically be the - associated that - spawned the implementing object. -

-

- The can usually also be - passed on as an object reference to arbitrary object properties or - constructor arguments, because a - is typically defined as an - object with the well known name "messageSource" in the - associated application context. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Sets the associated - with this object. - - -

- Invoked after population of normal object properties but - before an initializing callback such as the - - method of the - interface - or a custom init-method. -

-

- It is also invoked before the - - property of any - - implementation. -

-
- - The associated - with this object. - -
- - - Interface to be implemented by any object that wishes to be notified - of the (typically the - ) that it runs in. - - -

- Note that dependencies can also - be exposed as object properties of type - , populated via strings with - automatic type conversion by the object factory. This obviates the - need for implementing any callback interface just for the purpose of - accessing a specific resource. -

-

- You typically need an - when your application object has to access a variety of file resources - whose names are calculated. A good strategy is to make the object use - a default resource loader but still implement the - interface to allow - for overriding when running in an - . -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Sets the - that this object runs in. - - -

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

-
-
- - - Thrown when a message cannot be resolved. - - Rod Johnson - Mark Pollack (.NET) - - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class with the - specified message. - - - 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. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for given culture. - - - The that was used - to search for the code. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for the current UI culture. - - - - - Convenience base class for - implementations, pre-implementing typical behavior. - - -

- The method will - check whether a or - can be opened; - will always return - ; - and - throw an exception; - and will - return the value of the - property. -

-
- Juergen Hoeller - Rick Evans (.NET) - Aleksandar Seovic (.NET) - -
- - - The central abstraction for Spring.NET's access to resources such as - s. - - -

- This interface encapsulates a resource descriptor that abstracts away - from the underlying type of resource; possible resource types include - files, memory streams, and databases (this list is not exhaustive). -

-

- A can definitely be opened and accessed - for every such resource; if the resource exists in a physical form (for - example, the resource is not an in-memory stream or one that has been - extracted from an assembly or ZIP file), a or - can also be accessed. The actual - behavior is implementation-specific. -

-

- This interface, when used in tandem with the - interface, forms the backbone of - Spring.NET's resource handling. Third party extensions or libraries - that want to integrate external resources with Spring.NET's IoC - container are encouraged expose such resources via this abstraction. -

-

- Interfaces cannot obviously mandate implementation, but derived classes - are strongly encouraged to expose a constructor that takes a - single as it's sole argument (see example). - Exposing such a constructor will make your custom - implementation integrate nicely - with the class. -

-
- Juergen Hoeller - Rick Evans (.NET) - - -
- - - Simple interface for objects that are sources for - s. - - -

- This is the base interface for the abstraction encapsulated by - Spring.NET's interface. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Return an for this resource. - - - - Clients of this interface must be aware that every access of this - property will create a fresh ; - it is the responsibility of the calling code to close any such - . - - - - An . - - - If the stream could not be opened. - - - - - Creates a resource relative to this resource. - - - The path (always resolved as relative to this resource). - - - The relative resource. - - - If the relative resource could not be created from the supplied - path. - - - If the resource does not support the notion of a relative path. - - - - - Does this resource represent a handle with an open stream? - - -

- If , the - cannot be read multiple times, and must be read and then closed to - avoid resource leaks. -

-

- Will be for all usual resource descriptors. -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - -
- - - Returns a handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available on a filesystem, or cannot be - exposed as a handle. - - - -
- - - Returns a description for this resource. - - -

- The description is typically used for diagnostics and other such - logging when working with the resource. -

-

- Implementations are also encouraged to return this value from their - method. -

-
- - A description for this resource. - -
- - - Does this resource actually exist in physical form? - - -

- An example of a resource that physically exists would be a - file on a local filesystem. An example of a resource that does not - physically exist would be an in-memory stream. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - The default special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - A string representation of the resource. - - - If the supplied is - or contains only whitespace character(s). - -
- - - Strips any protocol name from the supplied - . - - -

- If the supplied does not - have any protocol associated with it, then the supplied - will be returned as-is. -

-
- - - GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); - // returns www.mycompany.com/resource.txt - - - - The name of the resource. - - - The name of the resource without the protocol name. - -
- - - Resolves the supplied to its value - sans any leading protocol. - - - The name of the resource. - - - The name of the resource without the protocol name. - - - - - - Resolves the presence of the - value - in the supplied into a path. - - -

- The default implementation simply returns the supplied - as is. -

-
- - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - -
- - - This implementation returns the - of this resource. - - - - - - Determines whether the specified is - equal to the current . - - -

- This implementation compares values. -

-
- -
- - - Serves as a hash function for a particular type, suitable for use - in hashing algorithms and data structures like a hash table. - - -

- This implementation returns the hashcode of the - property. -

-
- -
- - - Factory Method. Create a new instance of the current resource type using the given resourceName - - - - - The ResourceLoader to be used for resolving relative resources - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Creates a new resource that is relative to this resource based on the - supplied . - - -

- This method can accept either a fully qualified resource name or a - relative resource name as it's parameter. -

-

- A fully qualified resource is one that has a protocol prefix and - all elements of the resource name. All other resources are treated - as relative to this resource, and the following rules are used to - locate a relative resource: -

- - - If the starts with '..', - the current resource path is navigated backwards before the - is concatenated to the current - of - this resource. - - - If the starts with '/', the - current resource path is ignored and a new resource name is - appended to the - of - this resource. - - - If the starts with '.' or a - letter, a new path is appended to the current - of - this resource. - - -
- - The name of the resource to create. - - The relative resource. - - If the process of resolving the relative resource yielded an - invalid URI. - - - If this resource does not support the resolution of relative - resources (as determined by the value of the - - property). - - -
- - - Calculates a new resource path based on the supplied - . - - - The relative path to evaluate. - - The newly calculated resource path. - - - - The special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
- -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the protocol associated with this resource (if any). - - -

- The value of this property may be if no - protocol is associated with the resource type (for example if the - resource is a memory stream). -

-
- - The protocol associated with this resource (if any). - -
- - - Does this resource represent a handle with an open stream? - - -

- This, the default implementation, always returns - . -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - - - - - Returns a handle for this resource. - - -

- This, the default implementation, always throws a - , assuming that the - resource cannot be resolved to an absolute file path. -

-
- - The handle for this resource. - - - This implementation always throws a - . - - - -
- - - Does this resource actually exist in physical form? - - -

- This implementation checks whether a - can be opened, falling back to whether a - can be opened. -

-

- This will cover both directories and content resources. -

-

- This implementation will also return if - permission to the (file's) path is denied. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - Does this support relative - resource retrieval? - - -

- This property is generally to be consulted prior to attempting - to attempting to access a resource that is relative to this - resource (via a call to - ). -

-

- This, the default implementation, always returns - . -

-
- - if this - supports relative resource - retrieval. - -
- - - Gets the root location of the resource. - - -

- Where root resource can be taken to mean that part of the resource - descriptor that doesn't change when a relative resource is looked - up. Examples of such a root location would include a drive letter, - a web server name, an assembly name, etc. -

-
- - The root location of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets the current path of the resource. - - -

- An example value of this property would be the name of the - directory containing a filesystem based resource. -

-
- - The current path of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets those characters that are valid path separators for the - resource type. - - -

- An example value of this property would be the - and - values for a - filesystem based resource. -

-

- Any derived classes that override this method are expected to - return a new array for each access of this property. -

-
- - Those characters that are valid path separators for the resource - type. - - - This, the default implementation, always throws a - . - -
- - - An implementation for - resources stored within assemblies. - - -

- This implementation expects any resource name passed to the - constructor to adhere to the following format: -

-

- assembly://assemblyName/namespace/resourceName -

-
- Aleksandar Seovic (.NET) - Federico Spinazzi (.NET) -
- - - Creates a new instance of the - class. - - - The name of the assembly resource. - - - If the supplied did not conform - to the expected format. - - - If the assembly specified in the supplied - was loaded twice with two - different evidences. - - - If the assembly specified in the supplied - could not be found. - - - If the caller does not have the required permission to load - the assembly specified in the supplied - . - - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the caller does not have the required permission to load - the underlying assembly's manifest. - - - - - - - Does the embedded resource specified in the value passed to the - constructor exist? - - - if this resource actually exists in physical - form (for example on a filesystem). - - - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (the assembly name in this - case). - - - The root location of the resource. - - - - - - Gets the current path of the resource (the namespace in which the - target resource was embedded in this case). - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - - - - Used when retrieving information from the standard .NET configuration - files (App.config / Web.config). - - -

- If created with the name of a configuration section, then all methods - aside from the description return , - , or throw an exception. If created with an - , then the - property - will return a corresponding to parse. -

-
- Mark Pollack - Rick Evans -
- - - Creates new instance of the - class. - - - The actual XML configuration section. - - - If the supplied is . - - - - - Creates new instance of the - class. - - - The name of the configuration section. - - - If the supplied is - or contains only whitespace character(s). - - - - - Returns the handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a description for this resource (the name of the - configuration section in this case). - - - A description for this resource. - - - - - - Does this resource actually exist in physical form? - - -

- This implementation always returns . -

-
- - - - - -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Exposes the actual for the - configuration section. - - -

- Introduced to accomodate line info tracking during parsing. -

-
-
- - - Holder that combines with a specific encoding to be used for reading - from the resource - - Juergen Hoeller - Erich Eichinger (.NET) - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - the resource to read from. Must not be null - whether to autoDetect encoding from byte-order marks () - - - - Create an encoded resource using the specified encoding. - - the resource to read from. Must not be null - the encoding to use. If null, encoding will be autodetected. - whether to autoDetect encoding from byte-order marks () - - - - - - - - - - Determine whether equals this instance. - - - true if obj is an and both - , and are equal. - - - - - Calculate the unique hash code for this instance. - - - - - - Get a textual description of the resource. - - - - - Get the underlying resource - - - - - Get the encoding to use for reading, if any. May be null - - - - - whether to autoDetect encoding from byte-order marks () - - - - - A backed resource. - - -

- Supports resolution as both a and a - . -

-

- Also supports the use of the ~ character. If the ~ character - is the first character in a resource path (sans protocol), the ~ - character will be replaced with the value of the - System.AppDomain.CurrentDomain.BaseDirectory property (an example of - this can be seen in the examples below). -

-
- -

- Consider the example of an application that is running (has been launched - from) the C:\App\ directory. The following resource paths will map - to the following resources on the filesystem... -

- - strings.txt C:\App\strings.txt - ~/strings.txt C:\App\strings.txt - file://~/strings.txt C:\App\strings.txt - file://~/../strings.txt C:\strings.txt - ../strings.txt C:\strings.txt - ~/../strings.txt C:\strings.txt - - // note that only a leading ~ character is resolved to the executing directory... - stri~ngs.txt C:\App\stri~ngs.txt - -
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - If the supplied is - or contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - Supresses initialization of this instance. Used from derived classes. - - - If the supplied is - or contains only whitespace character(s). - - - - - Initializes this instance. - - - - - - Resolves the handle - for the supplied . - - - The name of the file system resource. - - - The handle for this resource. - - - - - Resolves the root location for the supplied . - - - The name of the file system resource. - - - The root location of the resource. - - - - - Resolves the path for the supplied . - - - The name of the file system resource. - - - The current path of the resource. - - - - - Resolves the presence of the - value - in the supplied into a path. - - - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the underlying handle for - this resource. - - - The handle for this resource. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (a drive or UNC file share - name in this case). - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the underlying file could not be found. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - adapter implementation for a - . - - -

- Should only be used if no other - implementation is applicable. -

-

- In contrast to other - implementations, this is an adapter for an already opened - resource - the - therefore always returns . Do not use this class - if you need to keep the resource descriptor somewhere, or if you need - to read a stream multiple times. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The input to use. - - - Where the input comes from. - - - If the supplied is - . - - - - - The input to use. - - - If the underlying has already - been read. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Custom type converter for instances. - - -

- A resource path may contain placeholder variables of the form ${...} - that will be expended to environment variables. -

-

- Currently only supports conversion from a - instance. -

-
- -

- On Win9x boxes, this resource path, ${userprofile}\objects.xml will - be expanded at runtime with the value of the 'userprofile' environment - variable substituted for the '${userprofile}' portion of the path. -

- - // assuming a user called Rick, running on a plain vanilla Windows XP setup... - // this resource path... - - ${userprofile}\objects.xml - - // will become (after expansion)... - - C:\Documents and Settings\Rick\objects.xml - -
- Mark Pollack - - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified resourceLoader. - - the underlying IResourceLoader to be used to resolve resources - - - - Returns whether this converter can convert an object of one - to a - - - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - - - - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An if successful. - - - If the resource name objectained form the supplied - is malformed. - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - Resolve the given path, replacing placeholder values with - corresponding property values if necessary. - - -

- This implementation resolves environment variables only. -

-
- The original resource path. - The resolved resource path. -
- - - Return the used to - resolve the string. - - - The used to resolve - the string. - - - - - Registry class that allows users to register and retrieve protocol handlers. - - - - Resource handler is an implementation of interface - that should be used to process resources with the specified protocol. - - - They are used throughout the framework to access resources from various - sources. For example, application context loads object definitions from the resources - that are processed using one of the registered resource handlers. - - Following resource handlers are registered by default: - - - Protocol - Handler Type - Description - - - config - - Resolves the resources by loading specified configuration section from the standard .NET config file. - - - file - - Resolves filesystem resources. - - - http - - Resolves remote web resources. - - - https - - Resolves remote web resources via HTTPS. - - - ftp - - Resolves ftp resources. - - - assembly - - Resolves resources that are embedded into an assembly. - - - web - Spring.Core.IO.WebResource, Spring.Web* - Resolves resources relative to the web application's virtual directory. - - - * only available in web applications. - - Users can create and register their own protocol handlers by implementing interface - and mapping custom protocol name to that implementation. See for details - on how to register custom protocol handler. - - - Aleksandar Seovic - - - - Name of the .Net config section that contains definitions - for custom resource handlers. - - - - - Registers standard and user-configured resource handlers. - - - - - Returns resource handler for the specified protocol name. - - - - This method returns object that should be used - to create an instance of the -derived type by passing - resource location as a parameter. - - - Name of the protocol to get the handler for. - Resource handler constructor for the specified protocol name. - If is null. - - - - Returns true if a handler is registered for the specified protocol, - false otherwise. - - Name of the protocol. - - true if a handler is registered for the specified protocol, false otherwise. - - If is null. - - - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The type name of the concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Allows to create any arbitrary Url format - - - - - A adapter implementation encapsulating a simple string. - - Erich Eichinger - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Get the to - for accessing this resource. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Gets the encoding used to create a byte stream of the string. - - - - - Gets the content encapsulated by this . - - - - - A backed resource - on top of - - -

- Obviously supports resolution as a , and also - as a in the case of the "file:" - protocol. -

-
- -

- Some examples of the strings that can be used to initialize a new - instance of the class - include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) - - - -
- - - Creates a new instance of the - class. - - -

- Some examples of the values that the - can typically be expected to hold include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- - A string representation of the resource. - -
- - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the instance - used for the resource resolution. - - - A instance. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - Returns a handle for this resource. - - - The handle for this resource. - - - If the resource is not available on a filesystem. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource. - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Converts string representation of a credential for Web client authentication - into an instance of . - - -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. -

- - - - - - -
- Bruno Baia -
- - - Can we convert from the sourcetype - to a instance ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A instance if successful. - - - - - A custom for any - primitive numeric type such as , - , , etc. - - -

- Can use a given for - (locale-specific) parsing and rendering. -

-

- This is not meant to be used as a system - but rather as a - locale-specific number converter within custom controller code, to - parse user-entered number strings into number properties of objects, - and render them in a UI form. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The primitive numeric to convert to. - - - The to use for - (locale-specific) parsing and rendering - - - Is an empty string allowed to be converted? If - , an empty string value will be converted to - numeric 0. - - Id the supplied is not a primitive - . - - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - -
- - - Converts the specified object (a string) to the required primitive - type. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - A primitive representation of the string value. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Custom implementation for - objects. - - -

- Handles conversion from an XML formatted string to a - object - (see below for an example of the expected XML format). -

-

- This converter must be registered before it will be available. Standard - converters in this namespace are automatically registered by the - class. -

-
- -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. Note that the name of the top level - (document) element is quite arbitrary... it is only the content that - matters (and which must be in the format - <add key="..." value="..."/>. For your continued sanity - though, you may wish to standardize on the top level name of - 'dictionary' (although you are of course free to not do so). -

- - - - - - -

- The following example uses a different top level (document) element - name, but is equivalent to the first example. -

- - - - - - -
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from an - XML formatted instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - - - - Converts string representation of a regular expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts string representation of the registry key - into instance. - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Generates partial registry key name. - - - Key elements. - - - Index of the last element to use. - - - Friendly key name containing key element from - 0 to , inclusive. - - - - - Returns for the specified - root hive name. - - - Root hive name. - - - Registry key for the specified name. - - - - - Converts a two part string, (resource name, assembly name) - to a ResourceManager instance. - - - - - This constant represents the name of the folder/assembly containing global resources. - - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - If the specified does not denote a valid resource - - - - Converter for from a comma separated - list of RBG values. - - -

- Please note that this class does not implement converting - to a comma separated list of RBG values from a - . -

-
- Federico Spinazzi -
- - - Returns whether this converter can convert an object of one - to a - . - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Converts the specified object (a string) a - instance. - - - A - that provides a format context. - - - The to use - as the current culture: currently ignored. - - - The value that is to be converted, in "R,G,B", "A,R,G,B", or - symbolic color name (). - - - A representation of the string value. - - - If the input string is not in a supported format, or is not one of the - predefined system colors (). - - - - - A custom for - runtime type references. - - -

- Currently only supports conversion to and from a - . -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to the - of this converter. - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Returns whether this converter can convert the object to the specified - . - - - A - that provides a format context. - - - A that represents the - you want to convert to. - - True if the conversion is possible. - - - - Converts the given value to the type of this converter. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An that represents the converted value. - - - - - Converts the given value object to the specified type, - using the specified context and culture information. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - The to convert the - parameter to. - - - An that represents the converted value. - - - - - Converter for to directly set a - property. - - Jurgen Hoeller - Mark Pollack (.NET) - - - - Create a new StreamConverter using the default - . - - - - - Create a new StreamConverter using the given - . - - - The to use. - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts a separated to a - array. - - -

- Defaults to using the , (comma) as the list separator. Note that the value - of the current is - not used. -

-

- If you want to provide your own list separator, you can set the value of the - - property to the value that you want. Please note that this value will be used - for all future conversions in preference to the default list separator. -

-

- Please note that the individual elements of a string will be passed - through as is (i.e. no conversion or trimming of surrounding - whitespace will be performed). -

-

- This should be - automatically registered with any - implementations. -

-
- - - public class StringArrayConverterExample - { - public static void Main() - { - StringArrayConverter converter = new StringArrayConverter(); - - string csvWords = "This,Is,It"; - string[] frankBoothWords = converter.ConvertFrom(csvWords); - - // the 'frankBoothWords' array will have 3 elements, namely - // "This", "Is", "It". - - // please note that extraneous whitespace is NOT trimmed off - // in the current implementation... - string csv = " Cogito ,ergo ,sum "; - string[] descartesWords = converter.ConvertFrom(csv); - - // the 'descartesWords' array will have 3 elements, namely - // " Cogito ", "ergo ", "sum ". - // notice how the whitespace has NOT been trimmed. - } - } - - - -
- - - Can we convert from a the sourcetype to a array? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to a - array. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - The value that will be used as the list separator when performing - conversions. - - - A 'single' string character that will be used as the list separator - when performing conversions. - - - If the supplied value is not and is an empty - string, or has more than one character. - - - - - Base parser for custom specifiers. - - - - - Convert int value to a Timespan based on the specifier - - - - - - - Check if the string contains the specifier and - - - - - - - Specifier - - - - - Recognize 10d as ten days - - - - - Parse value as days - - Timespan in days - - - - - Day specifier: d - - - - - Recognize 10h as ten hours - - - - - Parse value as hours - - Timespan in hours - - - - - Hour specifier: h - - - - - Recognize 10m as ten minutes - - - - - Parse value as minutes - - Timespan in minutes - - - - - Minute specifier: m - - - - - Recognize 10s as ten seconds - - - - - Parse value as seconds - - Timespan in seconds - - - - - Second specifier: s - - - - - Recognize 10ms as ten milliseconds - - - - - Parse value as milliseconds - - Timespan in milliseconds - - - - - Millisecond specifier: ms - - - - - Converter for instances. - - Bruno Baia - Roberto Paterlini - - - - Creates a new instance of the - class. - - - - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Utility methods that are used to convert objects from one type into another. - - Aleksandar Seovic - - - - Convert the value to the required (if necessary from a string). - - The proposed change value. - - The we must convert to. - - Property name, used for error reporting purposes... - - If there is an internal error. - - The new value, possibly the result of type conversion. - - - - Utility method to create a property change event. - - - The full name of the property that has changed. - - The property old value - The property new value - - A new . - - - - - Determines if a Type implements a specific generic interface. - - Candidate to evaluate. - The to test for in the Candidate . - if a match, else - - - - Registry class that allows users to register and retrieve type converters. - - Aleksandar Seovic - - - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - Registers standard and configured type converters. - - - - - Returns for the specified type. - - Type to get the converter for. - a type converter for the specified type. - If is null. - - - - Registers for the specified type. - - Type to register the converter for. - Type converter to register. - If either of arguments is null. - - - - Registers for the specified type. - - - This is a convinience method that accepts the names of both - type to register converter for and the converter itself, - resolves them using , creates an - instance of type converter and calls overloaded - method. - - Type name of the type to register the converter for (can be a type alias). - Type name of the type converter to register (can be a type alias). - If either of arguments is null or empty string. - - If either of arguments fails to resolve to a valid . - - - If type converter does not derive from or if it cannot be instantiated. - - - - - Converts between instances of and their string representations. - - Erich Eichinger - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A that provides a format context. - - - A that represents the you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful, otherwise. - - The conversion cannot be performed. - - - - Returns whether this converter can convert the object to the specified type, using the specified context. - - An that provides a format context. - A that represents the type you want to convert to. - - true if this converter can perform the conversion; otherwise, false. - - - At the moment only conversion to string is supported. - - - - - Converts the given value object to the specified type, using the specified context and culture information. - - - - An that represents the converted value. - - - A . If null is passed, the current culture is assumed. - An that provides a format context. - The to convert the value parameter to. - The to convert. - The conversion cannot be performed. - The destinationType parameter is null. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Resolves (instantiates) a by it's (possibly - assembly qualified) name, and caches the - instance against the type name. - - Rick Evans - Bruno Baia - Erich Eichinger - - - - Resolves a by name. - - -

- The rationale behind the creation of this interface is to centralise - the resolution of type names to instances - beyond that offered by the plain vanilla - method call. -

-
- Rick Evans -
- - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - The cache, mapping type names ( instances) against - instances. - - - - - Creates a new instance of the class. - - - The that this instance will delegate - actual resolution to if a - cannot be found in this instance's cache. - - - If the supplied is . - - - - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holder for the generic arguments when using type parameters. - - -

- Type parameters can be applied to classes, interfaces, - structures, methods, delegates, etc... -

-
-
- - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The character that separates a list of generic arguments. - - - - - Creates a new instance of the GenericArgumentsHolder class. - - - The string value to parse looking for a generic definition - and retrieving its generic arguments. - - - - - Returns the array declaration portion of the definition, e.g. "[,]" - - - - - - Returns an array of unresolved generic arguments types. - - -

- A empty string represents a type parameter that - did not have been substituted by a specific type. -

-
- - An array of strings that represents the unresolved generic - arguments types or an empty array if not generic. - -
- - - The (unresolved) generic type name portion - of the original value when parsing a generic type. - - - - - The (unresolved) generic method name portion - of the original value when parsing a generic method. - - - - - Is the string value contains generic arguments ? - - -

- A generic argument can be a type parameter or a type argument. -

-
-
- - - Is generic arguments only contains type parameters ? - - - - - Is this an array type definition? - - - - - Resolves a generic by name. - - Bruno Baia - - - - Resolves a by name. - - Rick Evans - Aleksandar Seovic - Bruno Baia - - - - Resolves the supplied to a - instance. - - - The unresolved (possibly partially assembly qualified) name - of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Uses - to load an and then the attendant - referred to by the - parameter. - - -

- is - deprecated in .NET 2.0, but is still used here (even when this class is - compiled for .NET 2.0); - will - still resolve (non-.NET Framework) local assemblies when given only the - display name of an assembly (the behaviour for .NET Framework assemblies - and strongly named assemblies is documented in the docs for the - method). -

-
- - The assembly and type to be loaded. - - - A , or . - - - - -
- - - Uses - to load the attendant referred to by - the parameter. - - - The type to be loaded. - - - A , or . - - - - - Creates a new instance - from the given - - - - - Creates a new instance - from the given with the given inner - - - - - Resolves the supplied generic to a - instance. - - - The unresolved (possibly generic) name of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holds data about a and it's - attendant . - - - - - The string that separates a name - from the name of it's attendant - in an assembly qualified type name. - - - - - Creates a new instance of the TypeAssemblyHolder class. - - - The unresolved name of a . - - - - - The (unresolved) type name portion of the original type name. - - - - - The (unresolved, possibly partial) name of the attandant assembly. - - - - - Is the type name being resolved assembly qualified? - - - - - Provides access to a central registry of aliased s. - - -

- Simplifies configuration by allowing aliases to be used instead of - fully qualified type names. -

-

- Comes 'pre-loaded' with a number of convenience alias' for the more - common types; an example would be the 'int' (or 'Integer' - for Visual Basic.NET developers) alias for the - type. -

-
- Aleksandar Seovic - -
- - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - The alias around the 'int' type. - - - - - The alias around the 'Integer' type (Visual Basic.NET style). - - - - - The alias around the 'int[]' array type. - - - - - The alias around the 'Integer()' array type (Visual Basic.NET style). - - - - - The alias around the 'decimal' type. - - - - - The alias around the 'Decimal' type (Visual Basic.NET style). - - - - - The alias around the 'decimal[]' array type. - - - - - The alias around the 'Decimal()' array type (Visual Basic.NET style). - - - - - The alias around the 'char' type. - - - - - The alias around the 'Char' type (Visual Basic.NET style). - - - - - The alias around the 'char[]' array type. - - - - - The alias around the 'Char()' array type (Visual Basic.NET style). - - - - - The alias around the 'long' type. - - - - - The alias around the 'Long' type (Visual Basic.NET style). - - - - - The alias around the 'long[]' array type. - - - - - The alias around the 'Long()' array type (Visual Basic.NET style). - - - - - The alias around the 'short' type. - - - - - The alias around the 'Short' type (Visual Basic.NET style). - - - - - The alias around the 'short[]' array type. - - - - - The alias around the 'Short()' array type (Visual Basic.NET style). - - - - - The alias around the 'unsigned int' type. - - - - - The alias around the 'unsigned long' type. - - - - - The alias around the 'ulong[]' array type. - - - - - The alias around the 'uint[]' array type. - - - - - The alias around the 'unsigned short' type. - - - - - The alias around the 'ushort[]' array type. - - - - - The alias around the 'double' type. - - - - - The alias around the 'Double' type (Visual Basic.NET style). - - - - - The alias around the 'double[]' array type. - - - - - The alias around the 'Double()' array type (Visual Basic.NET style). - - - - - The alias around the 'float' type. - - - - - The alias around the 'Single' type (Visual Basic.NET style). - - - - - The alias around the 'float[]' array type. - - - - - The alias around the 'Single()' array type (Visual Basic.NET style). - - - - - The alias around the 'DateTime' type. - - - - - The alias around the 'DateTime' type (C# style). - - - - - The alias around the 'DateTime' type (Visual Basic.NET style). - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime()' array type (Visual Basic.NET style). - - - - - The alias around the 'bool' type. - - - - - The alias around the 'Boolean' type (Visual Basic.NET style). - - - - - The alias around the 'bool[]' array type. - - - - - The alias around the 'Boolean()' array type (Visual Basic.NET style). - - - - - The alias around the 'string' type. - - - - - The alias around the 'string' type (Visual Basic.NET style). - - - - - The alias around the 'string[]' array type. - - - - - The alias around the 'string[]' array type (Visual Basic.NET style). - - - - - The alias around the 'object' type. - - - - - The alias around the 'object' type (Visual Basic.NET style). - - - - - The alias around the 'object[]' array type. - - - - - The alias around the 'object[]' array type (Visual Basic.NET style). - - - - - The alias around the 'int?' type. - - - - - The alias around the 'int?[]' array type. - - - - - The alias around the 'decimal?' type. - - - - - The alias around the 'decimal?[]' array type. - - - - - The alias around the 'char?' type. - - - - - The alias around the 'char?[]' array type. - - - - - The alias around the 'long?' type. - - - - - The alias around the 'long?[]' array type. - - - - - The alias around the 'short?' type. - - - - - The alias around the 'short?[]' array type. - - - - - The alias around the 'unsigned int?' type. - - - - - The alias around the 'unsigned long?' type. - - - - - The alias around the 'ulong?[]' array type. - - - - - The alias around the 'uint?[]' array type. - - - - - The alias around the 'unsigned short?' type. - - - - - The alias around the 'ushort?[]' array type. - - - - - The alias around the 'double?' type. - - - - - The alias around the 'double?[]' array type. - - - - - The alias around the 'float?' type. - - - - - The alias around the 'float?[]' array type. - - - - - The alias around the 'bool?' type. - - - - - The alias around the 'bool?[]' array type. - - - - - Registers standard and user-configured type aliases. - - - - - Registers an alias for the specified . - - -

- This overload does eager resolution of the - referred to by the parameter. It will throw a - if the referred - to by the parameter cannot be resolved. -

-
- - A string that will be used as an alias for the specified - . - - - The (possibly partially assembly qualified) name of the - to register the alias for. - - - If either of the supplied parameters is or - contains only whitespace character(s). - - - If the referred to by the supplied - cannot be loaded. - -
- - - Registers short type name as an alias for - the supplied . - - - The to register. - - - If the supplied is . - - - - - Registers an alias for the supplied . - - - The alias for the supplied . - - - The to register the supplied under. - - - If the supplied is ; or if - the supplied is or - contains only whitespace character(s). - - - - - Resolves the supplied to a . - - - The alias to resolve. - - - The the supplied was - associated with, or if no - was previously registered for the supplied . - - - If the supplied is or - contains only whitespace character(s). - - - - - Returns a flag specifying whether TypeRegistry contains - specified alias or not. - - - Alias to check. - - - true if the specified type alias is registered, - false otherwise. - - - - - Helper methods with regard to type resolution. - - -

- Not intended to be used directly by applications. -

-
- Bruno Baia -
- - - Creates a new instance of the class. - - -

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

-
-
- - - Resolves the supplied type name into a - instance. - - -

- If you require special resolution, do - not use this method, but rather instantiate - your own . -

-
- - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the type cannot be resolved. - -
- - - Resolves a string array of interface names to - a array. - - - An array of valid interface names. Each name must include the full - interface and assembly name. - - An array of interface s. - - If any of the interfaces can't be loaded. - - - If any of the s specified is not an interface. - - - If (or any of its elements ) is - . - - - - - Match a method against the given pattern. - - the pattern to match against. - the method to match. - - if the method matches the given pattern; otherwise . - - - If the supplied is invalid. - - - - - Exception thrown when the ObjectFactory cannot load the specified type of a given object. - - Mark Pollack - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException 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 ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Initializes 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. - - - - - Initializes a new instance of the class. - - The resource description that the object definition came from. - Name of the object requested - Name of the object type. - The root cause. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Gets he name of the object we are trying to load. - - The name of the object. - - - - Gets the name of the object type we are trying to load. - - The name of the object type. - - - - Gets the resource description that the object definition came from - - The resource description. - - - - A implementation that represents - a composed collection of instances. - - - - - The criteria for an arbitrary filter. - - Rick Evans - - - - Does the supplied satisfy the criteria - encapsulated by this instance? - - - The datum to be checked by this criteria instance. - - - if the supplied - satisfies the criteria encapsulated by this instance; - if not, or the supplied - is . - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A user-defined (child) criteria that will be composed into this instance. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The data to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Adds the supplied into the criteria - composed within this instance. - - - The to be added. - - - - - The list of composing this - instance. - - - - - Factory class to conceal any default implementation. - - Rod Johnson - Simon White (.NET) - - - - Creates a new instance of the - implementation provided by this factory. - - - A new instance of the - implementation provided by this factory. - - - - - Interface to be implemented by objects that can return information about - the current call stack. - - -

- Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - The to look for. - - - if the caller is under the supplied . - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - - The to look for. - - The name of the method to look for. - - if the caller is under the supplied - and . - - - - - Does the current stack trace contain the supplied ? - - The token to match against. - - if the current stack trace contains the supplied - . - - - - - Creates a new instance of the - class. - - - - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - -

- Matches the whole method name. -

-
- -
- - - Does the current stack trace contain the supplied ? - - -

- This leaves it up to the caller to decide what matches, but is obviously less of - an abstraction because the caller must know the exact format of the underlying - stack trace. -

-
- -
- - - Provides methods to support various naming and other conventions used throughout the framework. - Mainly for internal use within the framework. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - Convert Strings in attribute name format (lowercase, hyphens separating words) - into property name format (camel-cased). For example, transaction-manager is - converted into transactionManager. - - - - - Convenience class that exposes a signature that matches the - delegate. - - -

- Useful when filtering members via the - mechanism. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - - - Returns true if the supplied instance - satisfies the supplied (which must be an - implementation). - - - The instance that will be checked to see if - it matches the supplied . - - - The criteria against which to filter the supplied - instance. - - - True if the supplied instance - satisfies the supplied (which must be an - implementation); false if not or the - supplied is not an - implementation or is null. - - - - - Interface that can be implemented by exceptions etc that are error coded. - - -

- The error code is a , rather than a number, so it can - be given user-readable values, such as "object.failureDescription". -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Return the error code associated with this failure. - - -

- The GUI can render this anyway it pleases, allowing for I18n etc. -

-
- - The error code associated with this failure, - or the empty string instance if not error-coded. - -
- - - Thrown in response to referring to an invalid property (most often via reflection). - - Rick Evans - - - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - - - Creates a new instance of the InvalidPropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The that is (or rather was) the source of the - offending property. - - - - - The name of the offending property. - - - - - Extension of the interface, expressing a 'priority' - ordering: Order values expressed by IPriorityOrdered objects always - apply before order values of 'plain' Ordered values. - - - This is primarily a special-purpose interface, used for objects - where it is particularly important to determine 'prioritized' - objects first, without even obtaining the remaining objects. - A typical example: Prioritized post-processors in a Spring - - - IPriorityOrdered post-processor objects are initialized in - a special phase, ahead of other post-processor objects. - - Juergen Hoeller - Mark Pollack (.NET) - - - - - - - Criteria that is satisfied if the of each of the - arguments matches each of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - -

- This implementation respects the inheritance chain of any parameter - s... i.e. methods that have a base type (or - interface) that is assignable to the in the - same corresponding index of the parameter types will satisfy this - criteria instance. -

-
- The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - -
- - - Criteria that is satisfied if the number of generic arguments to a given - matches an arbitrary number. - - -

- This class supports checking the generic arguments count of both - generic methods and constructors. -

-
- Bruno Baia -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Thrown when a method (typically a property getter or setter invoked via reflection) - throws an exception, analogous to a . - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for exceptions related to a property access, such as a - mismatch or a target invocation exception. - - Rod Johnson - Mark Pollack (.NET) - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessException class. - - - - - Creates a new instance of the PropertyAccessException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Returns the PropertyChangeEventArgs that resulted in the problem. - - - - - The string error code used to classify the error. - - - - - Creates a new instance of the MethodInvocationException class. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Constructor to use when an exception results from a - . - - - The raised by the invoked property. - - - The that - resulted in an exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The error code string for this exception. - - - - - Criteria that is satisfied if the method Name of an - instance matches a - supplied string pattern. - - - - Supports the following simple pattern styles: - "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - - Bruno Baia - - - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to * (any method name). -

-
-
- - - Creates a new instance of the - class. - - The pattern that names - must match against in order to satisfy this criteria. - - If the supplied is null or resolve to an empty string. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is null or resolve to an empty string. - - - - - Helper class that encapsulates the specification of a method parameter, i.e. - a MethodInfo or ConstructorInfo plus a parameter index. - Useful as a specification object to pass along. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - Initializes a new instance of the class for the given - MethodInfo. - - The MethodInfo to specify a parameter for. - Index of the parameter. - - - - Initializes a new instance of the class. - - The ConstructorInfo to specify a parameter for. - Index of the parameter. - - - - Create a new MethodParameter for the given method or donstructor. - This is a convenience constructor for scenarios where a - Method or Constructor reference is treated in a generic fashion. - - The method or constructor to specify a parameter for. - Index of the parameter. - the corresponding MethodParameter instance - - - - Parameters the name of the method/constructor parameter. - - the parameter name. - - - - Gets the type of the method/constructor parameter. - - The type of the parameter. (never null) - - - - Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The MethodInfo, or null if none. - - - - Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The ConstructorInfo, or null if none - - - - Criteria that is satisfied if the number of parameters to a given - matches an arbitrary number. - - -

- This class supports checking the parameter count of both methods and - constructors. -

-

- Default parameters, etc need to taken into account. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Criteria that is satisfied if the of each of the - parameters of a given matches each - of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the return of a given - matches a given . - - Rick Evans - - - - The return to match against if no - is provided explictly. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Thrown in response to a failed attempt to read a property. - - -

- Typically thrown when attempting to read the value of a write-only - property via reflection. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - 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. - - - - - Thrown in response to a failed attempt to write a property. - - Mark Pollack (.NET) - - - - Creates a new instance of the NotWritablePropertyException class. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class - summarizing what property was not writable. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - - - Creates new NotWritablePropertyException with a root cause. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - The root cause indicating why the property was not writable. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to encountering a value - when traversing a nested path expression. - - - - - 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 of the object where the property was not found. - - The name of the property not found. - - - - Creates a new instance of the - class. - - - The of the object where the property was not found. - - The name of the property not found. - A message about the exception. - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the offending property. - - - - - The of the class where the property was last looked for. - - - - - Comparator implementation for objects, sorting by - order value ascending (resp. by priority descending). - - -

- Non- objects are treated as greatest order values, - thus ending up at the end of a list, in arbitrary order (just like same order values of - objects). -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Compares two objects and returns a value indicating whether one is less than, - equal to or greater than the other. - - -

- Uses direct evaluation instead of - to avoid unnecessary boxing. -

-
- The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - -
- - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - Provides additional data for the PropertyChanged event. - - -

- Provides some additional properties over and above the name of the - property that has changed (which is inherited from the - base class). - This allows calling code to determine whether or not a property has - actually changed (i.e. a PropertyChanged event may have been - raised, but the value itself may be equivalent). -

-
- -
- - - Create a new instance of the - class. - - - The name of the property that was changed. - The old value of the property. - the new value of the property. - - - - Get the old value for the property. - - - - - - Get the new value of the property. - - - - - - A base class for all - implementations that are regular expression based. - - Rick Evans - - - - The default pattern... matches absolutely anything. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The regular expression pattern to be applied. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Convenience method that calls the - - on the supplied . - - The input to match against. - True if the matches. - - - - The regular expression pattern to be applied. - - - - - The regular expression options to be applied. - - - - - The regular expression to be applied. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default event name pattern... matches pretty much any event name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default method name pattern... matches pretty much any method name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Exception thrown on a mismatch when trying to set a property - or resolve an argument to a method invocation. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the TypeMismatchException class. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the TypeMismatchException class describing the - property and required type that could not used to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - - - - Creates a new instance of the TypeMismatchException class describing the - property, required type, and underlying exception that could not be used - to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - The underlying exception. - - - - Creates a new instance of the TypeMismatchException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The string error code used to classify the exception. - - - - - Abstract base class for implementations. - - Aleksandar Seovic - - - - An interface that defines the methods that have to be implemented by all data bindings. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - The name of the always filled error provider - - - - - Gets or sets a flag specifying whether this binding is valid. - - - true if this binding evaluated without errors; - false otherwise. - - - - - Marks this binding's state as invalid for this validationErrors collection. - Returns false if is null. - - - false, if validationErrors is null - - - - Initializes a new instance of the class. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets the unique ID of this binding instance. - - - - - Gets or sets the . - - The binding direction. - - - - Gets the error message. - - The error message. - - - - Gets the error providers. - - - - - Abstract base class for simple, one-to-one implementations. - - Aleksandar Seovic - - - - Initialize a new instance of without any - - - - - Initialize a new instance of with the - specified . - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation if source to target binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation of target to source binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets or sets the to use. - - The formatter to use. - - - - Base implementation of the . - - Aleksandar Seovic - - - - An interface that has to be implemented by all data binding containers. - - Aleksandar Seovic - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Gets a value indicating whether this data binding container - has bindings. - - - true if this data binding container has bindings; - false otherwise. - - - - - Creates a new instance of . - - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Implemented as a NOOP for containers. - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Gets a list of bindings for this container. - - - A list of bindings for this container. - - - - - Gets a value indicating whether this instance has bindings. - - - true if this instance has bindings; otherwise, false. - - - - - BaseBindingManager keeps track of all registered bindings and - represents an entry point for the binding and unbinding process. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Enumeration that defines possible values for data binding direction. - - Aleksandar Seovic - - - - Specifies that value from the control property should be bound to a data model. - - - - - Specifies that value from the data model should be bound to control property. - - - - - Specifies that binding is bidirectional. - - - - - Represents an ErrorMessage specific to a binding instance. - - Erich Eichinger - - - - Represents a single validation error message. - - Aleksandar Seovic - Goran Milosavljevic - - - - Default constructor. - - - - - Initializes a new instance of the class. - - Error message resource identifier. - Parameters that should be used for message resolution. - - - - Initializes a new instance of the class copying values from another instance. - - Another Error message instance to copy values from. - - - - This property is reserved, apply the - - to the class instead. - - - An - that describes the XML representation of the object that - is produced by the - - method and consumed by the - - method. - - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Resolves the message against specified . - - Message source to resolve this error message against. - Resolved error message. - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets or sets the resource identifier for this message. - - The resource identifier for this message. - - - - Gets or sets the message parameters. - - The message parameters. - - - - Initializes a new instance of the class. - - the id of the binding this error message is associated with - the message id - optional parameters to this message - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Get the ID of the binding this message instance relates to. - - - - - Interface that should be implemented by data bound objects, such as - web pages, user controls, windows forms, etc. - - Aleksandar Seovic - - - - Gets the binding manager. - - The binding manager. - - - - implementation that allows - data binding between collections that implement - interface. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Simple, expression-based implementation of that - binds source to target one-to-one. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - The formatter to use. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the source expression. - - The source expression. - - - - Gets the target expression. - - The target expression. - - - - Minimal AST node interface used by ANTLR AST generation and tree-walker. - - - - - Add a (rightmost) child to this node - - - - - - Get the first child of this node; null if no children - - - - - Get the next sibling in line after this one - - - - - Get the token text for this node - - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Set the first child of a node. - - - - - - Set the next sibling after this one. - - - - - - Set the token text for this node - - - - - - Set the token type for this node - - - - - - Get the token type for this node - - - - - Event type. - - - - Used for creating Token instances. - - - Used for caching lookahead characters. - - - - This method is executed by ANTLR internally when it detected an illegal - state that cannot be recovered from. - The previous implementation of this method called - and writes directly to , which is usually not - appropriate when a translator is embedded into a larger application. - - Error message. - - - - A creator of Token object instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of Token objects. - - - Since Lexers in ANTLR use a single Token type, each TokenCreator can - create one class of Token objects (that's why it's not called TokenFactory). - - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - The fully qualified name of the Token type to create. - - - - - Type object used as a template for creating tokens by reflection. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - This type was created in VisualAge. - - - - Report exception errors caught in nextToken() - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - - Represents a stream of characters fed to the lexer from that can be rewound - via mark()/rewind() methods. - - - - A dynamic array is used to buffer up all the input characters. Normally, - "k" characters are stored in the buffer. More characters may be stored - during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. - Consumption of characters is deferred. In other words, reading the next - character is not done by conume(), but deferred until needed by LA or LT. - - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "CharConsumed" event. - - Event source object - Event data object - - - - Handle the "CharLA" event. - - Event source object - Event data object - - - - Handle the "Mark" event. - - Event source object - Event data object - - - - Handle the "Rewind" event. - - Event source object - Event data object - - - charBufferConsume method comment. - - - - charBufferLA method comment. - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Specify an object with support code (shared by Parser and TreeParser. - Normally, the programmer does not play with this, using - instead. - - - - - - Specify the type of node to create during tree building. - - Fully qualified AST Node type name. - - - - Specify the type of node to create during tree building. - use now to be consistent with - Token Object Type accessor. - - Fully qualified AST Node type name. - - - - - - - - Get another token object from the token stream - - - - Return the token type of the ith token of lookahead where i=1 - is the current token being examined by the parser (i.e., it - has not been matched yet). - - - - Make sure current lookahead symbol matches token type t. - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Make sure current lookahead symbol matches the given set - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Parser error-reporting function can be overridden in subclass - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - User can override to do their own debugging - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Specifies the behaviour required (i.e. parser modifications) - specifically to support parse tree debugging and derivation. - - - - Override the standard matching and rule entry/exit routines - to build parse trees. This class is useful for 2.7.3 where - you can specify a superclass like - - - class TinyCParser extends Parser(ParseTreeDebugParser); - - - - - - Each new rule invocation must have it's own subtree. Tokens are - added to the current root so we must have a stack of subtree roots. - - - - - Track most recently created parse subtree so that when parsing - is finished, we can get to the root. - - - - - For every rule replacement with a production, we bump up count. - - - - - Adds LT(1) to the current parse subtree. - - - - Note that the match() routines add the node before checking for - correct match. This means that, upon mismatched token, there - will a token node in the tree corresponding to where that token - was expected. For no viable alternative errors, no node will - be in the tree as nothing was matched() (the lookahead failed - to predict an alternative). - - - - - - Create a rule node, add to current tree, and make it current root - - - - - - Pop current root; back to adding to old root - - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - AST Support code shared by TreeParser and Parser. - - - - We use delegation to share code (and have only one - bit of code to maintain) rather than subclassing - or superclassing (forces AST support code to be - loaded even when you don't want to do AST stuff). - - - Typically, is used to specify the - homogeneous type of node to create, but you can override - to make heterogeneous nodes etc... - - - - - - Constructs an ASTFactory with the default AST node type of - . - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - Name of default AST node type for this factory. - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - MetaType of default AST node type for this factory. - - - - - Stores the Type of the default AST node class to be used during tree construction. - - - - - Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass - and ASTNodeCreator. - - - - - Stores the mapping between AST node typenames and their token ID. - - - - - Specify an "override" for the type created for - the specified Token type. - - - This method is useful for situations that ANTLR cannot oridinarily deal - with (i.e., when you create a token based upon a nonliteral token symbol - like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token - type (and hence the AST) statically. - - Token type to override. - - Fully qualified AST typename (or null to specify - the factory's default AST type). - - - - - Register an AST Node Type for a given Token type ID. - - The Token type ID. - The AST Node Type to register. - - - - Register an ASTNodeCreator for a given Token type ID. - - The Token type ID. - The creater to register. - - - - Register an ASTNodeCreator to be used for creating node by default. - - The ASTNodeCreator. - - - - Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings - to the specified size. - This is primarily a convenience method that can be used to prevent - unnecessary and costly re-org of the mappings list. - - Maximum Token Type ID. - - - - Add a child to the current AST - - The AST to add a child to - The child AST to be added - - - - Creates a new uninitialized AST node. Since a specific AST Node Type - wasn't indicated, the new AST node is created using the current default - AST Node type - - - An uninitialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. Once created, - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - Fully qualified name of the Type to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. - - Token instance to be used to initialize the new AST Node. - - Fully qualified name of the Type to be used for creating the new AST Node. - - A newly created and initialized AST node object. - - Once created, the new AST node is initialized with the specified Token - instance. The used for creating this new AST - node is determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - - - - Creates and initializes a new AST node using the specified AST Node instance. - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by aNode. - The AST Node type must have a default/parameterless constructor. - - AST Node instance to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token instance. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token instance to be used to create new AST Node. - An initialized AST node object. - - - - Returns a copy of the specified AST Node instance. The copy is obtained by - using the method Clone(). - - AST Node to copy. - An AST Node (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node and all of it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Make a tree from a list of nodes. The first element in the - array is the root. If the root is null, then the tree is - a simple list not a tree. Handles null children nodes correctly. - For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) - yields tree (nil a b). - - List of Nodes. - AST Node tree. - - - - Make a tree from a list of nodes, where the nodes are contained - in an ASTArray object. - - List of Nodes. - AST Node tree. - - - - Make an AST the root of current AST. - - - - - - - Sets the global default AST Node Type for this ASTFactory instance. - This method also attempts to load the instance - for the specified typename. - - Fully qualified AST Node Type name. - - - - To change where error messages go, can subclass/override this method - and then setASTFactory in Parser and TreeParser. This method removes - a prior dependency on class antlr.Tool. - - - - - - A creator of AST node instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of AST node objects. - - - Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever - they need to create an AST node objeect. What this class does is to support - performant extensibility of the basic ASTFactory. The ASTFactory can now be - extnded as run-time to support more new AST node types without using needing - to use reflection. - - - - - - Constructs an instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Summary description for ASTVisitor. - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Small buffer used to avoid reading individual chars - - - - - Small buffer used to avoid reading individual chars - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - A token is minimally a token type. Subclasses can add the text matched - for the token and line info. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Summary description for DumpASTVisitor. - - Simple class to dump the contents of an AST to the output - - - - Append a char to the msg buffer. If special, then show escaped version - - Message buffer - Char to append - - - - Walk parse tree and return requested number of derivation steps. - If steps less-than 0, return node text. If steps equals 1, return derivation - string at step. - - derivation steps - - - - - Get derivation and return how many you did (less than requested for - subtree roots. - - string buffer - derivation steps - - - - - Do a step-first walk, building up a buffer of tokens until - you've reached a particular step and print out any rule subroots - insteads of descending. - - derivation buffer - derivation steps - - - - - This token stream tracks the *entire* token stream coming from - a lexer, but does not pass on the whitespace (or whatever else - you want to discard) to the parser. - - - - This class can then be asked for the ith token in the input stream. - Useful for dumping out the input stream exactly after doing some - augmentation or other manipulations. Tokens are index from 0..n-1 - - - You can insert stuff, replace, and delete chunks. Note that the - operations are done lazily--only if you convert the buffer to a - string. This is very efficient because you are not moving data around - all the time. As the buffer of tokens is converted to strings, the - toString() method(s) check to see if there is an operation at the - current index. If so, the operation is done and then normal string - rendering continues on the buffer. This is like having multiple Turing - machine instruction streams (programs) operating on a single input tape. :) - - - Since the operations are done lazily at toString-time, operations do not - screw up the token index values. That is, an insert operation at token - index i does not change the index values for tokens i+1..n-1. - - - Because operations never actually alter the buffer, you may always get - the original token stream back without undoing anything. Since - the instructions are queued up, you can easily simulate transactions and - roll back any changes if there is an error just by removing instructions. - For example, - - For example: - - TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); - JavaRecognizer parser = new JavaRecognizer(rewriteEngine); - ... - rewriteEngine.insertAfter("pass1", t, "foobar");} - rewriteEngine.insertAfter("pass2", u, "start");} - System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); - System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); - - - - You can also have multiple "instruction streams" and get multiple - rewrites from a single pass over the input. Just name the instruction - streams and use that name again when printing the buffer. This could be - useful for generating a C file and also its header file--all from the - same buffer. - - - If you don't use named rewrite streams, a "default" stream is used. - - - Terence Parr, parrt@cs.usfca.edu - University of San Francisco - February 2004 - - - - - - Track the incoming list of tokens - - - - - You may have multiple, named streams of rewrite operations. - I'm calling these things "programs." - Maps string (name) -> rewrite (List) - - - - - Map string (program name) -> Integer index - - - - - track index of tokens - - - - - Who do we suck tokens from? - - - - - Which (whitespace) token(s) to throw out - - - - - Rollback the instruction stream for a program so that - the indicated instruction (via instructionIndex) is no - longer in the stream. - - - UNTESTED! - - - - - - - Reset the program so that no instructions exist - - - - - - If op.index > lastRewriteTokenIndexes, just add to the end. - Otherwise, do linear - - - - - - Execute the rewrite operation by possibly adding to the buffer. - - rewrite buffer - The index of the next token to operate on. - - - - This token tracks it's own index 0..n-1 relative to the beginning - of the stream. It is designed to work with - in TokenStreamRewriteEngine.cs - - - - - Index into token array indicating position in input stream - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Implementation of the average aggregator. - - Aleksandar Seovic - - - - Defines an interface that should be implemented - by all collection processors and aggregators. - - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Returns the average of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The average of the numeric values in the source collection. - - - - - Converts all elements in the input list to a given target type. - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the count aggregator. - - Aleksandar Seovic - - - - Returns the number of items in the source collection. - - - The source collection to process. - - - Ignored. - - - The number of items in the source collection, - or zero if the collection is empty or null. - - - - - Converts a string literal to a instance. - - Erich Eichinger - - - - - Erich Eichinger - - - - Implementation of the distinct processor. - - Aleksandar Seovic - - - - Returns distinct items from the collection. - - - The source collection to process. - - - 0: boolean flag specifying whether to include null - in the results or not. Default is false, which means that - null values will not be included in the results. - - - A collection containing distinct source collection elements. - - - If there is more than one argument, or if the single optional argument - is not Boolean. - - - - - Implementation of the maximum aggregator. - - Aleksandar Seovic - - - - Returns the largest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The largest item in the source collection. - - - - - Implementation of the minimum aggregator. - - Aleksandar Seovic - - - - Returns the smallest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The smallest item in the source collection. - - - - - Implementation of the non-null processor. - - Aleksandar Seovic - - - - Returns non-null items from the collection. - - - The source collection to process. - - - Ignored. - - - A collection containing non-null source collection elements. - - - - - Implementation of the 'order by' processor. - - Aleksandar Seovic - Erich Eichinger - - - - Sorts the source collection using custom sort criteria. - - - Please note that your compare function needs to take care about - proper conversion of types to be comparable! - - - The source collection to sort. - - - Sort criteria to use. - - - A sorted array containing collection elements. - - - - - Reverts order of elements in the list - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the sort processor. - - Aleksandar Seovic - - - - Sorts the source collection. - - - Please not that this processor requires that collection elements - are of a uniform type and that they implement - interface. -

- If you want to perform custom sorting based on element properties - you should consider using instead. - - - The source collection to sort. - - - Ignored. - - - An array containing sorted collection elements. - - - If collection is not empty and it is - neither nor . - - - -

- Implementation of the sum aggregator. - - Aleksandar Seovic -
- - - Returns the sum of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The sum of the numeric values in the source collection. - - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Base type for nodes that accept arguments. - - Aleksandar Seovic - - - - Base type for all expression nodes. - - Aleksandar Seovic - - - - For internal purposes only. Use for expression node implementations. - - - This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST - unfortunately is not marked as [Serializable].
-
- Note:Since SpringAST implements , deriving classes - have to explicitely override if they need to persist additional - data during serialization. -
-
- - - The global SpringAST node factory - - - - - Create an instance - - - - - Create an instance from a token - - - - - initialize this instance from an AST - - - - - initialize this instance from an IToken - - - - - initialize this instance from a token type number and a text - - - - - sets the text of this node - - - - - gets the text of this node - - - - - Create a new instance from SerializationInfo - - - - - populate SerializationInfo from this instance - - - - - gets or sets the token type of this node - - - - - gets or sets the text of this node - - - - - Interface that all navigation expression nodes have to implement. - - Aleksandar Seovic - - - - Returns expression value. - - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Expression variables map. - Value of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - New value for the last node of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - Expression variables map. - New value for the last node of the expression. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value. - - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Expression variables map. - Node's value. - - - - Returns node's value for the given context. - - Node's value. - - - - Evaluates this node for the given context, switching local variables map to the ones specified in . - - - - - Sets node's value for the given context. - - Object to evaluate node against. - New value for this node. - - - - Sets node's value for the given context. - - Object to evaluate node against. - Expression variables map. - New value for this node. - - - - Sets node's value for the given context. - - -

- This is a default implementation of Set method, which - simply throws . -

-

- This was done in order to avoid redundant Set method implementations, - because most of the node types do not support value setting. -

-
-
- - - Returns a string representation of this node instance. - - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Holds the state during evaluating an expression. - - - - - Gets/Sets the root context of the current evaluation - - - - - Gets/Sets the current context of the current evaluation - - - - - Gets/Sets global variables of the current evaluation - - - - - Gets/Sets local variables of the current evaluation - - - - - Initializes a new EvaluationContext instance. - - The root context for this evaluation - dictionary of global variables used during this evaluation - - - - Switches current ThisContext. - - - - - Switches current LocalVariables. - - - - - Gets the type of the - - - - - Create a new instance - - - - - Create a new instance - - - - - Append an argument node to the list of child nodes - - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - - - - Asserts the argument count. - - The required count. - - - - Resolves the arguments. - - Current expression evaluation context. - An array of argument values - - - - Resolves the named arguments. - - Current expression evaluation context. - A dictionary of argument name to value mappings. - - - - Resolves the argument. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the argument without ensuring was called. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the named argument. - - Argument name. - Current expression evaluation context. - Resolved named argument value. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed assignment node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed attribute node in the navigation expression. - - Aleksandar Seovic - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Determines the type of object that should be instantiated. - - - The type name to resolve. - - - The type of object that should be instantiated. - - - If the type cannot be resolved. - - - - - Initializes this node by caching necessary constructor and property info. - - - - - - - Sets the named arguments (properties). - - Instance to set property values on. - Argument (property) name to value mappings. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Tries to determine attribute type based on the specified - attribute type name. - - - Attribute type name to resolve. - - - Resolved attribute type. - - - If type cannot be resolved. - - - - - Base class for binary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance with the supplied operands - - - - - - - Create a new instance from SerializationInfo - - - - - Evaluate the left operand - - - - - Evaluate the left operand - - - - - Gets the left operand. - - The left operand. - - - - Gets the right operand. - - The right operand. - - - - Represents parsed boolean literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the boolean literal node. - - - This is the entrypoint into evaluating this expression. - - Node's value. - - - - Represents parsed default node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns left operand if it is not null, or the right operand if it is. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Container object for the parsed expression. - - -

- Preparing this object once and reusing it many times for expression - evaluation can result in significant performance improvements, as - expression parsing and reflection lookups are only performed once. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of the class - by parsing specified expression string. - - Expression to parse. - - - - Registers lambda expression under the specified . - - Function name to register expression as. - Lambda expression to register. - Variables dictionary that the function will be registered in. - - - - Initializes a new instance of the class - by parsing specified primary expression string. - - Primary expression to parse. - - - - Initializes a new instance of the class - by parsing specified property expression string. - - Property expression to parse. - - - - Initializes a new instance of the class. - - - - - Create a new instance from SerializationInfo - - - - - Evaluates this expression for the specified root object and returns - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value of the last node. - - - - Evaluates this expression for the specified root object and sets - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value to set last node to. - If navigation expression is empty. - - - - Evaluates this expression for the specified root object and returns - of the last node, if possible. - - Context to evaluate expression against. - Expression variables map. - Value of the last node. - - - - Contains a list of reserved variable names. - You must not use any variable names with the reserved prefix! - - - - - Variable Names using this prefix are reserved for internal framework use - - - - - variable name of the currently processed object factory, if any - - - - - Converts string representation of expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Utility class that enables easy expression evaluation. - - -

- This class allows users to get or set properties, execute methods, and evaluate - logical and arithmetic expressions. -

-

- Methods in this class parse expression on every invocation. - If you plan to reuse the same expression many times, you should prepare - the expression once using the static method, - and then call to evaluate it. -

-

- This can result in significant performance improvements as it avoids expression - parsing and node resolution every time it is called. -

-

-

-
- Aleksandar Seovic -
- - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Value of the last node in the expression. - - - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Expression variables map. - Value of the last node in the expression. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Value to set last node to. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Expression variables map. - Value to set last node to. - - - - Represents parsed expression list node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a result of the last expression in a list. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the last expression in a list - - - - Represents parsed function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed hexadecimal integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the hexadecimal integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed indexer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - - Context to resolve property against. - Expression variables map. - PropertyInfo for this node. - - - - Represents parsed integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents lambda expression. - - Aleksandar Seovic - - - - caches argumentNames of this instance - - - - - caches body expression of this lambda function - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Gets argument names for this lambda expression. - - - - - Represents parsed list initializer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the list defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents local function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Represents parsed map entry node. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map entry defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed map initializer node in the navigation expression. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Static constructor. Initializes a map of special collection processor methods. - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Gets the best method given the name, argument values, for a given type. - - The type on which to search for the method. - Name of the method. - The binding flags. - The arg values. - Best matching method or null if none found. - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed null literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the null literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic addition operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic addition operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents AND operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical BETWEEN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents arithmetic division operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic division operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical equality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical equality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical IN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical IS operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IS operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical "less than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "less than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents VB-style logical LIKE operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical LIKE operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents logical MATCHES operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical MATCHES operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents arithmetic modulus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic modulus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic multiplication operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic multiplication operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents NOT operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Base class for unary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Gets the operand. - - The operand. - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical NOT operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical inequality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical inequality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents OR operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical OR operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic exponent operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic exponent operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic subtraction operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic subtraction operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary minus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary plus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - - Erich Eichinger - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed projection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of projection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents node that navigates to object's property or public field. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - The parent. - - - - Attempts to resolve property or field. - - - Type to search for a property or a field. - - - Property or field name. - - - Binding flags to use. - - - Resolved property or field accessor, or null - if specified cannot be resolved. - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Retrieves property or field value. - - Context to evaluate expressions against. - Current expression evaluation context. - Property or field value. - - - - Sets property value, doing any type conversions that are necessary along the way. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Sets property or field value using either dynamic or standard reflection. - - Object to evaluate node against. - New value for this node, converted to appropriate type. - - - - In the case of read only collections or custom collections that are not assignable from - IList, try to add to the collection. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - true if was able add to IList, IDictionary, or ISet - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... - - Context to resolve property against. - PropertyInfo for this node. - - - - Gets a value indicating whether this node represents a property. - - - true if this node is a property; otherwise, false. - - - - - Gets a value indicating whether this node represents a field. - - - true if this node is a field; otherwise, false. - - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified identifier. - - - Fully qualified identifier as a string. - - - - - Represents parsed real literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the real literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents a reference to a Spring-managed object. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the first context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the last context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of selection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed string literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Exception thrown when detecting invalid SpEL syntax - - Erich Eichinger - - - - TODO - - - - - TODO - - - - - - - - - - - - - - - - - - - - Gets a message that provides details on the syntax error. - - - - - The expression that caused the error - - - - - Represents ternary expression node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed type node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified typename. - - - Fully qualified typename as a string. - - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Implementation of that can be used to - format and parse boolean values. - - Erich Eichinger - - - - Interface that should be implemented by all formatters. - - - - Formatters assume that source value is a string, and make no assumptions - about the target value's type, which means that Parse method can return - object of any type. - - - Aleksandar Seovic - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Initializes a new instance of the class - using default values - - - - - Initializes a new instance of the class - - - - - Formats the specified boolean value. - - The value to format. - Formatted boolean value. - If is null. - If is not of type . - - - - Parses the specified boolean value according to settings of and - - The boolean value to parse. - Parsed boolean value as a . - If does not match or . - - - - Set/Get value to control casesensitivity of - - - Defaults to true - - - - - Set/Get value to recognize as boolean "true" value - - - Defaults to - - - - - Set/Get value to recognize as boolean "false" value - - - Defaults to - - - - - Implementation of that can be used to - format and parse currency values. - - - - CurrencyFormatter uses currency related properties of the - to format and parse currency values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of CurrencyFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the CurrencyFormatter in order - to override some of the default currency formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - currency values are formatted. - - - - - Formats the specified currency value. - - The value to format. - Formatted currency . - If is null. - If is not a number. - - - - Parses the specified currency value. - - The currency value to parse. - Parsed currency value as a . - - - - Gets or sets the currency decimal digits. - - The currency decimal digits. - - - - - Gets or sets the currency decimal separator. - - The currency decimal separator. - - - - - Gets or sets the currency group sizes. - - The currency group sizes. - - - - - Gets or sets the currency group separator. - - The currency group separator. - - - - - Gets or sets the currency symbol. - - The currency symbol. - - - - - Gets or sets the currency negative pattern. - - The currency negative pattern. - - - - - Gets or sets the currency positive pattern. - - The currency positive pattern. - - - - - Implementation of that can be used to - format and parse values. - - - - DateTimeFormatter uses properties of the - to format and parse values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of DateTimeFormatter, default DateTimeFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the DateTimeFormatter in order - to override some of the default formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - Date/time format string. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture. - - - - Formats the specified value. - - The value to format. - Formatted value. - If is null. - If is not an instance of . - - - - Parses the specified value. - - The string to parse. - Parsed value. - - - - Provides base functionality for filtering values before they actually get parsed/formatted. - - Erich Eichinger - - - - Creates a new instance of this FilteringFormatter. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Allows to rewrite a value before it gets parsed by the underlying formatter - - - - - Allows to change a value before it gets formatted by the underlying formatter - - - - - Implementation of that can be used to - format and parse floating point numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign, decimal point, exponent). - - - Aleksandar Seovic - - - - Default format string. - - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and current thread's culture. - - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and specified culture. - - The culture. - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - The culture name. - - - - Initializes a new instance of the class, - using specified format string and culture. - - The format string. - The culture. - - - - Formats the specified float value. - - The value to format. - Formatted floating point number. - If is null. - If is not a number. - - - - Parses the specified float value. - - The float value to parse. - Parsed float value as a . - - - - Replaces input strings with a given default value, - if they are null or contain whitespaces only, - - Erich Eichinger - - - - Creates a new instance of this HasTextFilteringFormatter using null as default value. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Creates a new instance of this HasTextFilteringFormatter. - - the default value to be returned, if input text doesn't contain text - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - If value contains no text, it will be replaced by a defaultValue. - - - - - Implementation of that can be used to - format and parse integer numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign). - - - Aleksandar Seovic - - - - Initializes a new instance of the class, - using default format string of '{0:D}'. - - - - - Initializes a new instance of the class, - using specified format string. - - - - - Formats the specified integer value. - - The value to format. - Formatted integer number. - If is null. - If is not an integer number. - - - - Parses the specified integer value. - - The integer value to parse. - Parsed number value as a . - - - - Implementation of that simply calls . - - - This formatter is a no-operation implementation. - - Erich Eichinger - - - - Initializes a new instance of the class. - - - - - Converts the passed value to a string by calling . - - The value to convert. - to string converted value. - - - - Returns the passed string "as is". - - The value to return. - The value passed into this method. - - - - Implementation of that can be used to - format and parse numbers. - - - - NumberFormatter uses number-related properties of the - to format and parse numbers. - - - This formatter works with both integer and decimal numbers and allows - you to format and parse numbers that conform to - number style (leading and trailing white space and/or sign, thousands separator, - decimal point) - - - If you use one of the constructors that accept culture as a parameter - to create an instance of NumberFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the NumberFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified number value. - - The value to format. - Formatted number . - If is null. - If is not a number. - - - - Parses the specified number value. - - The number value to parse. - Parsed number value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the number group sizes. - - The number group sizes. - - - - - Gets or sets the number group separator. - - The number group separator. - - - - - Gets or sets the negative pattern. - - The number negative pattern. - - - - - Implementation of that can be used to - format and parse numbers. - - - - PercentFormatter uses percent-related properties of the - to format and parse percentages. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of PercentFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the PercentFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified percentage value. - - The value to format. - Formatted percentage. - If is null. - If is not a number. - - - - Parses the specified percentage value. - - The percentage value to parse. - Parsed percentage value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the percent group sizes. - - The percent group sizes. - - - - - Gets or sets the percent group separator. - - The percent group separator. - - - - - Gets or sets the negative pattern. - - The percent negative pattern. - - - - - Gets or sets the positive pattern. - - The percent positive pattern. - - - - - Gets or sets the percent symbol. - - The percent symbol. - - - - - Gets or sets the per mille symbol. - - The per mille symbol. - - - - - Loads a list of resources that should be applied from the .NET . - - -

- This implementation will iterate over all resource managers - within the message source and return a list of all the resources whose name starts with '$this'. -

-

- All other resources will be ignored, but you can retrieve them by calling one of - GetMessage methods on the message source directly. -

-
- Aleksandar Seovic -
- - - Abstract base class that all localizers should extend - - -

- This class contains the bulk of the localizer logic, including implementation - of the ApplyResources methods that are defined in - interface. -

-

- All specific localizers need to do is inherit this class and implement - GetResources method that will return a list of - objects that should be applied to a specified target. -

-

- Custom implementations can use whatever type of resource storage they want, - such as standard .NET resource sets, custom XML files, database, etc. -

-
- Aleksandar Seovic -
- - - Defines an interface that localizers have to implement. - - -

- Localizers are used to automatically apply resources to object's members - using reflection. -

-
- Aleksandar Seovic -
- - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's culture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's uiCulture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Returns a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - implementation - that simply returns the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . - - Aleksandar Seovic - - - - Strategy interface for - resolution. - - Aleksandar Seovic - - - - Resolves the - from some context. - - -

- The 'context' is determined by the appropriate implementation class. - An example of such a context might be a thread local bound - , or a - sourced from an HTTP - session. -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - -

- This is an optional operation and does not need to be implemented - such that it actually does anything useful (i.e. it can be a no-op). -

-
- - The new or - to clear the current . - -
- - - Returns the default . - - -

- It tries to get the - from the value of the - - property and falls back to the of the - current thread if the - - is . -

-
- - The default - -
- - - Resolves the - from some context. - - -

- The 'context' in this implementation is the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - - The new or - to clear the current . - - - - - - - The default . - - - The default . - - - - - Abstract base class that all resource cache implementations should extend. - - Aleksandar Seovic - - - - Defines an interface that resource cache adapters have to implement. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Gets the list of resources from the cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Crates resource cache key for the specified target object and culture. - - Target object to apply resources to. - Resource culture to use for resource lookup. - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Resource cache implementation that doesn't cache resources. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - Always returns null. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - - - - Holds mapping between control property and it's value - as read from the resource file. - - Aleksandar Seovic - - - - Creates instance of resource mapper. - - Target property. - Resource value. - - - - Gets parsed target property expression. See - for more information on object navigation expressions. - - - - - Value of the resource that target property should be set to. - - - - - Utility class to aid in the manipulation of events and delegates. - - Griffin Caprio - - - - Returns a new instance of the requested . - - -

- Often used to wire subscribers to event publishers. -

-
- - The of delegate to create. - - - The target subscriber object that contains the delegate implementation. - - - referencing the delegate method on the subscriber. - - - A delegate handler that can be added to an events list of handlers, or called directly. - -
- - - Queries the input type for a signature matching the input - signature. - - - Typically used to query a potential subscriber to see if they implement an event handler. - - to match against - to query - - matching input - signature, or if there is no match. - - - - - Creates a new instance of the EventManipulationUtilities class. - - -

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

-
-
- - - Default implementation of the - interface. - - Griffin Caprio - - - - Creates a new instance of the EventRegistry class. - - - - - Adds the input object to the list of publishers. - - - This publishes all events of the source object to any object - wishing to subscribe - - The source object to publish. - - - - Subscribes to all events published, if the subscriber implements - compatible handler methods. - - The subscriber to use. - - - - Subscribes to published events of all objects of a given type, if the - subscriber implements compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - The target to unsubscribe from - - - - The list of event publishers. - - The list of event publishers. - - - - To be implemented by any object that wishes to receive a reference to - an . - - -

- This interface only applies to objects that have been instantiated - within the context of an - . This interface does - not typically need to be implemented by application code, but is rather - used by classes internal to Spring.NET. -

-
- Mark Pollack - Rick Evans -
- - - Set the - associated with the - that created this - object. - - -

- This property will be set by the relevant - after all of this - object's dependencies have been resolved. This object can use the - supplied - immediately to publish or subscribe to one or more events. -

-
-
- - - Marks a property as being 'required': that is, the setter property - must be configured to be dependency-injected with a value. - - Consult the SDK documentation for , - which, by default, checks for the presence of this annotation. - - Rob Harrop - Mark Pollack - - - - A implementation that enforces required properties to have been configured. - Required properties are detected through an attribute, by default, Spring's - attribute. - - - The motivation for the existence of this IObjectPostProcessor is to allow - developers to annotate the setter properties of their own classes with an - arbitrary attribute to indicate that the container must check - for the configuration of a dependency injected value. This neatly pushes - responsibility for such checking onto the container (where it arguably belongs), - and obviates the need (in part) for a developer to code a method that - simply checks that all required properties have actually been set. - - Please note that an 'init' method may still need to implemented (and may - still be desirable), because all that this class does is enforce that a - 'required' property has actually been configured with a value. It does - not check anything else... In particular, it does not check that a - configured value is not null. - - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Adapter that implements all methods on - as no-ops, which will not change normal processing of each object instantiated - by the container. Subclasses may override merely those methods that they are - actually interested in. - - - Note that this base class is only recommendable if you actually require - functionality. If all you need - is plain functionality, prefer a straight - implementation of that (simpler) interface. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Extension of the interface, - adding a callback for predicting the eventual type of a processed object. - - This interface is a special purpose interface, mainly for - internal use within the framework. In general, application-provided - post-processors should simply implement the plain - interface or derive from the - class. New methods might be added to this interface even in point releases. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Subinterface of - - that adds a before-instantiation callback and a callback after instantiation but before - explicit properties are set or autowiring occurs. - - - - Typically used to suppress default instantiation for specific target objects, - for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, - lazily initializing targets, etc), or to implement additional injection strategies such as field - injection. - - - This interface is a special purpose interface, mainly for internal use within the framework. - It is recommended to implement the plain interface as far as - possible, or to derive from in order to be shielded - from extension to this interface. - - - Juergen Hoeller - Rick Evans (.NET) - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Predicts the type of the object to be eventually returned from this - processors callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Predicts the type of the object to be eventually returned from this - processors PostProcessBeforeInstantiation callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - 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. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - 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. - -
- - - Cache for validated object names, skipping re-validation for the same object - - - - - Post-process the given property values before the factory applies them - to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. - - The property values that the factory is about to apply (never null). - The 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 actual property values to apply to the given object (can be the - passed-in PropertyValues instances or null to skip property population. - - If a required property value has not been specified - in the configuration metadata. - - - - Determines whether the supplied property is required to have a value, that is to be dependency injected. - - - This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that - the property has a setter method. - - The target PropertyInfo - - true if the supplied property has been marked as being required;; otherwise, false if - not or if the supplied property does not have a setter method - - - - - Builds an exception message for the given list of invalid properties. - - The list of names of invalid properties. - Name of the object. - The exception message - - - - Sets the type of the required attribute, to be used on a property setter - - - The default required attribute type is the Spring-provided attribute. - This setter property exists so that developers can provide their own - (non-Spring-specific) annotation type to indicate that a property value is required. - - The type of the required attribute. - - - - Base class that provides common functionality needed for several IObjectFactoryPostProcessor - implementations - - Mark Pollack - - - - Allows for custom modification of an application context's object - definitions, adapting the object property values of the context's - underlying object factory. - - -

- Application contexts can auto-detect - IObjectFactoryPostProcessor objects in their object definitions and - apply them before any other objects get created. -

-

- Useful for custom config files targeted at system administrators that - override object properties configured in the application context. -

-

- See PropertyResourceConfigurer and its concrete implementations for - out-of-the-box solutions that address such configuration needs. -

-
- Juergen Hoeller - Rick Evans (.Net) -
- - - Modify the application context's internal object factory after its - standard initialization. - - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - The object factory used by the application context. - - - In case of errors. - -
- - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Resolves the supplied into a - instance. - - The object that is to be resolved into a - instance. - The error context source. - The error context string. - A resolved . - -

- This (default) implementation supports resolving - s and s. - Only override this method if you want to key your type alias - on something other than s - and s. -

-
- - If the supplied is , - or the supplied cannot be resolved. - -
- - - Return the order value of this object, with a higher value meaning - greater in terms of sorting. - - The order value. - - - - - Simple template superclass for - implementations that allows for the creation of a singleton or a prototype - instance (depending on a flag). - - - If the value of the - - property is (this is the default), this class - will create a single instance of it's object upon initialization and - subsequently return the singleton instance; else, this class will - create a new instance each time (prototype mode). Subclasses must - implement the - - template method to actually create objects. - - Juergen Hoeller - Keith Donald - Simon White (.NET) - - - - Interface to be implemented by objects used within an - that are themselves - factories. - - -

- If an object implements this interface, it is used as a factory, - not directly as an object. s - can support singletons and prototypes - ()... - please note that an - itself can only ever be a singleton. It is a logic error to configure an - itself to be a prototype. -

- - An object that implements this interface cannot be used as a normal object. - -
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - - If this method is being called in the context of an enclosing IoC container and - returns , the IoC container will consider this factory - object as not being fully initialized and throw a corresponding (and most - probably fatal) exception. - - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - 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? - - - - - Invoked by an - after it has injected all of an object's dependencies. - - - In the event of misconfiguration (such as the failure to set a - required property) or if initialization fails. - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - Template method that subclasses must override to construct - the object returned by this factory. - - - Invoked once immediately after the initialization of this - in the case of - a singleton; else, on each call to the - - method. - - - If an exception occured during object creation. - - - A distinct instance of the object created by this factory. - - - - - Performs cleanup on any cached singleton object. - - -

- Only makes sense in the context of a singleton object. -

-
- - -
- - - Is the object managed by this factory a singleton or a prototype? - - -

- Please note that changing the value of this property after - this factory object instance has been created by an enclosing - Spring.NET IoC container really is a programming error. This - property should really only be set once, prior to the invocation - of the - - callback method. -

-
- -
- - - Return the of object that this - creates, or - if not known in advance. - - - - - - The various autowiring modes. - - Rick Evans - - - - Do not autowire. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Implementation of that - resolves variable name against command line arguments. - - Aleksandar Seovic - - - - Defines contract that different variable sources have to implement. - - -

- The "variable sources" are objects containing name-value pairs - that allow a variable value to be retrieved for the given name.

-

- Out of the box, Spring.NET supports a number of variable sources, - that allow users to obtain variable values from .NET config files, - Java-style property files, environment, registry, etc.

-

- Users can always write their own variable sources implementations, - that will allow them to load variable values from the database or - other proprietary data source.

-
- - - - - - - Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Default constructor. - Initializes command line arguments from the environment. - - - - - Constructor that allows arguments to be passed externally. - Useful for testing. - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes command line arguments dictionary. - - - - - Gets or sets a prefix that should be used to - identify arguments to extract values from. - - - A prefix that should be used to identify arguments - to extract values from. Defaults to slash ("/"). - - - - - Gets or sets a character that should be used to - separate argument name from its value. - - - A character that should be used to separate argument - name from its value. Defaults to colon (":"). - - - - - Implementation of that - resolves variable name against name-value sections in - the standard .NET configuration file. - - Aleksandar Seovic - - - - Initializes a new instance of - - - - - Initializes a new instance of from the given - - - - - Initializes a new instance of from the given - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets a list of section names variables should be loaded from. - - - All sections specified need to be handled by the - in order to be processed successfully. - - - A list of section names variables should be loaded from. - - - - - Convinience property. Gets or sets a single section - to read properties from. - - - The section specified needs to be handled by the - in order to be processed successfully. - - - A section to read properties from. - - - - - Implementation of that - resolves variable name against provided variables. - - - Variable name resolution is case insensitive. - - Bruno Baia - - - - Initializes a new instance of . - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets variables. - - - - - Various utility methods for .NET style .config files. - - -

- Currently supports reading custom configuration sections and returning them as - objects. -

-
- Simon White - Mark Pollack -
- - - Initializes the type members - - - - - Reads the specified configuration section into a - . - - The resource to read. - The section name. - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - The populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Read from the specified configuration from the supplied XML - into a - . - - - - Does not support section grouping. The supplied XML - must already be loaded. - - - - The to read from. - - - The configuration section name to read. - - - A newly populated - . - - - If any errors are encountered while reading (this only applies to - v1.1 and greater of the .NET Framework). - - - If any errors are encountered while reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Returns the section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed section from the specified resource with the given section name - - - - - Returns the section from the specified resource with the given section name. Use - in case no section handler is specified. - - - - - Returns the typed result of evaluating the specified . - - if the result's type does not match the expected type - - - - Reads the specified configuration section from the given - - - - - - - - Reads the specified configuration section from the given - - - - - - - - - Determine the configuration section handler type - - - - - Populates the supplied with values from - a .NET application configuration file. - - - The - to add any key-value pairs to. - - - The configuration section name in the a .NET application configuration - file. - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - if the supplied - was found. - - - - - Creates a new instance of the ConfigurationReader class. - - -

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

-
-
- - - Implementation of that - resolves variable name connection strings defined in - the standard .NET configuration file. - - -

- When the <connectionStrings> configuration section is processed by this class, - two variables are defined for each connection string: one for connection string and - the second one for the provider name.

-

- Variable names are generated by appending '.connectionString' and '.providerName' - literals to the value of the name attribute of the connection string element. - For example:

-
-            
-               
-            
-            
-

- will result in two variables being created: myConn.connectionString and myConn.providerName. - You can reference these variables within your object definitions, just like any other variable.

-
- Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Holder for constructor argument values for an object. - - -

- Supports values for a specific index or parameter name (case - insensitive) in the constructor argument list, and generic matches by - . -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Can be used as an argument filler for the - - overload when one is not looking for an argument by index. - - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Add argument value for the given index in the constructor argument list. - - - The index in the constructor argument list. - - - The argument value. - - - - - Add argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - The argument value. - - The of the argument - . - - - - - Add argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - The argument value. - - If the supplied is - or is composed wholly of whitespace. - - - - - Get argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - - The required of the argument. - - - The - - for the argument, or if none set. - - - - - Get argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - - The - - for the argument, or if none set. - - - - - Does this set of constructor arguments contain a named argument matching the - supplied name? - - - - The comparison is performed in a case-insensitive fashion. - - - The named argument to look up. - - if this set of constructor arguments - contains a named argument matching the supplied - name. - - - - - Add generic argument value to be matched by type. - - - The argument value. - - - - - Add generic argument value to be matched by type. - - The argument value. - - The of the argument - . - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - The - - for the argument, or if none set. - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list, or to the named argument, or - generically matches by . - - - The index of the argument in the constructor argument list. May be - negative, to denote the fact that we are not looking for an - argument by index (see - . - - - The name of the argument in the constructor argument list. May be - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Return the map of indexed argument values. - - - An with - indices as keys and - s - as values. - - - - - Return the map of named argument values. - - - An with - named arguments as keys and - s - as values. - - - - - Return the set of generic argument values. - - - A of - s. - - - - - Return the number of arguments held in this instance. - - - - - Returns true if this holder does not contain any argument values, - neither indexed ones nor generic ones. - - - - - Holder for a constructor argument value, with an optional - attribute indicating the target - of the actual constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - The of the argument - . Can also be one of the common - aliases (int, bool, - float, etc). - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Gets and sets the value for the constructor argument. - - -

- Only necessary for manipulating a registered value, for example in - s. -

-
-
- - - Return the of the constructor - argument. - - - - - - implementation that allows for convenient registration of custom - s. - - - - The use of this class is typically not required; the .NET - mechanism of associating a - with a - via the use of the - is the - recommended (and standard) way. This class primarily exists to cover - those cases where third party classes to which one does not have the - source need to be exposed to the type conversion mechanism. - -

- Because the - - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever type conversion is required. If - one is using a - - object definition within the scope of an - , no such automatic - pickup of the - - is performed (custom converters will have to be added manually using the - - method). For most application scenarios, one will get better - mileage using the - abstraction. -

-
- -

- The following examples all assume XML based configuration, and use - inner object definitions to define the custom - objects (nominally to - avoid polluting the object name space, but also because the - configuration simply reads better that way). -

- - - - - - - - - - - - - - - - -

- The following example illustrates a complete (albeit naieve) use case - for this class, including a custom - implementation, said - converters domain class, and the XML configuration that hooks the - converter in place and makes it available to a Spring.NET container for - use during object resolution. -

-

- The domain class is a simple data-only object that contains the data - required to send an email message (such as the host and user account - name). A developer would prefer to use a string of the form - UserName=administrator,Password=r1l0k1l3y,Host=localhost to - configure the mail settings and just let the container take care of the - conversion. -

- - namespace ExampleNamespace - { - public sealed class MailSettings - { - private string _userName; - private string _password; - private string _host; - - public string Host - { - get { return _host; } - set { _host = value; } - } - - public string UserName - { - get { return _userName; } - set { _userName = value; } - } - - public string Password - { - get { return _password; } - set { _password = value; } - } - } - - public sealed class MailSettingsConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (typeof (string) == sourceType) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - string text = value as string; - if(text != null) - { - MailSettings mailSettings = new MailSettings(); - string[] tokens = text.Split(','); - for (int i = 0; i < tokens.Length; ++i) - { - string token = tokens[i]; - string[] settings = token.Split('='); - typeof(MailSettings).GetProperty(settings[0]) - .SetValue(mailSettings, settings[1], null); - } - return mailSettings; - } - return base.ConvertFrom(context, culture, value); - } - } - - // a very naieve class that uses the MailSettings class... - public sealed class ExceptionLogger - { - private MailSettings _mailSettings; - - public MailSettings MailSettings { - { - set { _mailSettings = value; } - } - - public void Log(object value) - { - Exception ex = value as Exception; - if(ex != null) - { - // use _mailSettings instance... - } - } - } - } - -

- The attendant XML configuration for the above classes would be... -

- - - - - - - - - - - - - - - - Juergen Hoeller - Simon White (.NET) - - - - - - - Registers any custom converters with the supplied - . - - - The object factory to register the converters with. - - - In case of errors. - - - - - Resolves the supplied into a - instance. - - - The object that is to be resolved into a - instance. - - - A resolved instance. - - - If the supplied is , - or the supplied cannot be resolved. - - - - - The custom converters to register. - - -

- The uses the type name - of the class that requires conversion as the key, and an - instance of the - that will effect - the conversion. Alternatively, the actual - of the class that requires conversion - can be used as the key. -

-
- -

- - IDictionary converters = new Hashtable(); - converters.Add( "System.Date", new MyCustomDateConverter() ); - // a System.Type instance can also be used as the key... - converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); - -

-
-
- - - implementation that - creates delegates. - - -

- Supports the creation of s for both - instance and methods. -

-
- Rick Evans -
- - - Callback method called once all factory properties have been set. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Creates the delegate. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - The of - created by this factory. - - -

- Returns the - if accessed prior to the method - being called. -

-
-
- - - The of the - created by this factory. - - - - - The name of the method that is to be invoked by the created - delegate. - - - - - The target if the - refers to a method. - - - - - The target object if the - refers to an instance method. - - - - - A generic implementation of an , that delegates post processing to a passed delegate - - - This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. - - - The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on - the context instance: - - IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); - ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => - { - of.RegisterSingleton("someObject", someObject); - })); - - - Erich Eichinger - - - - Get or Set the handler to delegate configuration to - - - - - Descriptor for a specific dependency that is about to be injected. - Wraps a constructor parameter, a method parameter or a field, - allowing unified access to their metadata. - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for a method or constructor parameter. - Considers the dependency as 'eager' - - The MethodParameter to wrap. - if set to true if the dependency is required. - - - - Initializes a new instance of the class for a method or a constructor parameter. - - The MethodParameter to wrap. - if set to true the dependency is required. - if set to true the dependency is 'eager' in the sense of - eagerly resolving potential target objects for type matching. - - - - Gets a value indicating whether this dependency is required. - - true if required; otherwise, false. - - - - Determine the declared (non-generic) type of the wrapped parameter/field. - - The type of the dependency (never null - - - - Gets a value indicating whether this is eager in the sense of - eagerly resolving potential target beans for type matching. - - true if eager; otherwise, false. - - - - Gets the wrapped MethodParameter, if any. - - The method parameter. - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
- - If the value is . - - - If the value is an . - - - If the value is an interface. - -
- - - The of objects created by this factory. - - - Always returns the . - - - - - A very simple, hashtable-based implementation of - - Erich Eichinger - - - - Creates a new, empty variable source - - - - - Creates a new, empty and case-insensitive variable source - - - - - Create a new variable source from a list of paired string values. - - - - The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: - - new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) - - - - the argument list containing pairs, or null - - - - Initializes a new instance of the DictionaryVariableSource class. - - - - - Creates a new variable source, reading values from another dictionary - and converting them to strings if necessary - - - - - Adds a key/value pair - - this dictionary. allows for fluent config - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Performs a variable name lookup - - - - - Specifies how instances of the - - class must apply environment variables when replacing values. - - Mark Pollack - - - - Never replace environment variables. - - - - - If properties are not specified via a resource, - then resolve using environment variables. - - - - - Apply environment variables first before applying properties from a - resource. - - - - - Implementation of that - resolves variable name against environment variables. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Holder for event handler values for an object. - - Rick Evans (.NET) - - - - The empty array of s. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Adds the supplied handler to the collection of event handlers. - - The handler to be added. - - - - The mapping of event names to an - of - s. - - - - - Gets the of events - that have handlers associated with them. - - - - - Gets the of - s for the supplied - event name. - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to a Spring that should be evaluated at runtime. - - Aleksandar Seovic - - - - Creates a new instance of the - - class. - - The expression to resolve. - - - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Gets or sets the expression string. Setting the expression string will cause - the expression to be parsed. - - The expression string. - - - - Return the expression. - - - - - Properties for this expression node. - - - - - implementation that - retrieves a static or non-static public field value. - - -

- Typically used for retrieving public constants. -

-
- -

- The following example retrieves the field value... -

- - - - - - -

- The previous example could also have been written using the convenience - - property, like so... -

- - - - - -

- This class also implements the - interface - (). - If the id (or name) of one's - - object definition is set to the - of the field to be retrieved, then the id (or - name) of one's object definition will be used for the name of the - field lookup. See below for an example of this - concise style of definition. -

- - - - - - - -

- The usage for retrieving instance fields is similar. No example is shown - because public instance fields are generally bad practice; but if - you have some legacy code that exposes public instance fields, or if you - just really like coding public instance fields, then you can use this - implementation to - retrieve such field values. -

- - Juergen Hoeller - Rick Evans (.NET) - - - - Interface to be implemented by objects that wish to be aware of their object - name in an . - - -

- Note that most objects will choose to receive references to collaborating - objects via respective properties. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - 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. -

-
-
- - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - -

- This method allows the object instance to perform initialization only - possible when all object properties have been set and to throw an - exception in the event of misconfiguration. -

-
- - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The of the - field to be retrieved. - - - - - Set the name of the object in the object factory that created this object. - - - The name of the object in the factory. - - -

- In the context of the - - class, the - - value will be interepreted as the value of the - - property if no value has been explicitly assigned to the - - property. This allows for concise object definitions with just an id or name; - see the class documentation for - - for an example of this style of usage. -

-
-
- - - The name of the field the value of which is to be retrieved. - - -

- If the - - has been set (and is not ), then the value of this property - refers to an instance field name; it otherwise refers to a - field name. -

-
-
- - - The object instance on which the field is defined. - - - - - The on which the field is defined. - - - - - The of object that this - creates, or - if not known in advance. - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - Extension of the - interface to be implemented by object factories that are capable of - autowiring and expose this functionality for existing object instances. - - Juergen Hoeller - Rick Evans (.NET) - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - the resolved object, or null if none found - if dependency resolution failed - - - - Extension of the interface - that injects dependencies into the object managed by the factory. - - Bruno Baia - - - - Gets the template object definition that should be used - to configure the instance of the object managed by this factory. - - - - - SPI interface to be implemented by most if not all listable object factories. - - -

- Allows for framework-internal plug'n'play, e.g. in - . -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Configuration interface to be implemented by most if not all object - factories. - - -

- Provides the means to configure an object factory in addition to the - object factory client methods in the - interface. -

-

- Allows for framework-internal plug'n'play even when needing access to object - factory configuration methods. -

-

- When disposed, it will destroy all cached singletons in this factory. Call - when you want to shutdown - the factory. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Interface that defines a registry for shared object instances. - - - Can be implemented by - implementations in order to expose their singleton management facility - in a uniform manner. - - The interface extends this interface. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Registers the given existing object as singleton in the object registry, - under the given object name. - - - - The given instance is supposed to be fully initialized; the registry - will not perform any initialization callbacks (in particular, it won't - call IInitializingObject's AfterPropertiesSet method). - The given instance will not receive any destruction callbacks - (like IDisposable's Dispose method) either. - - - If running within a full IObjectFactory: Register an object definition - instead of an existing instance if your object is supposed to receive - initialization and/or destruction callbacks. - - - Typically invoked during registry configuration, but can also be used - for runtime registration of singletons. As a consequence, a registry - implementation should synchronize singleton access; it will have to do - this anyway if it supports a BeanFactory's lazy initialization of singletons. - - - Name of the object. - The singleton object. - - - - - - Return the (raw) singleton object registered under the given name. - - - - Only checks already instantiated singletons; does not return an Object - for singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to access manually registered singletons - . Can also be used to access a singleton - defined by an object definition that already been created, in a raw fashion. - - - Name of the object to look for. - the registered singleton object, or null if none found - - - - - Check if this registry contains a singleton instance with the given name. - - - - Only checks already instantiated singletons; does not return true - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check whether a - singleton defined by an object definition has already been created. - - - To check whether an object factory contains an object definition with a given name, - use ListableBeanFactory's ContainsObjectDefinition. Calling both - ContainsObjectDefinition and ContainsSingleton answers - whether a specific object factory contains an own object with the given name. - - - Use IObjectFactory's ContainsObject for general checks whether the - factory knows about an object with a given name (whether manually registered singleton - instance or created by bean definition), also checking ancestor factories. - - - Name of the object to look for. - - true if this bean factory contains a singleton instance with the given name; otherwise, false. - - - - - - - - Gets the names of singleton objects registered in this registry. - - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - The list of names as String array (never null). - - - - - - - Gets the number of singleton beans registered in this registry. - - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - The number of singleton objects. - - - - - - - Ignore the given dependency type for autowiring. - - -

- To be invoked during factory configuration. -

-

- This will typically be used for dependencies that are resolved - in other ways, like - through . -

-
- - The to be ignored. - -
- - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - -

- To be invoked during factory configuration. -

-
- - The - to register. - -
- - - Given an object name, create an alias. - - -

- This is typically used to support names that are illegal within - XML ids (which are used for object names). -

-

- Typically invoked during factory configuration, but can also be - used for runtime registration of aliases. Therefore, a factory - implementation should synchronize alias access. -

-
- The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - -
- - - Register the given custom - for all properties of the given . - - -

- To be invoked during factory configuration. -

-
- - The required of the property. - - - The to register. - -
- - - Set the parent of this object factory. - - -

- Note that the parent shouldn't be changed: it should only be set outside - a constructor if it isn't available when an object of this class is - created. -

-
-
- - - Returns the current number of registered - s. - - - The current number of registered - s. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - -

- Typically invoked at the end of factory setup, if desired. -

-

- As this is a startup method, it should destroy already created singletons if - it fails, to avoid dangling resources. In other words, after invocation - of that method, either all or no singletons at all should be - instantiated. -

-
- - If one of the singleton objects could not be created. - -
- - - Register a special dependency type with corresponding autowired value. - - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the BeanFactory interface itself. - - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - May be used to store custom value references in object definition properties. - - - Erich Eichinger - - - - - - the object factory holding the given object definition - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Subinterface of - that adds - a before-destruction callback. - - - The typical usage will be to invoke custom destruction callbacks on - specific object types, matching corresponding initialization callbacks. - - Juergen Hoeller - Simon White (.NET) - - - - Apply this - to the - given new object instance before its destruction. Can invoke custom - destruction callbacks. - - The new object instance. - The name of the object. - - In case of errors. - - - - - Denotes a special placeholder collection that may contain - s or - other placeholder objects that will need to be resolved. - - -

- 'A special placeholder collection' means that the elements of this - collection can be placeholders for objects that will be resolved later by - a Spring.NET IoC container, i.e. the elements themselves will be - resolved at runtime by the enclosing IoC container. -

-

- The core Spring.NET library already provides three implementations of this interface - straight out of the box; they are... -

- - - - . - - - - - . - - - - - . - - - -

- If you have a custom collection class (i.e. a class that either implements the - directly or derives from a class that does) - that you would like to expose as a special placeholder collection (i.e. one that can - have s as elements - that will be resolved at runtime by an appropriate Spring.NET IoC container, just - implement this interface. -

-
- -

- Lets say one has a Bag class (i.e. a collection that supports bag style semantics). -

- - using System; - - using Spring.Objects.Factory.Support; - - namespace MyNamespace - { - public sealed class Bag : ICollection - { - // ICollection implementation elided for clarity... - - public void Add(object o) - { - // implementation elided for clarity... - } - } - - public class ManagedBag : Bag, IManagedCollection - { - public ICollection Resolve( - string objectName, RootObjectDefinition definition, - string propertyName, ManagedCollectionElementResolver resolver) - { - Bag newBag = new Bag(); - string elementName = propertyName + "[bag-element]"; - foreach(object element in this) - { - object resolvedElement = resolver(objectName, definition, elementName, element); - newBag.Add(resolvedElement); - } - return newBag; - } - } - } - -
- Rick Evans -
- - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Resolves a single element value of a managed collection. - - -

- If the does not need to be resolved or - converted to an appropriate , the - will be returned as-is. -

-
- - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - That element of a managed collection that may need to be resolved - to a concrete value. - - A fully resolved element. -
- - - Describes an object instance, which has property values, constructor - argument values, and further information supplied by concrete implementations. - - -

- This is just a minimal interface: the main intention is to allow - - (like PropertyPlaceholderConfigurer) to access and modify property values. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - Return the event handlers for any events exposed by this object. - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The name of the parent definition of this object definition, if any. - - - - - The target scope for this object. - - - - - Get the role hint for this object definition - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition. - - Note that this does not have to be the actual type name used at runtime, - in case of a child definition overrding/inheriting the the type name from its - parent. It can be modifed during object factory post-processing, typically - replacing the original class name with a parsed variant of it. - Hence, do not consider this to be the definitive bean type at runtime - but rather only use it for parsing purposes at the individual object - definition level. - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - implementation that - creates instances of the class. - - -

- Typically used for retrieving shared - instances for common topics (such as the 'DAL', 'BLL', etc). The - - property determines the name of the - Common.Logging logger. -

-
- Rick Evans - -
- - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The name of the instance served up by - this factory. - - - If the supplied is - or contains only whitespace character(s). - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object - managed by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The name of the instance served up by - this factory. - - - The name of the instance served up by - this factory. - - - If the supplied to the setter is - or contains only whitespace character(s). - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Tag subclass used to hold a dictionary of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Interface representing an object whose value set can be merged with that of a parent object. - - Rob Harrop - Mark Pollack (.NET) - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. - - - - - Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. - - The approximate number of elements that the object can initially contain. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the keys of this managed dictionary. - - The unresolved name for the type of the keys of this managed dictionary. - - - - Gets or sets the unresolved name for the - of the values of this managed dictionary. - - The unresolved name for the type of the values of this managed dictionary. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a list of managed elements. - - Rod Johnson - Rick Evans (.NET) - - - - Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. - - - - - Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. - - The number of elements that the new list can initially store. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed list. - - The unresolved name for the type of the elements of this managed list. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag class which represent a Spring-managed instance that - supports merging of parent/child definitions. - - - - - Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - - - - Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - The initial number of entries that the can contain. is less than zero. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a set of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed set. - - The unresolved name for the type of the elements of this managed set. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - An that returns a value - that is the result of a or instance method invocation. - - -

- Note that this class generally is expected to be used for accessing factory methods, - and as such defaults to operating in singleton mode. The first request to - - by the owning object factory will cause a method invocation, the return - value of which will be cached for all subsequent requests. The - property may be set to - , to cause this factory to invoke the target method each - time it is asked for an object. -

-

- A target method may be specified by setting the - property to a string representing - the method name, with specifying - the that the method is defined on. - Alternatively, a target instance method may be specified, by setting the - property as the target object, and - the property as the name of the - method to call on that target object. Arguments for the method invocation may be - specified by setting the property. -

-

- Another (esoteric) use case for this factory object is when one needs to call a method - that doesn't return any value (for example, a class method to - force some sort of initialization to happen)... this use case is not supported by - factory-methods, since a return value is needed to become the object. -

-

- - This class depends on the - - method being called after all properties have been set, as per the - contract. If you are - using this class outside of a Spring.NET IoC container, you must call one of either - or - yourself to ready the object's internal - state, or you will get a nasty . - -

-
- -

- The following example uses an instance of this class to call a - factory method... -

- - - - - - - - 1st - 2nd - and 3rd arguments - - - - -

- The following example is similar to the preceding example; the only pertinent difference is the fact that - a number of different objects are passed as arguments, demonstrating that not only simple value types - are valid as elements of the argument list... -

- - - - - - - - - - - 1st - - - - - - - http://www.springframework.net/ - - - - - -

- Named parameters are also supported... this next example yields the same results as - the preceding example (that did not use named arguments). -

- - - - - - - - - - 1st - and 3rd arguments - 2nd - - - - -

- Similarly, the following example uses an instance of this class to call an instance method... -

- - - - - - - - - -

- The above example could also have been written using an anonymous inner object definition... if the - object on which the method is to be invoked is not going to be used outside of the factory object - definition, then this is the preferred idiom because it limits the scope of the object on which the - method is to be invoked to the surrounding factory object. -

- - - - - - - - - - Colin Sampaleanu - Juergen Hoeller - Rick Evans (.NET) - Simon White (.NET) - - - - - - Specialisation of the class that tries - to convert the given arguments for the actual target method via an - appropriate implementation. - - Juergen Hoeller - Rick Evans - - - - - Helper class allowing one to declaratively specify a method call for later invocation. - - -

- Typically not used directly but via its subclasses such as - . -

-

- Usage: specify either the and - or the - and - properties respectively, and - (optionally) any arguments to the method. Then call the - method to prepare the invoker. - Once prepared, the invoker can be invoked any number of times. -

-
- -

- The following example uses the class to invoke the - ToString() method on the Foo class using a mixture of both named and unnamed - arguments. -

- - public class Foo - { - public string ToString(string name, int age, string address) - { - return string.Format("{0}, {1} years old, {2}", name, age, address); - } - - public static void Main() - { - Foo foo = new Foo(); - MethodInvoker invoker = new MethodInvoker(); - invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; - invoker.AddNamedArgument("age", 29); - invoker.Prepare(); - // at this point, the arguments that will be passed to the method invocation - // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} - string details = (string) invoker.Invoke(); - Console.WriteLine (details); - // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' - } - } - -
- Colin Sampaleanu - Juergen Hoeller - Simon White (.NET) -
- - - The used to search for - the method to be invoked. - - - - - The value returned from the invocation of a method that returns void. - - - - - The method that will be invoked. - - - - - Creates a new instance of the class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set, or a matching argument could not be found - for a named argument (typically down to a typo). - - - If the specified method could not be found. - -
- - - Searches for and returns the method that is to be invoked. - - - The return value of this method call will subsequently be returned from the - . - - The method that is to be invoked. - - If no method could be found. - - - If more than one method was found. - - - - - Adds the named argument to this instances mapping of argument names to argument values. - - - The name of an argument on the method that is to be invoked. - - - The value of the named argument on the method that is to be invoked. - - - - - Returns the prepared object that - will be invoked. - - -

- A possible use case is to determine the return of the method. -

-
- - The prepared object that - will be invoked. - -
- - - Invoke the specified method. - - -

- The invoker needs to have been prepared beforehand (via a call to the - method). -

-
- - The object returned by the method invocation, or - if the method returns void. - - - If at least one of the arguments passed to this - was incompatible with the signature of the invoked method. - -
- - - The target on which to call the target method. - - -

- Only necessary when the target method is ; - else, a target object needs to be specified. -

-
-
- - - The target object on which to call the target method. - - -

- Only necessary when the target method is not ; - else, a target class is sufficient. -

-
-
- - - The name of the method to be invoked. - - -

- Refers to either a method - or a non- method, depending on - whether or not a target object has been set. -

-
- -
- - - Arguments for the method invocation. - - -

- Ordering is significant... the order of the arguments in this - property must match the ordering of the various parameters on the target - method. There does however exist a small possibility for confusion when - the arguments in this property are supplied in addition to one or more named - arguments. In this case, each named argument is slotted into the index position - corresponding to the named argument... once once all named arguments have been - resolved, the arguments in this property are slotted into any remaining (empty) - slots in the method parameter list (see the example in the overview of the - class if this is not clear). -

-

- If this property is not set, or the value passed to the setter invocation - is or a zero-length array, a method with no (un-named) arguments is assumed. -

-
- -
- - - The resolved arguments for the method invocation. - - - - This property is not set until the target method has been resolved via a call to the - method). It is a combination of the - named and plain vanilla arguments properties, and it is this object array that - will actually be passed to the invocation of the target method. - -

- Setting the value of this property to results in basically clearing out any - previously prepared arguments... another call to the - method will then be required to prepare the arguments again (or the prepared arguments - can be set explicitly if so desired). -

-
- - -
- - - Named arguments for the method invocation. - - -

- The keys of this dictionary are the () names of the - method arguments, and the () values are the actual - argument values themselves. -

-

- If this property is not set, or the value passed to the setter invocation - is a reference, a method with no named arguments is assumed. -

-
- -
- - - Creates a new instance of the - class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set. - - - If the specified method could not be found. - -
- - - Register the given custom - for all properties of the given . - - - The of property. - - - The to register. - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - -

- Returns the return value of the method that is to be invoked. -

-

- Will return the same value each time if the - - property value is . -

-
- - An instance (possibly shared or independent) of the object managed by - this factory. - - -
- - - Prepares this method invoker. - - - If all required properties are not set. - - - If the specified method could not be found. - - - - - - If a singleton should be created, or a new object on each request. - Defaults to . - - - - - Return the return value of the method - that this factory invokes, or if not - known in advance. - - -

- If the return value of the method that this factory is to invoke is - , then the - will be returned (in accordance with the - contract that - treats a value as a configuration error). -

-
- -
- - - Holder for an with - name and aliases. - - -

- Recognized by - - for inner object definitions. Registered by - , - which also uses it as general holder for a parsed object definition. -

-

- Can also be used for programmatic registration of inner object - definitions. If you don't care about the functionality offered by the - interface and the like, - registering - or is good enough. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - - The name of the object definition. - - - - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - The name of the object. - - Any aliases for the supplied - - - - - The held by this - instance. - - - - - The name of the object definition. - - - - - Any aliases for the object definition. - - -

- Guaranteed to never return ; if the associated - - does not have any aliases associated with it, then an empty - array will be returned. -

-
-
- - - Visitor class for traversing objects, in particular - the property values and constructor arguments contained in them resolving - object metadata values. - - - Used by and - to parse all string values contained in a ObjectDefinition, resolving any placeholders found. - - Mark Pollack - - - - Initializes a new instance of the class. - - The handler to be called for resolving variables contained in a string. - - - - Initializes a new instance of the class - for subclassing - - Subclasses should override the ResolveStringValue method - - - - Traverse the given ObjectDefinition object and the MutablePropertyValues - and ConstructorArgumentValues contained in them. - - The object definition to traverse. - - - - Visits the ObjectDefinition property ObjectTypeName, replacing string values using - the specified IVariableSource. - - The object definition. - - - - Visits the property values of the ObjectDefinition, replacing string values - using the specified IVariableSource. - - The object definition. - - - - Visits the indexed constructor argument values, replacing string values using the - specified IVariableSource. - - The indexed argument values. - - - - Visits the named constructor argument values, replacing string values using the - specified IVariableSource. - - The named argument values. - - - - Visits the generic constructor argument values, replacing string values using - the specified IVariableSource. - - The genreic argument values. - - - - Configures the constructor argument ValueHolder. - - The vconstructor alue holder. - - - - Resolves the given value taken from an object definition according to its type - - the value to resolve - the resolved value - - - - Visits the ManagedList property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet properties KeyTypeName and ValueTypeName and - calls for dictionary's value element. - - - - - Visits the elements of a NameValueCollection and calls - for value of each element. - - - - - calls the to resolve any variables contained in the raw string. - - the raw string value containing variable placeholders to be resolved - If no has been configured. - the resolved string, having variables being replaced, if any - - - - Returns a value that is an - that - returns an object from an - . - - -

- The primary motivation of this class is to avoid having a client object - directly calling the - - method to get a prototype object out of an - , which would be a - violation of the inversion of control principle. With the use of this - class, the client object can be fed an - as a property - that directly returns one target prototype object. -

-

- The object referred to by the value of the - - property does not have to be a prototype object, but there is little - to no point in using this class in conjunction with a singleton object. -

-
- -

- The following XML configuration snippet illustrates the use of this - class... -

- - - - - - - - - - - - - - - - Colin Sampaleanu - Simon White (.NET) - - - - Interface to be implemented by objects that wish to be aware of their owning - . - - -

- For example, objects can look up collaborating objects via the factory. -

-

- Note that most objects will choose to receive references to collaborating - objects via respective properties and / or an appropriate constructor. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - 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. - -
- - - Returns an instance of the object factory. - - The object factory. - - - - Invoked by an - after it has set all supplied object properties. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Sets the name of the target object. - - - - - 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 of object created by this factory. - - - - - Interface defining a factory which can return an object instance - (possibly shared or independent) when invoked. - - - This interface is typically used to encapsulate a generic factory - which returns a new instance (prototype) on each invocation. - It is similar to the , but - implementations of the aforementioned interface are normally meant to be defined - as instances by the user in an , - while implementations of this class are normally meant to be fed as a property to - other objects; as such, the - method - has different exception handling behavior. - - Colin Sampaleanu - Simon White (.NET) - - - - Return an instance (possibly shared or independent) - of the object managed by this factory. - - - An instance of the object (should never be ). - - - - - Creates a new instance of the GenericObjectFactory class. - - - The enclosing - . - - - - - Returns the object created by the enclosed object factory. - - The created object. - - - - An implementation - that exposes an arbitrary target object under a different name. - - -

- Usually, the target object will reside in a different object - definition file, using this - to link it in - and expose it under a different name. Effectively, this corresponds - to an alias for the target object. -

- - For XML based object definition files, a <alias> - tag is available that effectively achieves the same. - -
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Initialize a new default instance - - - - - Initialize this instance with the predefined and . - - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The name of the target object. - - -

- The target object may potentially be defined in a different object - definition file. -

-
- The name of the target object. -
- - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Callback that supplies the owning factory to an object instance. - - - The owning - (may not be ). The object can immediately - call methods on the factory. - - - In case of initialization errors. - - - - - - - Erich Eichinger - - - - Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. - - - - - Role hint indicating that a is a supporting - part of some larger configuration, typically an outer ComponentDefinition - SUPPORT objects are considered important enough to be aware - of when looking more closely at a particular ComponentDefinition, - but not when looking at the overall configuration of an application. - - - - - Role hint indicating that a is providing an - entirely background role and has no relevance to the end-user. This hint is - used when registering objects that are completely part of the internal workings - of a ComponentDefinition. - - - - - Implementation of that - resolves variable name against Java-style property file. - - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets the locations of the property files - to read properties from. - - - The locations of the property files - to read properties from. - - - - - Convinience property. Gets or sets a single location - to read properties from. - - - A location to read properties from. - - - - - Sets a value indicating whether to ignore resource locations that do not exist. This will call - the Exists property. - - - true if one should ignore missing resources; otherwise, false. - - - - - Overrides default values in one or more object definitions. - - -

- Instances of this class override already existing values, and is - thus best suited to replacing defaults. If you need to replace - placeholder values, consider using the - - class instead. -

-

- In contrast to the - - class, the original object definition can have default - values or no values at all for such object properties. If an overriding - configuration file does not have an entry for a certain object property, - the default object value is left as is. Also note that it is not - immediately obvious to discern which object definitions will be mutated by - one or more - s - simply by looking at the object configuration. -

-

- Each line in a referenced configuration file is expected to take the - following form... -

- - - -

- The name.property key refers to the object name and the - property that is to be overridden; and the value is the overridding - value that will be inserted into the appropriate object definition's - named property. -

-

- Please note that in the case of multiple - s - that define different values for the same object definition value, the - last overridden value will win (due to the fact that the values - supplied by previous - s - will be overridden). -

-
- -

- The following XML context definition defines an object that has a number - of properties, all of which have default values... -

- - - - - - - - -

- What follows is a .NET config file snippet for the above example (assuming - the need to override one of the default values)... -

- - - - - - -
- Juergen Hoeller - Simon White (.NET) - - - -
- - - Allows for the configuration of individual object property values from - a .NET .config file. - - -

- Useful for custom .NET .config files targetted at system administrators - that override object properties configured in the application context. -

-

- Two concrete implementations are provided in the Spring.NET core library: - - - - - for <add key="placeholderKey" value="..."/> style - overriding (pushing values from a .NET .config file into object - definitions). - - - - - - for replacing "${...}" placeholders (pulling values from a .NET .config - file into object definitions). - - - -

-

- Please refer to the API documentation for the concrete implementations - listed above for example usage. -

-
- Juergen Hoeller - Simon White (.NET) - - -
- - - The default configuration section name to use if none is explictly supplied. - - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Modify the application context's internal object factory after its - standard initialization. - - - The object factory used by the application context. - - - In case of errors. - - - - - - Loads properties from the configuration sections - specified in into . - - The instance to be filled with properties. - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Validates the supplied . - - -

- Basically, if external locations are specified, ensure that either - one or a like number of config sections are also specified. -

-
- - The to be validated. - -
- - - Simply initializes the supplied - collection with this instances default - (if any). - - - The collection to be so initialized. - - - - - The policy for resolving conflicting property overrides from - several resources. - - -

- When merging conflicting property overrides from several resources, - should append an override with the same key be appended to the - current value, or should the property override from the last resource - processed override previous values? -

-

- The default value is ; i.e. a property - override from the last resource to be processed overrides previous - values. -

-
- - if the property override from the last resource - processed overrides previous values. - -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - The default properties to be applied. - - -

- These are to be considered defaults, to be overridden by values - loaded from other resources. -

-
-
- - - The location of the .NET .config file that contains the property - overrides that are to be applied. - - - - - The locations of the .NET .config files containing the property - overrides that are to be applied. - - - - - The configuration sections to look for within the .config files. - - - - - - - Should a failure to find a .config file be ignored? - - -

- is only appropriate if the .config file is - completely optional. The default is . -

-
- - if a failure to find a .config file is to be - ignored. - -
- - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Process the given key as 'name.property' entry. - - - The object factory containing the object definitions that are to be - processed. - - The key. - The value. - - If an error occurs. - - - If the property was not well formed (i.e. not in the format "name.property"). - - - - - implementation that - evaluates a property path on a given target object. - - -

- The target object can be specified directly or via an object name (see - example below). -

-

- Please note that the - is an implementation, and as such has - to comply with the contract of the - interface; more specifically, this means that the end result of the property lookup path - evaluation cannot be ( - implementations are not permitted to return ). If the resut of a - property lookup path evaluates to , an exception will be thrown. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Juergen Hoeller - Rick Evans (.NET) - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The target object that the property path lookup is to be applied to. - - -

- This would most likely be an inner object, but can of course be - any object reference. -

-
- - The target object that the property path lookup is to be applied to. - - -
- - - The (object) name of the target object that the property path lookup - is to be applied to. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this name prior to resolution. The implication of this is that - one cannot use the - class in conjunction with object names that start or end with whitespace. -

-
- - The (object) name of the target object that the property path lookup - is to be applied to. - - -
- - - The property (lookup) path to be applied to the target object. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this path prior to resolution. Whitespace is not a valid - identifier for property names (in part or whole) in CLS-based languages, - so this is a not unreasonable action. Please also note that whitespace - that is embedded within the property path will be left as-is (which may - or may not result in an error being thrown, depending on the context of - the whitespace). -

-
- -

- Examples of such property lookup paths can be seen below; note that - property lookup paths can be nested to an arbitrary level. -

- - name.length - accountManager.account['the key'].name - accounts[0].name - -
- - The property (lookup) path to be applied to the target object. - -
- - - The 'expected' of the result from evaluating the - property path. - - -

- This is not necessary for directly specified target objects, or - singleton target objects, where the can - be determined via reflection. Just specify this in case of a - prototype target, provided that you need matching by type (for - example, for autowiring). -

-

- It is permissable to set the value of this property to - (which in any case is the default value). -

-
- - The 'expected' of the result from evaluating the - property path. - -
- - - 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? - - - - - - Set the name of the object in the object factory that created this object. - - -

- The object name of this - - will be interpreted as "objectName.property" pattern, if neither the - - - have been supplied (set). -

-

- This allows for concise object definitions with just an id or name. -

-
- - The name of the object in the factory. - -
- - - 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. - - - - - Resolves placeholder values in one or more object definitions. - - -

- The default placeholder syntax follows the NAnt style: ${...}. - Instances of this class can be configured in the same way as any other - object in a Spring.NET container, and so custom placeholder prefix - and suffix values can be set via the - and properties. -

- -

- The following example XML context definition defines an object that has - a number of placeholders. The placeholders can easily be distinguished - by the presence of the ${} characters. -

- - - - - - - - -

- The associated XML configuration file for the above example containing the - values for the placeholders would contain a snippet such as .. -

- - - - - - - - -

- The preceding XML snippet listing the various property keys and their - associated values needs to be inserted into the .NET config file of - your application (or Web.config file for your ASP.NET web application, - as the case may be), like so... -

- - - - - - - - -
-

- - checks simple property values, lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. -

- - - - - - - - -

- In contrast to the - - class, this configurer only permits the replacement of explicit - placeholders in object definitions. Therefore, the original definition - cannot specify any default values for its object properties, and the - placeholder configuration file is expected to contain an entry for each - defined placeholder. That is, if an object definition contains a - placeholder ${foo}, there should be an associated - <add key="foo" value="..."/> entry in the - referenced placeholder configuration file. Default property values - can be defined via the inherited - - collection to overcome any perceived limitation of this feature. -

-

- If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. If you want to resolve properties from multiple configuration - resources, simply specify multiple resources via the - - property. Finally, please note that you can also define multiple - - instances, each with their own custom placeholder syntax. -

-
- Juergen Hoeller - Simon White (.NET) - - - -
- - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Initializes the new instance - - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Parse values recursively to be able to resolve cross-references between - placeholder values. - - - The map of constructor arguments / property values. - - The string to be resolved. - The placeholders that have already been visited - during the current resolution attempt (used to detect circular references - between placeholders). Only non-null if we're parsing a nested placeholder. - - If an error occurs. - - The resolved string. - - - - Resolve the given placeholder using the given name value collection, - performing an environment variables check according to the given mode. - - -

- The default implementation delegates to - - before/afer the environment variable check. Subclasses can override - this for custom resolution strategies, including customized points - for the environment properties check. -

-
- The placeholder to resolve - - The merged name value collection of this configurer. - - The environment variable mode. - - The resolved value or if none. - - -
- - - Resolve the given placeholder using the given name value collection. - - -

- This (the default) implementation simply looks up the value of the - supplied key. -

-

- Subclasses can override this for customized placeholder-to-key - mappings or custom resolution strategies, possibly just using the - given name value collection as fallback. -

-
- The placeholder to resolve. - - The merged name value collection of this configurer. - - The resolved value. -
- - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Controls how environment variables will be used to - replace property placeholders. - - -

- See the overview of the - - enumeration for the available options. -

-
-
- - - implementation that - retrieves a or non-static public property value. - - -

- Typically used for retrieving public property values. -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - Template method that subclasses must override to construct the object - returned by this factory. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - The of the static property - to be retrieved. - - - - - Arguments for the property invocation. - - -

- If this property is not set, or the value passed to the setter invocation - is a null or zero-length array, a property with no arguments is assumed. -

-
-
- - - The name of the property the value of which is to be retrieved. - - -

- Refers to either a property or a non-static property, - depending on a target object being set. -

-
-
- - - The object instance on which the property is defined. - - - - - The on which the property is defined. - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - Implementation of that - resolves variable name against registry key. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, - strings are concatenated to a comma-separated list following - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets the registry key to obtain variable values from. - - - The registry key to obtain variable values from. - - - - - - implementation that allows for convenient registration of custom - IResource implementations. - - -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of IResources is required. -

-
- Mark Pollack - - -
- - - Registers custom IResource implementations. The supplied - is not used since IResourse implementations - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The IResource implementations, i.e. resource handlers, to register. - - -

- The has the - contains the resource protocol name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - The value can be the fully qualified name of the IResource - implementation, a string, or - an actual of the IResource class - -

-
-
- - - A convenience class to create a - given the resource base - name and assembly name. - - -

- This is currently the preferred way of injecting resources into view - tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). - A GUI component (typically a Windows Form) is injected with - an instance, and can - then proceed to use the various GetXxx() methods on the - to retrieve images, - strings, custom resources, etc. -

-
- Mark Pollack - - - -
- - - Creates a . - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The root name of the resources. - - -

- For example, the root name for the resource file named - "MyResource.en-US.resources" is "MyResource". -

- - The namespace is also prefixed before the resource file name. - -
-
- - - The string representation of the assembly that contains the resource. - - - - - The . - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to another object in this factory to be resolved at runtime. - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - -

- This does not mark this object as being a reference to - another object in any parent factory. -

-
- The name of the target object. -
- - - Creates a new instance of the - - class. - - -

- This variant constructor allows a client to specifiy whether or not - this object is a reference to another object in a parent factory. -

-
- The name of the target object. - - Whether this object is an explicit reference to an object in a - parent factory. - -
- - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Return the target object name. - - - - - Is this is an explicit reference to an object in the parent - factory? - - - if this is an explicit reference to an - object in the parent factory. - - - - - Simple factory object for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target set. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - Configure all ISharedStateAware objects, delegating concrete handling to the list of . - - - - - Creates a new empty instance. - - - - - Creates a new preconfigured instance. - - - priority value affecting order of invocation of this processor. See interface. - - - - Iterates over configured list of s until - the first provider is found that
- a) true == provider.CanProvideState( instance, name )
- b) null != provider.GetSharedState( instance, name )
-
-
- - - A NoOp for this processor - - - The new object instance. - - - The name of the object. - - - the original . - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Get/Set the (already ordererd!) list of instances. - - - If this list is not set, the containing object factory will automatically - be scanned for instances. - - - - - Implementation of that - resolves variable name against special folders (as defined by - enumeration). - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves specified special folder to its full path. - - - The name of the special folder to resolve. Should be one of the values - defined by the enumeration. - - - The folder path if able to resolve, null otherwise. - - - - - - implementation that allows for convenient registration of custom - type aliases. - - - Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of type aliases is required. -

-
- Mark Pollack - - -
- - - Registers any type aliases. The supplied - is not used since type aliases - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The type aliases to register. - - -

- The has the - contains the alias name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - the value can be the fully qualified name of the type as a string or - an actual of the class that - being aliased. -

-
-
- - - Holder for a typed value. - - -

- Can be added to object definitions to explicitly specify - a target type for a value, - for example for collection - elements. -

-

- This holder just stores the value and the target - . The actual conversion will be performed by - the surrounding object factory. -

-
- Juergen Hoeller - Rick Evans (.NET) - Bruno Baia (.NET) -
- - - Creates a new instance of the - - class. - - - - - Initializes a new instance of the class. - - The value. - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The to convert to. - - - If the supplied is - . - - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The unresolved type to convert to. - - - If the supplied is a - or an empty string. - - - - - Determine the type to convert to, resolving it from a specified type name if necessary. - - The resolved type to convert to. - - - - The value that is to be converted. - - -

- Obviously if the - - is the , no conversion - will actually be performed. -

-
-
- - - The to convert to. - - - If the setter is supplied with a value. - - - - - The unresolved type to convert to. - - - If the setter is supplied with a value or an empty string. - - - - - Gets a value indicating whether this instance has target type. - - - true if this instance has target type; otherwise, false. - - - - - Provides methods for type-safe accessing s. - - Erich Eichinger - - - - Initialize a new instance of an - - The underlying to read values from. - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - An of 's type that contains the value of the specified variable - or , if returns null. - - - - - Returns an of 's type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - An of 's type that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns or . - - A that contains the value of the specified variable - or , if returns null. - - - - - Resolves placeholder values in one or more object definitions - - - The placeholder syntax follows the NAnt style: ${...}. - Placeholders values are resolved against a list of - s. In case of multiple definitions - for the same property placeholder name, the first one in the - list is used. - Variable substitution is performed on simple property values, - lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. - - - - - - - - - - If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. - - Mark Pollack - - - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Create a new instance without any variable sources - - - - - Create a new instance and initialize with the given variable source - - - - - - Create a new instance and initialize with the given list of variable sources - - - - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Apply the property replacement using the specified s for all - object in the supplied - . - - - The - used by the application context. - - - If an error occured. - - - - - Sets the list of s that will be used to resolve placeholder names. - - A list of s. - - - - Sets that will be used to resolve placeholder names. - - A instance. - - - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - Initializes a new instance of the Location class. - - - - - - - Initializes a new instance of the Location class. - - - - - - Thrown when an - encounters an internal error, and its definitions are invalid. - - -

- An example of a situation when this exception would be thrown is - in the case of an XML document containing object definitions being - malformed. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectDefinitionStoreException class. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The description of the resource associated with the object - - - - - The name of the object that trigger the exception. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Initializes a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionParsingException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Initializes a new instance of the class. - - The message. - The location. - - - - Initializes a new instance of the Problem class. - - - - - - - - Context that gets passed along an object definition reading process, - encapsulating all relevant configuraiton as well as state. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The resource. - - - - Gets the resource. - - The resource. - - - - Abstract superclass - that implements default object creation. - - -

- Provides object creation, initialization and wiring, supporting - autowiring and constructor resolution. Handles runtime object - references, managed collections, and object destruction. -

-

- The main template method to be implemented by subclasses is - , - used for autowiring by type. Note that this class does not implement object - definition registry capabilities - ( - does). -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Abstract superclass for - implementations. - - -

- This class provides singleton / prototype determination, singleton caching, - object definition aliasing, - handling, and object definition merging for child object definitions. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Marker object to be temporarily registered in the singleton cache, - while instantiating an object (in order to be able to detect circular references). - - - - - Used as value in hashtable that keeps track of singleton names currently in the - process of being created. Would not be necessary if we created a case insensitive implementation of - ISet. - - - - - The instance for this class. - - - - - Cache of singleton objects created by s: FactoryObject name -> product - - - - - Creates a new instance of the - class. - - -

- This constructor implicitly creates an - - that treats the names of objects in this factory in a case-sensitive fashion. -

-

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

-
-
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - -
- - - Creates a new instance of the - class. - - -

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

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - - - Any parent object factory; may be . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - In case of errors. - -
- - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - In case of errors. - -
- - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Create instance only - suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself, - nor throw an exception. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Does this object factory contain an object definition with the - supplied ? - - -

- Does not consider any hierarchy this factory may participate in. - Invoked by - - when no cached singleton instance is found. -

-
- - The name of the object to look for. - - - if this object factory contains an object - definition with the supplied . - -
- - - Adds the supplied (object) to this factory's - singleton cache. - - -

- To be called for eager registration of singletons, e.g. to be able to - resolve circular references. -

- - If a singleton has already been registered under the same name as - the supplied , then the old singleton will - be replaced. - -
- The name of the object. - The singleton object. - - If the argument is - or consists wholly of whitespace characters; or if the - is . - -
- - - Return the object name, stripping out the factory dereference prefix if - necessary, and resolving aliases to canonical names. - - - The transformed name of the object. - - - - - Ensures, that the given name is prefixed with - if it incidentially already starts with this prefix. This avoids troubles when dereferencing - the object name during - - - - - Determines whether the specified name is defined as an alias as opposed - to the name of an actual object definition. - - The object name to check. - - true if the specified name is alias; otherwise, false. - - - - - Return a , - even by traversing parent if the parameter is a child definition. - - - The name of the object. - - - Are ancestors to be included in the merge? - - -

- Will ask the parent object factory if not found in this instance. -

-
- - A merged - with overridden properties. - -
- - - Return a , - even by traversing parent if the parameter is a child definition. - - - A merged - with overridden properties. - - - - - Creates the root object definition. - - The template definition to base root definition on. - Root object definition. - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Gets the type for the given FactoryObject. - - The factory object instance to check. - the FactoryObject's object type - - - - Gets the object type for the given FactoryObject definition, as far as possible. - Only called if there is no singleton instance registered for the target object already. - - - The default implementation creates the FactoryObject via GetObject - to call its ObjectType property. Subclasses are encouraged to optimize - this, typically by just instantiating the FactoryObject but not populating it yet, - trying whether its ObjectType property already returns a type. - If no type found, a full FactoryObject creation as performed by this implementation - should be used as fallback. - - Name of the object. - The merged object definition for the object. - The type for the object if determinable, or null otherwise - - - - Predict the eventual object type (of the processed object instance) for the - specified object. - - - Does not need to handle FactoryObjects specifically, since it is only - supposed to operate on the raw object type. - This implementation is simplistic in that it is not able to - handle factory methods and InstantiationAwareBeanPostProcessors. - It only predicts the object type correctly for a standard object. - To be overridden in subclasses, applying more sophisticated type detection. - - Name of the object. - The merged object definition to determine the type for. May be null - The type of the object, or null if not predictable - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - - The name that may include the factory dereference prefix. - - The object instance. - - The singleton instance of the object. - - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - The object instance. - - The name that may include the factory dereference prefix (=the requested name). - - - The canonical object name - - the merged object definition - - The singleton instance of the object. - - - - - Obtain an object to expose from the given IFactoryObject. - - The IFactoryObject instance. - Name of the object. - The merged object definition. - The object obtained from the IFactoryObject - If IFactoryObject object creation failed. - - - - Post-process the given object that has been obtained from the FactoryObject. - The resulting object will be exposed for object references. - - The default implementation simply returns the given object - as-is. Subclasses may override this, for example, to apply - post-processors. - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Convenience method to pull an - from this factory. - - - The name of the factory object to be retrieved. If this name is not a valid - name, it will be converted - into one. - - - The associated with the - supplied . - - - - - Is the supplied a factory object dereference? - - - - - Determines whether the type of the given object definition matches the - specified target type. - - Allows for lazy load of the actual object type, provided that the - type match can be determined otherwise. - The default implementation simply delegates to the standard - ResolveObjectType method. Subclasses may override this to use - a differnt strategy. - - Name of the object (for error handling purposes). - The merged object definition to determine the type for. - Type to match against (never null). - - true if object definition matches tye specified target type; otherwise, false. - - if we failed to load the type." - - - - Resolves the type of the object for the specified object definition resolving - an object type name to a Type (if necessary) and storing the resolved Type - in the object definition for further use. - - The merged object definition to dertermine the type for. - Name of the object (for error handling purposes). - - - - - Is the object (definition) with the supplied an - ? - - The name of the object to be checked. - - the object (definition) with the supplied - an ? - - - - - Remove the object identified by the supplied - from this factory's singleton cache. - - - The name of the object that is to be removed from the singleton - cache. - - - If the argument is or - consists wholly of whitespace characters. - - - - - Return the names of objects in the singleton cache that match the given - object type (including subclasses). - - - The class or interface to match, or for all object names. - - -

- Will not consider s - as the type of their created objects is not known before instantiation. -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of objects in the singleton cache that match the given - object type (including subclasses), or an empty array if none. - -
- - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determines the of the object with the - supplied . - - -

- More specifically, checks the of object that - would return. - For an , returns the - of object that the - creates. -

-

- Please note that (prototype) objects created via a factory method or - objects are handled - slightly differently, in that we don't want to needlessly create - instances of such objects just to determine the - of object that they create. -

-
- The name of the object to query. - - The of the object or - if not determinable. - -
- - - Determines the of the object defined - by the supplied object . - - -

- This, the default, implementation returns - to indicate that the type cannot be determined. Subclasses are - encouraged to try to determine the actual return - here, matching their strategy of resolving - factory methods in the - Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject - implementation. -

-
- - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - -
- - - Returns the names of the objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The names of the objects in the singleton cache. -
- - - Returns the number of objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The number of objects in the singleton cache. -
- - - Destroys the named singleton object. - - -

- Delegates to - - if a corresponding singleton instance is found. -

-
- - The name of the singleton object that is to be destroyed. - - -
- - - Check the supplied merged object definition for any possible - validation errors. - - - The object definition to be checked for validation errors. - - - The name of the object associated with the supplied object definition. - - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - - In the case of object validation errors. - - - - - Parent object factory, for object inheritance support - - - - - Dependency types to ignore on dependency check and autowire, as Set of - Type objects: for example, string. Default is none. - - - - - ObjectPostProcessors to apply in CreateObject - - - - - Indicates whether any IInstantiationAwareBeanPostProcessors have been registered - - - - - Indicates whether any IDestructionAwareBeanPostProcessors have been registered - - - - - Set of registered singletons, containing the bean names in registration order - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Is this object a singleton? - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Does this object factory or one of its parent factories contain an object with the given name? - - - This method scans the object factory hierarchy starting with the current factory instance upwards. - Use if you want to explicitely check just this object factory instance. - - . - - - - Return the aliases for the given object name, if defined. - - . - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Return an instance (possibly shared or independent) of the given object name. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name, - optionally injecting dependencies. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - whether to inject dependencies or not. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - - Checks, if the passed instance is of the required type. - - the name of the object - the actual instance - the type contract the given instance must adhere. - the object instance passed in via (for more fluent usage) - - if is null or not assignable to . - - - - - Creates a singleton instance for the specified object name and definition. - - - The object name (will be used as the key in the singleton cache key). - - The object definition. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The created object instance. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - - - - Destroy all cached singletons in this factory. - - - - - Ignore the given dependency type for autowiring - - . - - - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - - The - to register. - - . - - - - Given an object name, create an alias. - - . - - - - Register the given custom - for all properties of the given . - - . - - - - Register the given existing object as singleton in the object factory, - under the given object name. - - . - - - - Does this object factory contains a singleton instance with the - supplied ? - - - - - - Tries to find a cached object for the specified name. - - Teh object name to look for. - The cached object if found, otherwise. - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - Name of the object to check. - - true if is object name in use; otherwise, false. - - - - - Gets the singleton lock for a given object name. - - Name of the object. - lock object - - - - Returns, whether this factory treats object names case sensitive or not. - - - - - Gets the of - s - that will be applied to objects created by this factory. - - - - - Gets the set of classes that will be ignored for autowiring. - - -

- The elements of this are - s. -

-
-
- - - Returns, whether this object factory instance contains objects. - - - - - Returns, whether this object factory instance contains objects. - - - - - Gets the temporary object that is placed - into the singleton cache during object resolution. - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - The parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Returns the current number of registered - s. - - - The current number of registered - s. - - . - - - - Gets the names of singleton objects registered in this registry. - - The list of names as String array (never null). - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - - - - - - - Gets the number of singleton beans registered in this registry. - - The number of singleton objects. - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - - - - - - - Makes a distinction between sort order and object identity. - This is important when used with , since most - implementations assume Order == Identity - - - - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - The used during the invocation and - searching for of methods. - - - - - The instance for this class. - - - - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. -
- - - Creates a new instance of the - - class. - - -

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

-
- Flag specifying whether to make this object factory case sensitive or not. - The parent object factory, or if none. -
- - - Predict the eventual object type (of the processed object instance) for the - specified object. - - Name of the object. - The merged object definition to determine the type for. May be null - - The type of the object, or null if not predictable - - - - - Determines the of the object defined - by the supplied object . - - - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - - - Apply any - s. - - -

- The returned instance may be a wrapper around the original. -

-
- - The of the object that is to be - instantiated. - - - The name of the object that is to be instantiated. - - - An instance to use in place of the original instance. - - - In case of errors. - -
- - - Apply the given property values, resolving any runtime references - to other objects in this object factory. - - - The object name passed for better exception information. - - - The definition of the named object. - - - The wrapping the target object. - - - The new property values. - - -

- Must use deep copy, so that we don't permanently modify this property. -

-
-
- - - Create the value resolver strategy to use for resolving raw property values - - - - - Return an array of object-type property names that are unsatisfied. - - -

- These are probably unsatisfied references to other objects in the - factory. Does not include simple properties like primitives or - s. -

-
- - An array of object-type property names that are unsatisfied. - - - The definition of the named object. - - - The wrapping the target object. - -
- - - Destroy all cached singletons in this factory. - - -

- To be called on shutdown of a factory. -

-
-
- - - Populate the object instance in the given - with the property values from the - object definition. - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Wires up any exposed events in the object instance in the given - with any event handler - values from the . - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Fills in any missing property values with references to - other objects in this factory if autowire is set to - . - - - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - - - - - Defines "autowire by type" (object properties by type) behavior. - - -

- This is like PicoContainer default, in which there must be exactly one object - of the property type in the object factory. This makes object factories simple - to configure for small namespaces, but doesn't work as well as standard Spring - behavior for bigger applications. -

-
- - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - -
- - - Ignore the given dependency type for autowiring - - - This will typically be used by application contexts to register - dependencies that are resolved in other ways, like IOjbectFactory through - IObjectFactoryAware or IApplicationContext through IApplicationContextAware. - By default, IObjectFactoryAware and IObjectName interfaces are ignored. - For further types to ignore, invoke this method for each type. - - . - - - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Add the created, but yet unpopulated singleton to the singleton cache - to be able to resolve circular references - - the name of the object to add to the cache. - the definition used to create and populated the object. - the raw object instance. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Remove the specified singleton from the singleton cache that has - been added before by a call to - - the name of the object to remove from the cache. - the definition used to create and populated the object. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Creates an instance from the passed in - using constructor - - The name of the object to create - used for error messages. - The describing the object to be created. - optional arguments to pass to the constructor - An wrapping the already instantiated object - - - - Instantiates the given object using its default constructor - - Name of the object. - The definition. - IObjectWrapper for the new instance - - - - Determines candidate constructors to use for the given object, checking all registered - - - Raw type of the object. - Name of the object. - the candidate constructors, or null if none specified - In case of errors - - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - "autowire constructor" (with constructor arguments by type) behaviour. - - The name of the object to autowire by type. - The object definition to update through autowiring. - The chosen candidate constructors. - The argument values passed in programmatically via the GetObject method, - or null if none (-> use constructor argument values from object definition) - - An for the new instance. - - - - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: in this mode, a Spring.NET - object factory is able to host components that expect constructor-based - dependency resolution. - - - - - - Perform a dependency check that all properties exposed have been set, if desired. - - -

- Dependency checks can be objects (collaborating objects), simple (primitives - and ), or all (both). -

-
- - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - The property values to be checked. - - - If all of the checked dependencies were not satisfied. - -
- - - Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding - ignored dependency types. - - The object wrapper the object was created with. - The filtered PropertyInfos - - - - Determine whether the given bean property is excluded from dependency checks. - This implementation excludes properties whose type matches an ignored dependency type - or which are defined by an ignored dependency interface. - - - - the of the object property - whether the object property is excluded - - - - Give an object a chance to react now all its properties are set, - and a chance to know about its owning object factory (this object). - - -

- This means checking whether the object implements - and / or - , and invoking the - necessary callback(s) if it does. -

-

- Custom init methods are resolved in a case-insensitive manner. -

-
- - The new object instance we may need to initialise. - - - The name the object has in the factory. Used for logging output. - - - The definition of the target object instance. - -
- - - Invoke the specified custom destroy method on the given object. - - -

- This implementation invokes a no-arg method if found, else checking - for a method with a single boolean argument (passing in "true", - assuming a "force" parameter), else logging an error. -

-

- Can be overridden in subclasses for custom resolution of destroy - methods with arguments. -

-

- Custom destroy methods are resolved in a case-insensitive manner. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself. - Should not throw any exceptions. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Destroys all of the objects registered as dependant on the - object (definition) identified by the supplied . - - - The name of the root object (definition) that is itself being destroyed. - - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - Find object instances that match the required . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The of the objects to look up. - - - An of object names and object - instances that match the required , or - if none are found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - Called by DestroyObject, to be able to destroy depending objects first. - - - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Configures object instance by injecting dependencies, satisfying Spring lifecycle - interfaces and applying object post-processors. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - A wrapped object instance that is to be so configured. - - - - - - Applies the PostProcessAfterInitialization callback of all - registered IObjectPostProcessors, giving them a chance to post-process - the object obtained from IFactoryObjects (for example, to auto-proxy them) - - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - If the supplied is not one of the - or - - values. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Cache of filtered PropertyInfos: object Type -> PropertyInfo array - - - - - Dependency interfaces to ignore on dependency check and autowire, as Set of - Class objects. By default, only the IObjectFactoryAware and IObjectNameAware - interfaces are ignored. - - - - - The - implementation to be used to instantiate managed objects. - - - - - An - implementation that provides some convenience support for - derived classes. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Permits the (re)implementation of an arbitrary method on a Spring.NET - IoC container managed object. - - -

- Encapsulates the notion of the Method-Injection form of Dependency - Injection. -

-

- Methods that are dependency injected with implementations of this - interface may be (but need not be) , in which - case the container will create a concrete subclass of the - class prior to instantiation. -

-

- Do not use this mechanism as a means of AOP. See the reference - manual for examples of appropriate usages of this interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Reimplement the supplied . - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the (re)implementation of the method call. - - - - - Creates a new instance of the - - class. - - -

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

-
- - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - -
- - - Is ; derived classes must supply an implementation. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - The result of the object lookup. - - - - Helper method for subclasses to retrieve the appropriate - for the - supplied . - - - The to use to retrieve - the appropriate - . - - - The appropriate - . - - - - - Helper method for subclasses to lookup an object from an enclosing - IoC container. - - - The name of the object that is to be looked up. - - - The named object. - - - - - Common base class for object definitions, factoring out common - functionality from - and - . - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Describes a configurable object instance, which has property values, - constructor argument values, and further information supplied by concrete - implementations. - - Rick Evans - - - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - The method overrides (if any) for this object. - - - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - - - - - Return the event handlers for any events exposed by this object. - - - - - Get or set the role hint for this object definition - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition (if any). - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The dependency check code. - - - - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The object definition used to initialise the member fields of this - instance. - - -

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

-
-
- - - Resolves the type of the object, resolving it from a specified - object type name if necessary. - - - A resolved instance. - - - If the type cannot be resolved. - - - - - Validate this object definition. - - - In the case of a validation failure. - - - - - Validates all - - - - - Validate the supplied . - - - The - to be validated. - - - - - Override settings in this object definition from the supplied - object definition. - - - The object definition used to override the member fields of this instance. - - - - - Returns a that represents the current - . - - - A that represents the current - . - - - - - The name of the parent definition of this object definition, if any. - - - - - The property values that are to be applied to the object - upon creation. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The property values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - Does this definition have any - ? - - - if this definition has at least one - . - - - - - The constructor argument values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The constructor argument values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The event handler values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The event handler values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The method overrides (if any) for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The name of the target scope for the object. - Defaults to "singleton", ootb alternative is "prototype". Extended object factories - might support further scopes. - - - - - Get or set the role hint for this object definition - - - - - Is this definition a singleton, with - a single, shared instance returned on all calls to an enclosing - container (typically an - or - ). - - -

- If , an object factory will apply the - prototype design pattern, with each caller requesting an - instance getting an independent instance. How this is defined - will depend on the object factory implementation. singletons - are the commoner type. -

-
- -
- - - Gets a value indicating whether this instance is prototype, with an independent instance - returned for each call. - - - true if this instance is prototype; otherwise, false. - - - - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup - by object factories that perform eager initialization of - singletons. -

-
-
- - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be - instantiated itself but rather just serving as a parent for concrete - child object definitions. - - - if this object definition is "abstract". - - - - - The of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - - Is the of the object definition a resolved - ? - - - - - Returns the of the - of the object definition (if any). - - - - - A description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. The default is - , - which means that no autowiring will be performed. -

-
-
- - - Gets the resolved autowire mode. - - -

- This resolves - - to one of - - or - . -

-
-
- - - The dependency checking mode. - - -

- The default is - . -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before this object definition. -

- - Dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - The name of the initializer method. - - -

- The default value is the constant, - in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default value is the constant, - in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The - method will be invoked on the specified - . -

-
-
- - - The name of the factory object to use (if any). - - - - - Does this object definition have any constructor argument values? - - - if his object definition has at least one - element in it's - - property. - - - - - Abstract base class for object definition readers. - - -

- Provides common properties like the object registry to work on. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Simple interface for object definition readers. - - Juergen Hoeller - Rick Evans - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The against which any class names - will be resolved into instances. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - Gets the resource loader to use for resource locations. - - There is also a method - available for loading object definitions from a resource location. This is - a convenience to avoid explicit ResourceLoader handling. - The resource loader. - - - - The instance for this class (and derived classes). - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - -

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

-
-
- - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - The against which any class names - will be resolved into instances. - - -

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

-
-
- - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - - The against which any class names - will be resolved into instances. - - - - - Gets or sets the resource loader to use for resource locations. - - The resource loader. - - - - Utility class that contains various methods useful for the implementation of - autowire-capable object factories. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the AutowireUtils class. - - -

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

-
-
- - - Gets those s - that are applicable for autowiring the supplied . - - - The - (definition) that is being autowired by constructor. - - - The absolute minimum number of arguments that any returned constructor - must have. If this parameter is equal to zero (0), then all constructors - are valid (regardless of their argument count), including any default - constructor. - - - Those s - that are applicable for autowiring the supplied . - - - - - Determine a weight that represents the class hierarchy difference between types and - arguments. - - -

- A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase - the result - all direct matches means weight zero (0). A match between the argument type - and a MyInteger instance argument would increase the weight by - 1, due to the superclass () being one (1) steps up in the - class hierarchy being the last one that still matches the required type. -

-

- Therefore, with an argument of type , a - constructor taking a argument would be - preferred to a constructor taking an argument - which would be preferred to a constructor taking an - argument which would in turn be preferred - to a constructor taking an argument. -

-

- All argument weights get accumulated. -

-
- - The argument s to match. - - The arguments to match. - The accumulated weight for all arguments. -
- - - Algorithm that judges the match between the declared parameter types of a candidate method - and a specific list of arguments that this method is supposed to be invoked with. - - - Determines a weight that represents the class hierarchy difference between types and - arguments. The following a an example based on the Java class hierarchy for Integer. - A direct match, i.e. type Integer -> arg of class Integer, does not increase - the result - all direct matches means weight 0. A match between type Object and arg of - class Integer would increase the weight by 2, due to the superclass 2 steps up in the - hierarchy (i.e. Object) being the last one that still matches the required type Object. - Type Number and class Integer would increase the weight by 1 accordingly, due to the - superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. - Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a - constructor (Number) which would in turn be preferred to a constructor (Object). - All argument weights get accumulated. - - The param types. - The args. - - - - - Determines whether the given object property is excluded from dependency checks. - - The PropertyInfo of the object property. - - true if is excluded from dependency check; otherwise, false. - - - - - Sorts the supplied , preferring - public constructors and "greedy" ones (that have lots of arguments). - - -

- The result will contain public constructors first, with a decreasing number - of arguments, then non-public constructors, again with a decreasing number - of arguments. -

-
- - The array to be sorted. - -
- - - Determines whether the setter property is defined in any of the given interfaces. - - The PropertyInfo of the object property - The ISet of interfaces. - - true if setter property is defined in interface; otherwise, false. - - - - - Creates the autowire candidate resolver. - - A SimpleAutowireCandidateResolver - - - - Returns the list of that are not satisfied by . - - the filtered list. Is never null - - - - Object definition for definitions that inherit settings from their - parent (object definition). - - -

- Will use the - of the parent object definition if none is specified, but can also - override it. In the latter case, the child's - - must be compatible with the parent, i.e. accept the parent's property values - and constructor argument values (if any). -

-

- A will - inherit all of the , - , and - from it's parent - object definition, with the option to add new values. If the - , - , - and / or - - properties are specified, they will override the corresponding parent settings. -

-

- The remaining settings will always be taken from the child definition: - , - , - , - , - and - -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - - class. - - - The name of the parent object. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The class of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The of the object to - instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Validate this object definition. - - -

- A common cause of validation failures is a missing value for the - - property; by - their very nature require that the - - be set. -

-
- - In the case of a validation failure. - -
- - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Helper class for resolving constructors and factory methods. - Performs constructor resolution through argument matching. - - - Operates on a and an . - Used by . - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for the given factory - and instantiation strategy. - - The object factory to work with. - The object factory as IAutowireCapableObjectFactory. - The instantiation strategy for creating objects. - the resolver to resolve property value placeholders if any - - - - "autowire constructor" (with constructor arguments by type) behavior. - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: In this mode, a Spring - object factory is able to host components that expect constructor-based - dependency resolution. - - Name of the object. - The merged object definition for the object. - The chosen chosen candidate constructors (or null if none). - The explicit argument values passed in programmatically via the getBean method, - or null if none (-> use constructor argument values from object definition) - An IObjectWrapper for the new instance - - - - Gets the constructor instantiation info given the object definition. - - Name of the object. - The RootObjectDefinition - The explicitly chosen ctors. - The explicit chose ctor args. - A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or - one based on type matching. - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - Create an array of arguments to invoke a constructor or static factory method, - given the resolved constructor arguments values. - - When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain - information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using - exceptions for flow control as in the original implementation. - - - - Resolves the - of the supplied . - - The name of the object that is being resolved by this factory. - The rod. - The wrapper. - The cargs. - Where the resolved constructor arguments will be placed. - - The minimum number of arguments that any constructor for the supplied - must have. - - -

- 'Resolve' can be taken to mean that all of the s - constructor arguments is resolved into a concrete object that can be plugged - into one of the s constructors. Runtime object - references to other objects in this (or a parent) factory are resolved, - type conversion is performed, etc. -

-

- These resolved values are plugged into the supplied - object, because we wouldn't want to touch - the s constructor arguments in case it (or any of - its constructor arguments) is a prototype object definition. -

-

- This method is also used for handling invocations of static factory methods. -

-
-
- - - Returns an array of all of those - methods exposed on the - that match the supplied criteria. - - - Methods that have this name (can be in the form of a regular expression). - - - Methods that have exactly this many arguments. - - - Methods that are static / instance. - - - The on which the methods (if any) are to be found. - - - An array of all of those - methods exposed on the - that match the supplied criteria. - - - - - Concrete implementation of the - and - - interfaces. - - -

- This class is a full-fledged object factory based on object definitions - that is usable straight out of the box. -

-

- Can be used as an object factory in and of itself, or as a superclass - for custom object factory implementations. Note that readers for - specific object definition formats are typically implemented separately - rather than as object factory subclasses. -

-

- For an alternative implementation of the - interface, - have a look at the - - class, which manages existing object instances rather than creating new - ones based on object definitions. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - - - - Creates a new instance of the - class. - - The parent object factory. - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory. - - - - Find object instances that match the . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The type of the objects to look up. - - - An of object names and object - instances that match the , or - if none is found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - - -

- Called by the - - so that dependant objects are able to be disposed of first. -

-
- - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - -
- - - Check whether the specified object matches the supplied . - - The name of the object to check. - - The to check for. - - - if the object matches the supplied , - or if the supplied is . - - - - - The instance for this class. - - - - - Whether to allow re-registration of a different definition with the - same name. - - - - - The mapping of object definition objects, keyed by object name. - - - - - List of object definition names, in registration order. - - - - - Resolver to use for checking if an object definition is an autowire candidate - - - - - IDictionary from dependency type to corresponding autowired value - - - - - Check if this registry contains a object definition with the given - name. - - - The name of the object to look for. - - - if this object factory contains an object - definition with the given name. - - - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - - If one of the singleton objects could not be created. - - - - - - Register a special dependency type with corresponding autowired value. - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the IObjectFactory interface itself. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Check whether the specified bean would need to be eagerly initialized - in order to determine its type. - - a factory-bean reference that the bean definition defines a factory method for - whether eager initialization is necessary - - - - Check whether the given bean is defined as a . - - the name of the object - the corresponding object definition - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Raises the no such object definition exception for an unresolvable dependency - - The type. - The dependency description. - The descriptor. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - Determine whether the specified object definition qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - - Name of the object definition to check. - The merged object definiton to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - - - - Should object definitions registered under the same name as an - existing object definition be allowed? - - -

- If , then the new object definition will - replace (override) the existing object definition. If - , an exception will be thrown when - an attempt is made to register an object definition under the same - name as an already existing object definition. -

-

- The default is . -

-
- - is the registration of an object definition - under the same name as an existing object definition is allowed. - -
- - - Get or set custom autowire candidate resolver for this IObjectFactory to use - when deciding whether a bean definition should be considered as a - candidate for autowiring. Never null - - - - - Return the number of objects defined in this registry. - - - The number of objects defined in this registry. - - - - - - Default implementation of the - - interface. - - -

- Does not support per - loading. -

-
- Aleksandar Seovic -
- - - Central interface for factories that can create - - instances. - - -

- Allows for replaceable object definition factories using the Strategy - pattern. -

-
- Aleksandar Seovic -
- - - Factory style method for getting concrete - - instances. - - - The FullName of the of the defined object. - - The name of the parent object definition (if any). - - The against which any class names - will be resolved into instances. It can be null to register the - object class just by name. - - - An - - instance. - - - - - Factory style method for getting concrete - - instances. - - /// If no parent is specified, a RootObjectDefinition is created, otherwise a - ChildObjectDefinition. - The of the defined object. - The name of the parent object definition (if any). - The against which any class names - will be resolved into instances. - - An - - instance. - - - - - Default implementation of the interface, deleagting to - 's GenerateObjectName. - - Note that this implementation is only able to handle - subclasses such as - and - - Juergen Hoeller - Mark Pollack (.NET) - - - - Strategy interface for generating object names for object definitions - - Juergen Hoeller - Mark Pollack (.NET) - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - An - implementation that delegates to an - that is - obtained as the result of a lookup in an associated IoC container. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by delegating to - another - looked up in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the delegated call to the looked up - . - - - - - The various modes of dependency checking. - - Rick Evans (.NET) - - - - DO not do any dependency checking. - - - - - Check object references. - - - - - Just check primitive (string, int, etc) values. - - - - - Check everything. - - - - - GenericObjectDefinition is a one-stop shop for standard object definition purposes. - Like any object definition, it allows for specifying a class plus optionally - constructor argument values and property values. Additionally, deriving from a - parent bean definition can be flexibly configured through the "parentName" property. - - In general, use this class for the purpose of - registering user-visible object definitions (which a post-processor might operate on, - potentially even reconfiguring the parent name). - Use / - where parent/child relationships happen to be pre-determined. - - - - Juergen Hoeller - Erich Eichinger - - - - Creates a new to be configured through its - object properties and configuration methods. - - - - - Creates a new as deep copy of the given - object definition. - - the original object definition to copy from - - - - Returns a representation of this - for debugging purposes. - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Strategy interface for determining whether a specific object definition - qualifies as an autowire candidate for a specific dependency. - - Mark Fisher - Juergen hoeller - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Responsible for creating instances corresponding to a - . - - Rod Johnson - Rick Evans (.NET) - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Represents an override of a method that looks up an object in the same IoC context. - - -

- Methods eligible for lookup override must not have arguments. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Represents the override of a method on a managed object by the IoC container. - - -

- Note that the override mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - -

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

-
- - The name of the method that is to be overridden. - - - If the supplied is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - -

- By 'match' one means does this particular - - instance apply to the supplied ? -

-

- This allows for argument list checking as well as method name checking. -

-
- The method to be checked. - - if this override matches the supplied - . - -
- - - The name of the method that is to be overridden. - - - - - Is the method that is ot be injected - () - to be considered as overloaded? - - -

- If (the default), then argument type matching - will be performed (because one would not want to override the wrong - method). -

-

- Setting the value of this property to can be used - to optimize runtime performance (ever so slightly). -

-
-
- - - Creates a new instance of the - class. - - -

- Methods eligible for lookup override must not have arguments. -

-
- - The name of the method that is to be overridden. - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - If either of the supplied arguments is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - - - An - implementation that simply returns the result of a lookup in an - associated IoC container. - - -

- This class is Spring.NET's implementation of Dependency Lookup via - Method Injection. -

-

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by returning the - result of an object lookup in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the object lookup. - - - - - An - implementation that supports method injection. - - -

- Classes that want to take advantage of method injection must meet some - stringent criteria. Every method that is to be method injected - must be defined as either or - . An - will be thrown if these criteria are not met. -

-
- Rick Evans -
- - - Simple object instantiation strategy for use in - implementations. - - -

- Does not support method injection, although it provides hooks for subclasses - to override to add method injection support, for example by overriding methods. -

-
- Rod Johnson - Rick Evans (.NET) - -
- - - The shared instance for this class (and derived classes). - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type does not have a zero-arg constructor. - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use a no-arg constructor. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be a - or zero length string if we're autowiring an object that - doesn't belong to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - -
- - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use the supplied - and attendant . -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - -
- - - The name of the dynamic assembly that holds dynamically created code - - - - - A cache of generated instances, keyed on - the object name for which the was generated. - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- This method dynamically generates a subclass that supports method - injection for the supplied . It then - instantiates an new instance of said type using the constructor - identified by the supplied , - passing the supplied to said - constructor. It then manually injects (generic) method replacement - and method lookup instances (of - ) into - the new instance: those methods that are 'method-injected' will - then delegate to the approriate - - instance to effect the actual method injection. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The parameter s to use to find the - appropriate constructor to invoke. - - - The aguments that are to be passed to the appropriate constructor - when the object is being instantiated. - - - A new instance of the defined by the - supplied . - -
- - - A factory that generates subclasses of those - classes that have been configured for the Method-Injection form of - Dependency Injection. - - -

- This class is designed as for one-shot usage; i.e. it must - be used to generate exactly one method injected subclass and - then discarded (it maintains state in instance fields). -

-
-
- - - The name of the generated - property (for method replacement). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - The name of the generated - property (for method lookup). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - Creates a new instance of the - class. - - - The in which - the generated is to be defined. - - - The object definition that is the target of the method injection. - - - If either of the supplied arguments is . - - - - - Builds a suitable for Method-Injection. - - - A suitable for Method-Injection. - - - - - Defines overrides for those methods that are configured with an appropriate - . - - - The overarching that is defining - the generated . - - - - - Override the supplied with the logic - encapsulated by the - - defined by the supplied . - - - The builder for the subclass that is being generated. - - - The method on the superclass that is to be overridden. - - - The field defining the - - that the overridden method will delegate to to do the 'actual' - method injection logic. - - - - - Generates the MSIL for actually returning a return value if the - supplied is not - . - - - The definition of the return value; if , it - means that no return value is to required (a void - return type). - - - The to emit - the MSIL to. - - - - - Generates the MSIL for a return value if the supplied - returns a value. - - - The method to be checked. - - - The to emit - the MSIL to. - - - The return value, or if the method does not - return a value (has a void return type). - - - - - Pushes (sets up) the arguments for a call to the - - method of an appropriate - . - - - The parameters to the original method (will be bundled - up into a generic object[] and passed as the third - argument to the - - invocation. - - - The to emit - the MSIL to. - - - - - Simply generates the IL for a write only property for the - . - - - The in which the property is defined. - - - The name of the (to be) generated property. - - - The (instance) field that the property is to 'set'. - - - - - A collection (with set semantics) of method overrides, determining which, if any, - methods on a managed object the Spring.NET IoC container will override at runtime. - - Rod Johnson - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- Deep copy constructoe. -

-
- - The instance supplying initial overrides for this new instance. - -
- - - Copy all given method overrides into this object. - - - The overrides to be copied into this object. - - - - - Adds the supplied to the overrides contained - within this instance. - - - The to be - added. - - - - - Adds the supplied to the overloaded method names - contained within this instance. - - - The overloaded method name to be added. - - - - - Returns true if the supplied is present within - the overloaded method names contained within this instance. - - - The overloaded method name to be checked. - - - True if the supplied is present within - the overloaded method names contained within this instance. - - - - - Return the override for the given method, if any. - - - The method to check for overrides for. - - - the override for the given method, if any. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - The collection of method overrides. - - - - - Returns true if this instance contains no overrides. - - - - - Programmatic means of constructing a using the builder pattern. Intended primarily - for use when implementing custom namespace parsers. - - Set methods are used instead of properties, so that chaining of methods can be used to create - 'one-liner'definitions that set multiple properties at one. - Rod Johnson - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class, private - to force use of factory methods. - - - - - Creates a new used to construct a . - - - - - Creates a new used to construct a . - - the of the object that the definition is being created for - - - - Creates a new used to construct a . - - the name of the of the object that the definition is being created for - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - The type name of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Name of the object type. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a child object definition.. - - The object definition factory. - Name of the parent object. - - - - - Adds the property value under the given name. - - The name. - The value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the specified object name under the property specified. - - The name. - Name of the object. - The current ObjectDefinitionBuilder. - - - - Adds an index constructor arg value. The current index is tracked internally and all addtions are - at the present point - - The constructor arg value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the named object as a constructor argument. - - Name of the object. - - - - - Sets the name of the factory method to use for this definition. - - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the factory object to use for this definition. - - The factory object. - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets whether or not this definition describes a singleton object. - - if set to true [singleton]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects or not this definition is abstract. - - if set to true [flag]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects for this definition should be lazily initialized or not. - - if set to true [lazy]. - The current ObjectDefinitionBuilder. - - - - Sets the autowire mode for this definition. - - The autowire mode. - The current ObjectDefinitionBuilder. - - - - Sets the dependency check mode for this definition. - - The dependency check. - The current ObjectDefinitionBuilder. - - - - Sets the name of the destroy method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the init method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the resource description for this definition. - - The resource description. - The current ObjectDefinitionBuilder. - - - - Adds the specified object name to the list of objects that this definition depends on. - - Name of the object. - The current ObjectDefinitionBuilder. - - - - Gets the current object definition in its raw (unvalidated) form. - - The raw object definition. - - - - Validate and gets the object definition. - - The object definition. - - - - Utility methods that are useful for - - implementations. - - Juergen Hoeller - Rick Evans (.NET) - - - - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Registers the supplied with the - supplied . - - -

- This is a convenience method that registers the - - of the supplied under the - - property value of said . If the - supplied has any - , - then those aliases will also be registered with the supplied - . -

-
- - The object definition holder containing the - that - is to be registered. - - - The registry that the supplied - is to be registered with. - - - If either of the supplied arguments is . - - - If the could not be registered - with the . - -
- - - Generates an object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied . - - The - that requires a generated name. - The - - that the supplied is to be - registered with (needed so that the uniqueness of any generated - name can be guaranteed). - if set to true if the given object - definition will be registed as an inner object or as a top level objener objects - verses top level objects. - - An object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied and - never . - - - If either of the or - arguments is . - - - If a unique name cannot be generated. - - - - - Generates the name of the object for a top-level object definition unique within the given object factory. - - The object definition to generate an object name for. - The registry to check for existing names. - The generated object name - if no unique name can be generated for the given - object definition - - - - Factory method for getting concrete - instances. - - - The name of the event handler method. This may be straight text, a regular - expression, , or empty. - - - The name of the event being wired. This too may be straight text, a regular - expression, , or empty. - - - A concrete - instance. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Thrown when the validation of an object definition failed. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - The detail message. - - - - Creates a new instance of the - - class. - - - The detail message. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Helper class for use in object factory implementations, - resolving values contained in object definition objects - into the actual values applied to the target object instance. - - - Used by . - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The object factory. - - - - Given a property value, return a value, resolving any references to other - objects in the factory if necessary. - - -

- The value could be : - - -

- An , - which leads to the creation of a corresponding new object instance. - Singleton flags and names of such "inner objects" are always ignored: inner objects - are anonymous prototypes. -

- - -

- A , which must - be resolved. -

-
- -

- An . This is a - special placeholder collection that may contain - s or - collections that will need to be resolved. -

-
- -

- An ordinary object or , in which case it's left alone. -

-
- -

-
- - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - -
- - - TODO - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Resolve the target type of the passed . - - The who's target type is to be resolved - The resolved target type, if any. otherwise. - - - - Resolves an inner object definition. - - - The name of the object that surrounds this inner object definition. - - - The name of the inner object definition... note: this is a synthetic - name assigned by the factory (since it makes no sense for inner object - definitions to have names). - - - The name of the property the value of which is being resolved. - - - The definition of the inner object that is to be resolved. - - - if the owner of the property is a singleton. - - - The resolved object as defined by the inner object definition. - - - - - Checks the given bean name whether it is unique. If not already unique, - a counter is added, increasing the counter until the name is unique. - - Original Name of the inner object. - The Adapted name for the inner object - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - The possible object scope values. - - Aleksandar Seovic - - - - - - - - - Application scope. - - - - - Session scope. - - - - - Request scope. - - - - - - - - - - Default scope (currently - ). - - - - - - Object definition reader for a simple properties format. - - - Provides object definition registration methods for - and - instances. Typically applied to a - . - - Rod Johnson - Juergen Hoeller - Simon White (.NET) - - - - Value of a T/F attribute that represents true. - Anything else represents false. Case seNsItive. - - - - - Separator between object name and property name. - - - - - Prefix for the class property of a root object definition. - - - - - Special string added to distinguish if the object will be - a singleton. - - -

- Default is true. -

-
- -

- owner.(singleton)=true -

-
-
- - - Special string added to distinguish if the object will be - lazily initialised. - - -

- Default is false. -

-
- -

- owner.(lazy-init)=true -

-
-
- - - Reserved "property" to indicate the parent of a child object definition. - - - - - Property suffix for references to other objects in the current - : e.g. - owner.dog(ref)=fido. - - -

- Whether this is a reference to a singleton or a prototype - will depend on the definition of the target object. -

-
-
- - - Prefix before values referencing other objects. - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the specified properties file. - - - The resource descriptor for the properties file. - - - The match or filter for object definition names, e.g. 'objects.' - - in case of loading or parsing errors - the number of object definitions found - - - - Register object definitions contained in a - , using all property keys (i.e. - not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Similar syntax as for an . - This method is useful to enable standard .NET internationalization support. -

-
- - The containing object definitions. - - - The match or filter for object definition names, e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions registered. -
- - - Register object definitions contained in an - , using all property keys - (i.e. not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Registers object definitions contained in an - using all property keys ( i.e. not filtering by prefix ) - - The containing - object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Get all property values, given a prefix (which will be stripped) - and add the object they define to the factory with the given name - - The name of the object to define. - - The containing string pairs. - - The prefix of each entry, which will be stripped. - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - - - - Name of default parent object - - - - - Gets or sets object definition factory to use. - - - - - A plain-vanilla object definition. - - -

- This is the most common type of object definition; - instances - do not derive from a parent - , and usually - (but not always - see below) have an - - and (optionally) some - and - . -

-

- Note that - instances do not have to specify an - : - This can be useful for deriving - instances - from such definitions, each with it's own - , - inheriting common property values and other settings from the parent. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - - The of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - Whether to perform a dependency check for objects (not - applicable to autowiring a constructor, thus ignored there) - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - -

- Takes an object class name to avoid eager loading of the object class. -

-
- - The assembly qualified of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - The - to be applied to a new instance of the object. - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. -

-
- - The definition that is to be copied. - -
- - - Validate this object definition. - - - In the case of a validation failure. - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Is always null for a . - - - It is safe to request this property's value. Setting any other value than null will - raise an . - - Raised on any attempt to set a non-null value on this property. - - - - A implementation to use that checks - the object definitions only (no attributes) - - Mark Fisher - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Static factory that permits the registration of existing singleton instances. - - -

- Does not have support for prototype objects, aliases, and post startup object - configuration. -

-

- Serves as a simple example implementation of the - interface, that manages existing object instances as opposed to creating new ones - based on object definitions. -

-

- The - method is not supported by this class; this class deals exclusively with - existing singleton instances, thus the methods mentioned previously make little sense in this context. -

-
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Map from object name to object instance. - - - - - This method is not supported by . - - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - is not currently supported. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - True if an object with the given name is defined. - - - - Is this object a singleton? - - -

- That is, will - or - always return the same object? -

-
- The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Determine the type of the object with the given name. - - -

- More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. -

-
- The name of the object to query. - - The of the object or if - not determinable. - -
- - - Determines whether the object with the given name matches the specified type. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Not supported. - - The name of the object. - - The registered - . - - - Always, as object definitions are not supported by this - implementation. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Will not consider s, - as the type of their created objects is not known before instantiation. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Since this implementation of the - - interface does not support the notion of ptototype objects, the - parameter is ignored. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). Ignored. - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - -
- - - Tests whether this object factory contains an object definition for the - specified object name. - - The object name to query. - - True if an object defintion is contained within this object factory. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Add a new singleton object. - - - The name to be associated with the object name. - - The singleton object. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - This feature is not currently supported. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Defines a method to release allocated unmanaged resources. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - - - - Abstract implementation providing - a number of convenience methods and a - template method - that subclasses must override to provide the actual parsing logic. - - - Use this implementation when you want - to parse some arbitrarily complex XML into one or more - ObjectDefinitions. If you just want to parse some - XML into a single IObjectDefinition, you may wish to consider - the simpler convenience extensions of this class, namely - and - - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Interface used to handle custom, top-level tags. - - Implementations are free to turn the metadata in the custom tag into as - many as required. - - Rob Harrop - Mark Pollack (.NET) - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - -

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

-
- - The element to be parsed. - - - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - - - The primary object definition. - -
- - - Constant for the ID attribute - - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Resolves the ID for the supplied . - - - When using generation, a name is generated automatically. - Otherwise, the ID is extracted from the "id" attribute, potentially with a - fallback to a generated id. - - The element that the object definition has been built from. - The object definition to be registered. - The the object encapsulating the current state of the parsing process; - provides access to a - the resolved id - - if no unique name could be generated for the given object definition - - - - - Registers the supplied with the supplied - . - - Subclasses can override this method to control whether or not the supplied - is actually even registered, or to - register even more objects. - - The default implementation registers the supplied - with the supplied only if the IsNested - parameter is false, because one typically does not want inner objects - to be registered as top level objects. - - - - The object definition to be registered. - The registry that the bean is to be registered with. - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - Gets a value indicating whether an ID should be generated instead of read - from the passed in XmlElement. - - Note that this flag is about always generating an ID; the parser - won't even check for an "id" attribute in this case. - - true if should generate id; otherwise, false. - - - - Gets a value indicating whether an ID should be generated instead if the - passed in XmlElement does not specify an "id" attribute explicitly. - - Disabled by default; subclasses can override this to enable ID generation - as fallback: The parser will first check for an "id" attribute in this case, - only falling back to a generated ID if no value was specified. - - true if should generate id if no value was specified; otherwise, false. - - - - - Convenient base class for when there exists a one-to-one mapping - between attribute names on the element that is to be parsed and - the property names on the Type being configured. - - - - - Mark Pollack - - - - Base Type for those implementations that - need to parse and define just a single IObjectDefinition. - - - Extend this parser Type when you want to create a single object definition - from an arbitrarily complex XML element. You may wish to consider extending - the when you want to create a - single Object definition from a relatively simple custom XML element. - The resulting ObjectDefinition will be automatically registered - with the ObjectDefinitionRegistry. Your job simply is to parse the - custom XML element into a single ObjectDefinition - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - - Determine the name for the parent of the currently parsed object, - in case of the current object being defined as a child object. - The default implementation returns null - indicating a root object definition. - - - the name of the parent object for the currently parsed object. - - - - Gets the type of the object corresponding to the supplied XmlElement. - - Note that, for application classes, it is generally preferable to override - GetObjectTypeName instad, in order to avoid a direct - dependence on the object implementation class. The ObjectDefinitionParser - and its IXmlObjectDefinitionParser (namespace parser) can be used within an - IDE add-in then, even if the application classses are not available in the add-ins - AppDomain. - - The element. - The Type of the class that is being defined via parsing the supplied - Element. - - - - Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. - - The element. - The type name of the object that is being defined via parsing the supplied - XmlElement. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation delegates to the DoParse version without - ParameterContext argument. - The element. - The parser context. - The builder used to define the IObjectDefinition. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation does nothing. - The element. - The builder used to define the IObjectDefinition. - - - - Default implementation of the interface. - Resolves namespace URIs to implementation types based on mappings. - - Erich Eichinger - - - - - - Used by to locate - implementations for a particular namespace URI. - - TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now - Erich Eichinger - - - - - - - Lookup a for the given namespace URI. - - the namespace URI - the located namespace handler or null - - - - Resolve the namespace URI and return the corresponding - implementation. - - the namespace URI to get the matching parser for. - the matching parser or null - - - - XML resource reader. - - -

- Navigates through an XML resource and invokes parsers registered - with the . -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - SPI for parsing an XML document that contains Spring object definitions. - Used by for actually parsing a DOM - document. - - Instantiated per document to parse: Implementations can hold state in - instance variables during the execution of the RegisterObjectDefinitions - method, for example global settings that are defined for all object definitions - in the document. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the DefaultObjectDefinitionDocumentReader class. - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - Parses object definitions starting at the given - using the passed . - - The root element to start parsing from. - The instance to use. - - in case an error happens during parsing and registering object definitions - - - - - Process an alias element. - - - - - Process the object element - - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - - If the resource could not be imported. - - - - - Parses the given alias element, registering the alias with the registry. - - The alias element. - The registry. - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The helper. - - - - - - Allow the XML to be extensible by processing any custom element types last, - after we finished processing the objct definitions. This method is a natural - extension point for any other custom post-processing of the XML. - - The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. - - - The root. - - - - Allow the XML to be extensible by processing any custom element types first, - before we start to process the object definitions. - - This method is a natural - extension point for any other custom pre-processing of the XML. -

The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. -

-
- The root element of the XML document. -
- - - Creates an instance for the given and element. - - the to create the - the root to start reading from - a new instance - - - - Gets the reader context. - - The reader context. - - - - Simple class that holds the defaults specified at the <objects> - level in a standard Spring XML object definition document: - default-lazy-init, default-autowire, etc. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Gets or sets the autowire setting for the document that's currently parsed. - - The autowire. - - - - Gets or sets the dependency-check setting for the document that's currently parsed - - The dependency check. - - - - Gets or sets the lazy-init flag for the document that's currently parsed. - - The lazy init. - - - - Gets or sets the merge setting for the document that's currently parsed. - - The merge. - - - - Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. - - -

- Used by - for actually parsing a DOM document or - fragment. -

-
- Juergen Hoeller - Rick Evans (.NET) - Sandu Turcan (.NET) -
- - - Invoked by after construction but before any - elements have been parsed. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Attribute that should be used to specify the default namespace - and schema location for a custom namespace parser. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Gets or sets the default namespace for the configuration parser. - - - The default namespace for the configuration parser. - - - - - Gets or sets the default schema location for the configuration parser. - - - The default schema location for the configuration parser. - - - If the property is set, the will always resolve to an assembly-resource - and the set will be interpreted relative to this assembly. - - - - - Gets or sets a type from the assembly containing the schema - - - If this property is set, the will always resolve to an assembly-resource - and the will be interpreted relative to this assembly. - - - - - Provides a resolution mechanism for configuration parsers. - - -

- The uses this registry - class to find the parser handling a specific namespace. -

-
- Aleksandar Seovic -
- - - Name of the .Net config section that contains definitions - for custom config parsers. - - - - - Creates a new instance of the NamespaceParserRegistry class. - - - - - Reset the list of registered parsers to "factory"-setting - - use for unit tests only - - - - Registers the type for wellknown namespaces - - true if the parser could be registered, false otherwise - - - - Constructs a "assembly://..." qualified schemaLocation url using the given type - to obtain the assembly name. - - - - - Returns a parser for the given namespace. - - - The namespace for which to lookup the parser implementation. - - - A parser for a given , or - if no parser was found. - - - - - Returns a schema collection containing validation schemas for all registered parsers. - - - A schema collection containing validation schemas for all registered parsers. - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The of the parser that will be activated - when an element in its default namespace is encountered. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The of the parser that will be activated - when the attendant is - encountered. - - - The namespace with which to associate instance of the parser. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If the is not a - that implements the - interface. - - - If is . - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The parser instance. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The namespace with which to associate instance of the parser. - - - The parser instance. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If is , or if - is not specified and parser class - does not have default value defined using . - - - - - Register a schema as well-known - - - - - - - Returns default values for the parser namespace and schema location as - defined by the . - - - A type of the parser. - - - A instance containing - default values for the parser namsepace and schema location - - - - - Resolves xml entities by using the infrastructure. - - - - - Adapts the interface to . - Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 - - - - - Support class for implementing custom namespace parsers. - - Parsing of individual elements is done via a ObjectDefintionParser. - Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser - to handle a specific element. - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Invoked by after construction but before any - elements have been parsed. - - - - - Parses an element under the root node, typically - an object definition or import statement. - - - The element to be parsed. - - - The parser context. - - - The number of object defintions created from this element. - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Register the specified for the given - - - - - Constants defining the structure and values associated with the - Spring.NET XML object definition format. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Value of a boolean attribute that represents - . - - -

- Anything else represents . -

-
-
- - - Signifies that a default value is to be applied. - - - - - Defines an external XML object definition resource. - - - - - Specifies the relative path to an external XML object definition - resource. - - - - - Defines an alias for an object definition. - - - - - Specifies the alias of an object definition. - - - - - Specifies the default lazy initialization mode. - - - - - Specifies the default dependency checking mode. - - - - - Specifies the default autowire mode. - - - - - Specifies the default collection merge mode. - - - - - Defines a single named object. - - - - - Element containing informative text describing the purpose of the - enclosing element. - - -

- Always optional. -

-

- Used primarily for user documentation of XML object definition - documents. -

-
-
- - - Specifies a . - - -

- Does not have to be fully assembly qualified, but it is recommended - that the names of one's objects are - specified explicitly. -

-
-
- - - The name or alias of the parent object definition that a child - object definition inherits from. - - - - - Objects can be identified by an id, to enable reference checking. - - -

- There are constraints on a valid XML id: if you want to reference - your object in .NET code using a name that's illegal as an XML id, - use the optional "name" attribute - (). - If neither given, the objects name is - used as id. -

-
-
- - - Can be used to create one or more aliases illegal in an id. - - -

- Multiple aliases can be separated by any number of spaces, - semicolons, or commas - (). -

-

- Always optional. -

-
-
- - - Is this object a "singleton" (one shared instance, which will - be returned by all calls to - with the id), or a - "prototype" (independent instance resulting from each call to - ). - - -

- Singletons are most commonly used, and are ideal for multi-threaded - service objects. -

-
- -
- - - Controls object scope. Only applicable to ASP.NET web applications. - - -

- Scope can be defined as either application, session or request. It - defines when "singleton" instances are initialized, but has no - effect on prototype definitions. -

-
-
- - - The names of the objects that this object depends on being - initialized. - - -

- The object factory will guarantee that these objects - get initialized before this object definition. -

- - Dependencies are normally expressed through object properties or - constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Optional attribute for the name of the custom initialization method - to invoke after setting object properties. - - -

- The method must have no arguments. -

-
-
- - - Optional attribute for the name of the custom destroy method to - invoke on object factory shutdown. - - -

- Valid destroy methods have either of the following signatures... - - void MethodName() - void MethodName(bool force) - -

- - Only invoked on singleton objects! - -
-
- - - A constructor argument : the constructor-arg tag can have an - optional type attribute, to specify the exact type of the - constructor argument - - -

- Only needed to avoid ambiguities, e.g. in case of 2 single - argument constructors that can both be converted from a - . -

-
-
- - - The constructor-arg tag can have an optional index attribute, - to specify the exact index in the constructor argument list. - - -

- Only needed to avoid ambiguities, e.g. in case of 2 arguments of - the same type. -

-
-
- - - The constructor-arg tag can have an optional named parameter - attribute, to specify a named parameter in the constructor - argument list. - - - - - Is this object "abstract", i.e. not meant to be instantiated itself - but rather just serving as parent for concrete child object - definitions? - - -

- Default is . Specify - to tell the object factory to not try to instantiate that - particular object in any case. -

-
-
- - - A property definition : object definitions can have zero or more - properties. - - -

- Spring.NET supports primitives, references to other objects in the - same or related factories, lists, dictionaries, and name value - collections. -

-
-
- - - A reference to another managed object or static - . - - - - - ID refs must specify a name of the target object. - - - - - A reference to the name of another managed object in the same - context. - - - - - A reference to the name of another managed object in the same - context. - - -

- Local references, using the "local" attribute, have to use object - ids; they can be checked by a parser, thus should be preferred for - references within the same object factory XML file. -

-
-
- - - Alternative to type attribute for factory-method usage. - - -

- If this is specified, no type attribute should be used. This should - be set to the name of an object in the current or ancestor - factories that contains the relevant factory method. This allows - the factory itself to be configured using Dependency Injection, and - an instance (rather than static) method to be used. -

-
-
- - - Optional attribute specifying the name of a factory method to use - to create this object. - - -

- Use constructor-arg elements to specify arguments to the factory - method, if it takes arguments. Autowiring does not apply to - factory methods. -

-

- If the "type" attribute is present, the factory method will be a - static method on the type specified by the "type" attribute on - this object definition. Often this will be the same type as that - of the constructed object - for example, when the factory method - is used as an alternative to a constructor. However, it may be on - a different type. In that case, the created object will *not* be - of the type specified in the "type" attribute. This is analogous - to behaviour. -

-

- If the "factory-object" attribute is present, the "type" attribute - is not used, and the factory method will be an instance method on - the object returned from a - - call with the specified object name. The factory object may be - defined as a singleton or a prototype. -

-

- The factory method can have any number of arguments. Use indexed - constructor-arg elements in conjunction with the factory-method - attribute. -

-

- Setter Injection can be used in conjunction with a factory method. - Method Injection cannot, as the factory method returns an instance, - which will be used when the container creates the object. -

-
-
- - - A list can contain multiple inner object, ref, collection, or - value elements. - - -

- Lists are untyped, pending generics support, although references - will be strongly typed. -

-

- A list can also map to an array type. The necessary conversion is - automatically performed by the - . -

-
-
- - - A set can contain multiple inner object, ref, collection, or value - elements. - - -

- Sets are untyped, pending generics support, although references - will be strongly typed. -

-
-
- - - A Spring.NET map is a mapping from a string key to object (a .NET - ). - - -

- Dictionaries may be empty. -

-
-
- - - A lookup key (for a dictionary or name / value collection). - - - - - A lookup key (for a dictionary or name / value collection). - - - - - Contains a string representation of a value. - - -

- This is used by name-value, ctor argument, and property elements. -

-
-
- - - Contains delimiters that should be used to split delimited string values. - - -

- This is used by name-value element. -

-
-
- - - A reference to another objects. - - -

- Used as a convenience shortcut on property and constructor-arg - elements to refer to other objects. -

-
-
- - - Contains a string representation of an expression. - - -

- This is used by ctor argument and property elements. -

-
-
- - - A map entry can be an inner object, ref, collection, or value. - - -

- The name of the property is given by the "key" attribute. -

-
-
- - - Contains a string representation of a property value. - - -

- The property may be a string, or may be converted to the - required using the - - machinery. This makes it possible for application developers to - write custom - implementations that can convert strings to objects. -

- - This is recommended for simple objects only. Configure more complex - objects by setting properties to references to other objects. - -
-
- - - Contains a string representation of an expression. - - - - - Denotes value. - - -

- Necessary because an empty "value" tag will resolve to an empty - , which will not be resolved to - value unless a special - does so. -

-
-
- - - 'name-values' elements differ from dictionary elements in that - values must be strings. - - -

- May be empty. -

-
-
- - - Element content is the string value of the property. - - -

- The "key" attribute is the name of the property. -

-
-
- - - The lazy initialization mode for an individual object definition. - - - - - The dependency checking mode for an individual object definition. - - - - - Defines a subscription to one or more events published by one or - more event sources. - - - - - The name of an event handling method. - - -

- Defaults to On${event}. - Note : this default will probably change before the first 1.0 - release. -

-
-
- - - The name of an event. - - - - - The autowiring mode for an individual object definition. - - - - - Shortcut alternative to specifying a key element in a - dictionary entry element with <ref object="..."/>. - - - - - Shortcut alternative to specifying a value element in a - dictionary entry element with <ref object="..."/>. - - - - - Specify if the collection values should be merged with the parent. - - - - - The string of characters that delimit object names. - - - - - A lookup method causes the IoC container to override a given method and return - the object with the name given in the attendant object attribute. - - -

- This is a form of Method Injection. -

-

- It's particularly useful as an alternative to implementing the - interface, - in order to be able to make - - calls for non-singleton instances at runtime. In this case, Method Injection - is a less invasive alternative. -

-
-
- - - The name of a lookup method. This method must take no arguments. - - - - - The name of the object in the IoC container that the lookup method - must resolve to. - - -

- Often this object will be a prototype, in which case the lookup method - will return a distinct instance on every invocation. This is useful - for single-threaded objects. -

-
-
- - - A replaced method causes the IoC container to override a given method - with an (arbitrary) implementation at runtime. - - -

- This (again) is a form of Method Injection. -

-
-
- - - Name of the method whose implementation should be replaced by the - IoC container. - - -

- If this method is not overloaded, there's no need to use arg-type - subelements. -

-

- If this method is overloaded, arg-type subelements must be - used for all override definitions for the method. -

-
-
- - - The object name of an implementation of the - interface. - - -

- This may be a singleton or prototype. If it's a prototype, a new - instance will be used for each method replacement. Singleton usage - is the norm. -

-
-
- - - Subelement of replaced-method identifying an argument for a - replaced method in the event of method overloading. - - - - - - Specification of the of an overloaded method - argument as a . - - -

- For convenience, this may be a substring of the FQN. E.g. all the following would match - : -

-

- - - System.String - - - string - - - str - - -

-
- -
- - - Check everything. - - - - - Just check primitive (string, int, etc) values. - - - - - Check object references. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Creates a new instance of the - - class. - - -

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

-
-
- - - Stateful class used to parse XML object definitions. - - Not all parsing code has been refactored into this class. See - BeanDefinitionParserDelegate in Java for how this class should evolve. - Rob Harrop - Juergen Hoeller - Rod Johnson - Mark Pollack (.NET) - - - - The shared instance for this class (and derived classes). - - - - - Initializes a new instance of the class. - - The reader context. - - - - Initializes a new instance of the class. - - The reader context. - The root element of the definition document to parse - - - - Initialize the default lazy-init, dependency check, and autowire settings. - - The root element - - - - Determines whether the Spring object namespace is equal to the the specified namespace URI. - - The namespace URI. - - true if is the default Spring namespace; otherwise, false. - - - - - Decorates the object definition if required. - - The element. - The holder. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The containing object definition if is a nested element. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Create an instance from the given and . - - - This method may be used as a last resort to post-process an object definition before it gets added to the registry. - - - - - Allows deriving classes to post process the name and aliases for the current element. By default - does nothing and returns the unmodified . - - - The list passed in may be modified by an implementation of this method to reflect special needs. - - the object name obtained by the default algorithm from 'id' and 'name' attributes so far. - the object aliases obtained by the default algorithm from 'name' attribute so far. - the currently processed element. - the containing object definition, may be null - the new object name to be used. - - - - Validate that the specified object name and aliases have not been used already. - - - - - Parses an element in a custom namespace. - - - the parsed object definition or null if not supported by the corresponding parser. - - - - Parses an element in a custom namespace. - - - if a nested element, the containing object definition - the parsed object definition or null if not supported by the corresponding parser. - - - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Determines whether the string represents a 'true' boolean value. - - The value. - - true if is 'true' string value; otherwise, false. - - - - - Convenience method to create a builder for a root object definition. - - Name of the object type. - A builder for a root object definition. - - - - Convenience method to create a builder for a root object definition. - - Type of the object. - a builder for a root object definition - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Report a parser error. - - - - - Gets the defaults definition object, or null if the - default have not yet been initialized. - - The defaults. - - - - Gets the reader context. - - The reader context. - - - - Creates an instance - populated with the object definitions supplied in the configuration - section. - - -

- Applications will typically want to use an - , and instantiate it - via the use of the - class (which is similar in functionality to this class). This class is - provided for those times when only an - is required. -

- Creates an instance of the class XmlObjectFactory -
- -

- -

-
- Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a - instance populated with the object definitions supplied in the - configuration section. - - - The configuration settings in a corresponding parent configuration - section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - A instance - populated with the object definitions supplied in the configuration - section. - - - - - Default implementation of the - interface. - - -

- Parses object definitions according to the standard Spring.NET schema. -

-

- This schema is typically located at - http://www.springframework.net/xsd/spring-objects.xsd. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The namespace URI for the standard Spring.NET object definition schema. - - - - - The shared instance for this class (and derived classes). - - - - - Invoked by after construction but before any - elements have been parsed. - - This is a NoOp - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe 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. -

-
-
- - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - The parser context. - - If the resource could not be imported. - - - - Parses an event listener definition. - - The name associated with the object that the event handler is being defined on. - - The events being populated. - - The element containing the event listener definition. - - - The namespace-aware parser. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The parser context. - if set to true if we are processing an inner - object definition. - - The object (definition) wrapped within an - - instance. - - -

- Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. -

-

- If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. -

-
-
- - - Calculates an id for an object definition. - - -

- Called when an object definition has not been explicitly defined - with an id. -

-
- - The element containing the object definition. - - - The list of names defined for the object; may be - or even empty. - - - A calculated object definition id. - -
- - - Parse a standard object definition. - - The element containing the object definition. - The id of the object definition. - parsing state holder - The object (definition). - - - - Parse method override argument subelements of the given object element. - - - - - Parse element and add parsed element to - - - - - Parse element and add parsed element to - - - - - Parse constructor argument subelements of the given object element. - - - - - Parse event handler subelements of the given object element. - - - - - Parse property value subelements of the given object element. - - - The name of the object (definition) associated with the property element (s) - - - The element containing the top level object definition. - - - The namespace-aware parser. - - - The property (s) associated with the object (definition). - - - - - Parse a constructor-arg element. - - - The name of the object (definition) associated with the ctor arg. - - - The list of constructor args associated with the object (definition). - - - The name of the element containing the ctor arg definition. - - - The namespace-aware parser. - - - - - Parse a property element. - - - The name of the object (definition) associated with the property. - - - The list of properties associated with the object (definition). - - - The name of the element containing the property definition. - - - The namespace-aware parser. - - - - - Get the value of a property element (may be a list). - -

- Please note that even though this method is named GetPropertyValue, - it is called by both the property and constructor argument element - handlers. -

-
- The property element. - - The name of the object associated with the property. - - - The namespace-aware parser. - -
- - - Parse a value, ref or collection subelement of a property element. - - - Subelement of property element; we don't know which yet. - - - The name of the object (definition) associated with the top level property. - - - The namespace-aware parser. - - - - - Gets a list definition. - - - The element describing the list definition. - - - The name of the object (definition) associated with the list definition. - - - The namespace-aware parser. - - The list definition. - - - - Gets a set definition. - - - The element describing the set definition. - - - The name of the object (definition) associated with the set definition. - - - The namespace-aware parser. - - The set definition. - - - - Gets a dictionary definition. - - The element describing the dictionary definition. - The name of the object (definition) associated with the dictionary definition. - The namespace-aware parser. - The dictionary definition. - - - - Selects sub-elements with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child nodes to look for. - - - The child s of the supplied - with the supplied - . - -
- - - Selects a single sub-element with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child node to look for. - - - The first child of the supplied - with the supplied - . - -
- - - Gets a name value collection mapping definition. - - - The element describing the name value collection mapping definition. - - - The name of the object (definition) associated with the - name value collection mapping definition. - - the context carrying parsing state information - The name value collection definition. - - - - Returns the text of the supplied , - or the empty string value if said is empty. - - -

- If the supplied is , - then the empty string value will be returned. -

-
-
- - - Strips the dependency check value out of the supplied string. - - -

- If the supplied is an invalid dependency - checking mode, the invalid value will be logged and this method will - return the value. - No exception will be raised. -

-
- - The string containing the dependency check value. - - The dependency check value. - -
- - - Strips the autowiring mode out of the supplied string. - - -

- If the supplied is an invalid autowiring mode, - the invalid value will be logged and this method will return the - value. No exception will be raised. -

-
- - The string containing the autowiring mode definition. - - The autowiring mode. - -
- - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Context that gets passed along an object definition parsing process, encapsulating - all relevant configuraiton as well as state. - - - - - Initializes a new instance of the class. - - The parser helper. - - - - Initializes a new instance of the class. - - The parser helper. - The containing object definition. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - The containing object definition. - - - - Gets the reader context. - - The reader context. - - - - Gets the registry. - - The registry. - - - - Gets the parser helper. - - The parser helper. - - - - Gets the containing object definition. - - The containing object definition. - - - - Gets a value indicating whether this instance is nested. - - true if this instance is nested; otherwise, false. - - - - Gets a value indicating whether this instance is default lazy init. - - - true if this instance is default lazy init; otherwise, false. - - - - - Represents the replacement of a method on a managed object by the IoC - container. - - -

- Note that this mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The name of the method that is to be overridden. - - - The object name of the - instance in the surrounding IoC container. - - - If either of the supplied arguments is or - contains only whitespace character(s). - - - - - Add a fragment of a instance's - such as 'Exception or System.Excep to identify an argument - for a dependency injected method. - - - A (sub) string of a instance's . - - - If the supplied is or - contains only whitespace character(s). - - - - - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The object name of the - instance in the surrounding IoC container. - - - - - Object definition reader for Spring's default XML object definition format. - - -

- Typically applied to a - instance. -

-

- This class registers each object definition with the given object factory superclass, - and relies on the latter's implementation of the - interface. -

-

- It supports singletons, prototypes, and references to either of these kinds of object. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - the to use for creating new s - - - - Load object definitions from the supplied XML . - - - The XML resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Actually load object definitions from the specified XML file. - - The input stream to read from. - The resource for the XML data. - - - - - Validation callback for a validating XML reader. - - The source of the event. - Any data pertinent to the event. - - - - Register the object definitions contained in the given DOM document. - - The DOM document. - - The original resource from where the - was read. - - - The number of object definitions that were registered. - - - In case of parsing errors. - - - - - Creates the to use for actually - reading object definitions from an XML document. - - Default implementation instantiates the specified - or if no reader type is specified. - - - - - Creates the to be passed along - during the object definition reading process. - - The underlying that is currently processed. - A new - - - - Create a instance for handling custom namespaces. - - - TODO (EE): make protected virtual, see remarks on - - - - - The to be used for parsing. - - - - - Sets the IObjectDefinitionDocumentReader implementation to use, responsible for - the actual reading of the XML object definition document.stype of the document reader. - - The type of the document reader. - - - - Specify a to use. If none is specified a default - instance will be created by - - - - - Specify a for creating instances of . - - - - - For retrying the parse process - - - - - Convenience extension of - - that reads object definitions from an XML document or element. - - -

- Delegates to - - underneath; effectively equivalent to using a - for a - . -

- - objects doesn't need to be the root element of - the XML document: this class will parse all object definition elements in the - XML stream. - -

- This class registers each object definition with the - - superclass, and relies on the latter's implementation of the - interface. It supports - singletons, prototypes and references to either of these kinds of object. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Gets object definition reader to use. - - - - - Extension of specific to use with an XmlObjectDefinitionReader. - Provides access to configured in - - - - - The maximum length of any XML fragment displayed in the error message - reporting. - - -

- Hopefully this will display enough context so that a user - can pinpoint the cause of the error. -

-
-
- - - Initializes a new instance of the class. - - The resource. - The reader. - - - - Initializes a new instance of the class. - - The resource. - The reader. - The factory to use for creating new instances. - - - - Generates the name of the object. - - The object definition. - the generated object name - - - - Registers the name of the with generated. - - The object definition. - the generated object name - - - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - - -
- - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the error. - - - The root cause of the parse error (if any - may be ). - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - -
- - - This method can be overwritten in order to implement validators - capable of displaying a full list of errors found in the definition. - - - The node that triggered the parse error. - - - A message about the exception. - - - - - Gets the reader. - - The reader. - - - - Gets the resource loader. - - The resource loader. - - - - Gets the registry. - - The registry. - - - - Gets or sets the object definition factory. - - The object definition factory. - - - - Get the instance to lookup parsers for custom namespaces. - - - - - Exception thrown if an - is not fully - initialized, for example if it is involved in a circular reference. - - -

- This is usually indicated by any of the variants of the - - method returning . -

-

- A circular reference with an - cannot be solved by eagerly caching singleton instances (as is the - case with normal objects. The reason is that every - needs to be fully - initialized before it can return the created object, while only specific - normal objects need to be initialized - that is, if a collaborating object - actually invokes them on initialization instead of just storing the reference. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Thrown when an - encounters an error when attempting to create an object from an object - definition. - - Juergen Hoeller - Rick Evans (.NET) - - - - 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 name of the object that triggered 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. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Describes the creation failure trace of this exception. - - - - - Creates a new instance of the - FactoryObjectNotInitializedException class. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - FactoryObjectCircularReferenceException class. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectCircularReferenceException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - is asked for an object instance name for which it cannot find a definition. - - Rod Johnson - Rick Evans (.NET) - - - - 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. - - - Name of the missing object. - - - A further, detailed message describing the problem. - - - - - Initializes a new instance of the class. - - The required type of the object. - A description of the originating dependency. - A message describing the problem. - - - - Creates a new instance of the - class. - - - The of the missing object. - - - A further, detailed message describing the problem. - - - - - 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. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Return the required of object, if it was a - lookup by that failed. - - - - - Return the name of the missing object, if it was a lookup by name that - failed. - - - - - Thrown in case of a reference to an object that is currently in creation. - - -

- Typically happens when constructor autowiring matches the currently - constructed object. -

-
- Juergen Hoeller - Rick Evans -
- - - The default error message text to be used, if none is specified. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectCurrentlyInCreationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - encounters an error when attempting to parse an object - definition. - - Federico Spinazzi (.NET) - - - - Creates a new instance of the ObjectDefinitionException class. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The value of the xml class attribute thet can be resolved - as a type - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The message about the exception. - - - - - Convenience methods operating on object factories, returning object instances, - names, or counts. - - -

- The nesting hierarchy of an object factory is taken into account by the various methods - exposed by this class. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Used to dereference an - and distinguish it from managed objects created by the factory. - - -

- For example, if the managed object identified as foo is a - factory, getting &foo will return the factory, not the - instance returned by the factory. -

-
-
- - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Creates a new instance of the - class. - - -

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

-
-
- - - Count all object definitions in any hierarchy in which this - factory participates. - - -

- Includes counts of ancestor object factories. -

-

- Objects that are "overridden" (specified in a descendant factory - with the same name) are counted only once. -

-
- The object factory. - - The count of objects including those defined in ancestor factories. - -
- - - Return all object names in the factory, including ancestor factories. - - The object factory. - The array of object names, or an empty array if none. - - - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s - if is set to true, - which means that s will get initialized. -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - The array of object names, or an empty array if none. - -
- - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - The array of object names, or an empty array if none. - -
- - - Return all objects of the given type or subtypes, also picking up objects - defined in ancestor object factories if the current object factory is an - . - - -

- The return list will only contain objects of this type. - Useful convenience method when we don't care about object names. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the objects could not be created. - - - The of object instances, or an - empty if none. - -
- - - Return a single object of the given type or subtypes, also picking up objects defined - in ancestor object factories if the current object factory is an - . - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If more than one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. - This version of ObjectOfType automatically includes prototypes and - instances. -

-
- The object factory. - The of object to match. - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return the object name, stripping out the factory dereference prefix if necessary. - - The name of the object. - The object name sans any factory dereference prefix. - - - - Given an (object) name, builds a corresponding factory object name such that - the return value can be used as a lookup name for a factory object. - - - The name to be used to build the resulting factory object name. - - - The transformed into its factory object name - equivalent. - - - - - - - Is the supplied a factory dereference? - - -

- That is, does the supplied begin with - the - ? -

-
- The name to check. - - if the supplied is a - factory dereference; if not, or the - aupplied is or - consists solely of the - - value. - - -
- - - Exception that an object implementation is suggested to throw if its own - factory-aware initialization code fails. - thrown by object factory methods - themselves should simply be propagated as-is. - - -

- Note that non-factory-aware initialization methods like AfterPropertiesSet () - or a custom "init-method" can throw any exception. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectInitializationException class. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectInitializationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to an attempt to lookup a factory object, and - the object identified by the lookup key is not a factory. - - -

- An object is a factory if it implements (either directly or indirectly - via inheritance) the - interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Thrown when an object doesn't match the required . - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - Name of the object requested. - - - The required of the actual object - instance that was retrieved. - - - The instance actually returned, whose class did not match the - expected . - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The actual of the actual object - instance that was retrieved. - - - - - The required of the actual object - instance that was retrieved. - - - - - The instance actually returned, whose class did not match the - expected . - - - - - The name of the object requested. - - - - - 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 name of the object that was being retrieved from the factory. - - - The object instance that was retrieved. - - - - - 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. - - - - - Exception thrown when an object depends on other objects or simple properties - that were not specified in the object factory definition, although dependency - checking was enabled. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The constructor argument index at which the dependency is - unsatisfied. - - - The of the constructor argument at - which the dependency is unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The name identifying the property on which the dependency is - unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Base class implementation for classes that describe an event handler. - - Rick Evans - - - - Describes an event handler. - - Rick Evans - - - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - The source of the event. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Returns a stringified representation of this object. - - A stringified representation of this object. - - - - The source of the event (may be unresolved, as in the case - of a - value). - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Convenience base class for implementations. - - - - - Abstracts the state sharing strategy used - by - - Erich Eichinger - - - - Indicate, whether the given instance can be served by this factory - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state can - be served for the given instance or not. - - - - - Returns the shared state for the given instance. - - the instance to obtain shared state for. - the name of this instance - a dictionary containing shared state for or null. - - - - Gets a dictionary acc. to the type of . - If no dictionary is found, create it according to - - the instance to obtain shared state for - the name of the instance. - - A dictionary containing the 's state, - or null if no state can be served by this provider. - - - - - Creates a dictionary to hold the shared state identified by . - - a key to create the dictionary for. - a dictionary according to and . - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Create the key used for obtaining the state dictionary for . - - the instance to create the key for - the name of the instance. - - the key identifying the state dictionary to be used for - or null, if this state manager doesn't serve the given instance. - - - - Implementations may choose to return null from this method to indicate, - that they won't serve state for the given instance. - - - Note:Keys returned by this method are always treated case-sensitive! - - - - - - Create shared state dictionaries case-sensitive or case-insensitive? - - - - - A number indicating the priority of this ( for more). - - - - - Base class for all - implemenations that actually perform event wiring. - - Rick Evans - - - - Creates a new instance of the - class. - - -

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

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

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

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Resolves the method metadata that describes the method that is to be used - as the argument to a delegate constructor. - - - The exposing the method. - - - The of the delegate (e.g. System.EventHandler). - - - The custom binding flags to use when searching for the method. - - The method metadata. - - If the method could not be found. - - - - - Describes an implementation - that autowires events to handler methods. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Wires up the specified handler to the named event on the supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a , - etc). - - - - - The name of the method that is going to handle the event. - - - - - Performs the matching up of handler methods to one or more source events. - - -

- This class merely marshals the matching of handler methods to the events exposed - by an event source, and then delegates to a concrete - implementation (such as - or - ) to do the heavy lifting of - actually wiring a handler method to an event. -

-

- Note : the order in which handler's are wired up to events is non-deterministic. -

-
-
- - - Creates a new instance of the - class. - - - The object exposing the event (s) being wired up. - - - The name of the event that is being wired up. - - - The object exposing the method (s) being wired to the event. - - - The name of the method that is going to handle the event. - - - - - Wires up events on the source to methods exposed on the handler. - - - - - Wires up the supplied event to any handler methods that match the event - signature. - - The event being wired up. - - - - Only replaces the first occurrence of the placeholder. - - The event whose name is going to be used. - - The method name customised for the name of the supplied event. - - - - - The object exposing the event (s) being wired up. - - - - - The object exposing the method (s) being wired to an event source. - - - - - The of the object that is handling any events. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Serves shared state on a by-type basis. - - - - - Creates a new instance matching all types by default. - - - - - Creates a new instance matching only specified list of types. - - the list of types to serve. - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Returns the for the given . - - the instance to obtain the key for. - the name of the instance (ignored by this provider) - instance.GetType() if it matches the list. Null otherwise. - - This method will only be called if returned true previously. - - - - - Limit object types to be served by this state manager. - - - Only objects assignable to one of the types in this list - will be served state by this manager. - - - - - Describes an event handler for an object instance. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Definition for sorting object instances by a property. - - Juergen Hoeller - Simon White (.NET) - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Mutable implementation of the - interface that - supports toggling the ascending value on setting the same property again. - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using - the specified . - - - The to use - as a source for initial property values. - - - - - Creates a new instance of the - class. - - - The name of the property to sort by. - - - Whether upper and lower case in string values should be ignored. - - - Whether or not the sorting should be ascending or descending. - - - - - Creates a new instance of the - class. - - - Whether or not the - - property should be toggled if the same name is set on the - - property. - - - - - Overrides the default method - - - The object to test against this instance for equality. - - - True if the supplied is equal to this instance. - - - - - Overrides the default method. - - The hashcode for this instance. - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Performs a comparison of two objects, using the specified object property via - an . - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - The to use for any - sorting. - - - If the supplied is . - - - - - Compares two objects and returns a value indicating whether one is less - than, equal to or greater than the other. - - The first object to compare. - The second object to compare. - - - - - Get the 's property - value for the given object. - - The object to get the property value for. - The property value. - - - - Sort the given according to the - given sort definition. - - - The to be sorted. - - The parameters to sort by. - - In the case of a missing property name. - - - If the supplied is . - - - - - Gets the to - use for any sorting. - - - The to use for - any sorting. - - - - - Describes an event handler for a static class method. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - The central interface of Spring.NET's low-level object infrastructure. - - -

- Typically not directly used by application code but rather implicitly - via an . -

-

- Implementing classes have the ability to get and set property values - (individually or in bulk), get property descriptors and query the - readability and writability of properties. -

-

- This interface supports nested properties enabling the setting - of properties on subproperties to an unlimited depth. -

-

- If a property update causes an exception, a - will be thrown. Bulk - updates continue after exceptions are encountered, throwing an exception - wrapping all exceptions encountered during the update. -

-

- implementations can be used - repeatedly, with their "target" or wrapped object changed. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - Get the value of a property. - - The name of the property to get the value of. May be nested. - - The value of the property. - - if the property isn't readable, or if the getting the value throws - an exception. - - - - - Get the for a particular - property. - - - The property to be retrieved. - - - The for the particular - property. - - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Get all of the instances for - all of the properties of the wrapped object. - - - An array of instances. - - - - - Set a property value. - - -

- This is the preferred way to update an individual property. -

-
- The new property value. -
- - - Set a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new property value. -
- - Set a number of property values in bulk. - -

- This is the preferred way to perform a bulk update. -

-

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

- Does not allow the setting of unknown fields. Equivalent to - - with an argument of false for the second parameter. -

-
- - The collection of instances to - set on the wrapped object. - -
- - - Set a number of property values in bulk with full control over behavior. - - -

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

Does not allow the setting of unknown fields. -

-
- - The to set on the target object - - - Should we ignore unknown values (not found in the object!?) - -
- - - The object wrapped by the wrapper (cannot be ). - - -

- Implementations are required to allow the type of the wrapped - object to change. -

-
- The object wrapped by this wrapper. -
- - - Convenience method to return the - of the wrapped object. - - The of the wrapped object. - - - - A collection style container for - instances. - - Rod Johnson - Mark Pollack (.NET) - - - - Return the instance with the - given name. - - The name to search for. - the , or null if a - the with the supplied - did not exist in this collection. - - - - - Is there a instance for this - property name? - - The name to search for. - - True if there is a instance for - the supplied . - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - -

- Subclasses should also override Equals. -

-
- The old property values. - - An containing any changes, or - an empty instance if there were - no changes. - -
- - - Return an array of the objects - held in this object. - - An array of the objects held - in this object. - - - - - This interface should be implemented by classes that want to - have access to the shared state. - - -

- Shared state is very useful if you have data that needs to be shared by all instances - of e.g. the same webform (or other IHttpHandlers). -

-

- For example, Spring.Web.UI.Page class implements this interface, which allows - each page derived from it to cache localizalization resources and parsed data binding - expressions only once and then reuse the cached values, regardless of how many instances - of the page are created. -

-
-
- - - Gets or sets the that should be used - to store shared state for this instance. - - - - - Default implementation of the - interface. - - -

- Allows simple manipulation of properties, and provides constructors to - support deep copy and construction from a number of collection types such as - and - . -

-
- Rod Johnson - Mark Pollack (.NET) - Rick Evans (.NET) -
- - - The list of objects. - - - - - Creates a new instance of the - class. - - -

- The returned instance is initially empty... - s can be added with the various - overloaded , - , - , - and - methods. -

-
- - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. Guarantees - references are independent, although it can't deep copy objects currently - referenced by individual objects. -

-
-
- - - Creates a new instance of the - class. - - - The with property values - keyed by property name, which must be a . - - - - - Overloaded version of Add that takes a property name and a property value. - - - The name of the property. - - - The value of the property. - - - - - Add the supplied object, - replacing any existing one for the respective property. - - - The object to add. - - - - - Merges the value of the supplied 'new' with that of - the current if merging is supported and enabled. - - - The new pv. - The current pv. - The possibly merged PropertyValue - - - - Add all property values from the given - . - - - The map of property values, the keys of which must be - s. - - - - - Add all property values from the given - . - - - The list of s to be added. - - - - - Remove the given , if contained. - - - The to remove. - - - - - Removes the named , if contained. - - - The name of the property. - - - - - Modify a object held in this object. Indexed from 0. - - - - - Return the property value given the name. - - - The property name is checked in a case-insensitive fashion. - - - The name of the property. - - - The property value. - - - - - Does the container of properties contain one of this name. - - The name of the property to search for. - - True if the property is contained in this collection, false otherwise. - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - Another property values collection. - - The collection of property values that are different than the supplied one. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - Convert the object to a string representation. - - - A string representation of the object. - - - - - Property to retrieve the array of property values. - - - - - Default implementation of the - interface that should be sufficient for all normal uses. - - -

- will convert - and array - values to the corresponding target arrays, if necessary. Custom - s that deal with - s or arrays can be written against a - comma delimited as - arrays are converted in such a format if the array itself is not assignable. -

-
- Rod Johnson - Juergen Hoeller - Jean-Pierre Pawlak - Mark Pollack (.NET) - Aleksandar Seovic(.NET) -
- - The wrapped object. - - - - The ILog instance for this class. We'll create a lot of these objects, - so we don't want a new instance every time. - - - - - Creates a new instance of the class. - - -

- The wrapped target instance will need to be set afterwards. -

-
- -
- - - Creates a new instance of the class. - - - The object wrapped by this . - - - If the supplied is . - - - - - Creates a new instance of the class, - instantiating a new instance of the specified and using - it as the . - - -

- Please note that the passed as the - argument must have a no-argument constructor. - If it does not, an exception will be thrown when this class attempts - to instantiate the supplied using it's - (non-existent) constructor. -

-
- - The to instantiate and wrap. - - - If the is , or if the - invocation of the s default (no-arg) constructor - fails (due to invalid arguments, insufficient permissions, etc). - -
- - Gets the value of a property. - - The name of the property to get the value of. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - Gets the value of a property. - - The property expression that should be used to retrieve the property value. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - - Sets a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new value. -
- - - Sets a property value. - - - The property expression that should be used to set the property value. - - The new value. - - - - Sets a property value. - - -

- This is the preferred way to update an individual property. -

-
- - The object containing new property value. - -
- - Set a number of property values in bulk. - -

- Does not allow unknown fields. Equivalent to - - with and for - arguments. -

-
- - The to set on the target - object. - - - If an error is encountered while setting a property. - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Perform a bulk update with full control over behavior. - - -

- This method may throw a reflection-based exception, if there is a critical - failure such as no matching field... less serious exceptions will be accumulated - and thrown as a single . -

-
- - The s to set on the target object. - - - Should we ignore unknown values (not found in the object!?). - - - If an error is encountered while setting a property (only thrown if the - parameter is set to ). - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Returns PropertyInfo for the specified property - - The name of the property to search for. - The for the specified property. - If cannot be determined. - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Returns MemberInfo for the specified property or field - - The name of the property or field to search for. - The or for the specified property or field. - If does not resolve to a property or field. - - - - Get the properties of the wrapped object. - - - An array of s. - - - - - This method is expensive! Only call for diagnostics and debugging reasons, - not in production. - - - A string describing the state of this object. - - - - - Attempts to parse property expression first and falls back to full expression - if that fails. Performance optimization. - - Property expression to parse. - Parsed proeprty expression. - - - - The object wrapped by this . - - - If the object cannot be changed; or an attempt is made to set the - value of this property to . - - - - - Convenience method to return the of the wrapped object. - - -

- Do not use this (convenience) method prior to setting the - property. -

-
- - The of the wrapped object. - - - If the property - is . - -
- - - Return the collection of property descriptors. - - - - - Combined exception, composed of individual binding - s. - - -

- An object of this class is created at the beginning of the binding - process, and errors added to it as necessary. -

-

- The binding process continues when it encounters application-level - s, applying those changes - that can be applied and storing rejected changes in an instance of this class. -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) -
- - - Creates a new instance of the PropertyAccessExceptionsException class. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Create new empty PropertyAccessExceptionsException. - We'll add errors to it as we attempt to bind properties. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The IObjectWrapper wrapping the target object at the root of the exception. - - - - The list of PropertyAccessException objects. - - - - Return the - for the supplied , or - if there isn't one. - - - - - Describe the number of exceptions contained in this container class. - - A description of the instance contents. - - - - Return the that generated - this exception. - - - - - Return the object we're binding to. - - - - - If this returns zero (0), no errors were encountered during binding. - - - - - Return an array of the s - stored in this object. - - -

- Will return the empty array (not ) if there were no errors. -

-
-
- - - Describe the group of exceptions. - - - - - Holds information and value for an individual property. - - -

- Using an object here, rather than just storing all properties in a - map keyed by property name, allows for more flexibility, and the - ability to handle indexed properties in a special way if necessary. -

-

- Note that the value doesn't need to be the final required - : an - implementation must - handle any necessary conversion, as this object doesn't know anything - about the objects it will be applied to. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - - If the supplied is or - contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - Pre-parsed property name. - - If the supplied or - is , or if the name contains only whitespace characters. - - - - - Print a string representation of the property. - - A string representation of the property. - - - - Determines whether the supplied - is equal to the current . - - The other instance. - - if they are equal in content. - - - - - 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 name of the property. - The name of the property. - - - - Parsed property expression. - - - - - Return the value of the property. - - -

- Note that type conversion will not have occurred here. - It is the responsibility of the - implementation to - perform type conversion. -

-
- The (possibly unresolved) value of the property. -
- - - A simple pool implementation - - -

- Based on the implementation found in Concurrent Programming in Java, - 2nd ed., by Doug Lea. -

-
- Doug Lea - Federico Spinazzi - Mark Pollack -
- - - A simple pooling interface for managing and monitoring a pool - of objects. - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - Obtain an instance from the pool. - - -

- By contract, clients must return the borrowed - instance using - or a related method as defined in an implementation or - sub-interface. -

-
- An instance from the pool. - - In case the pool is unusable. - - -
- - - Return an instance to the pool. - - -

- By contract, the object must have been obtained using - - or a related method as defined in an implementation or sub-interface. -

-
- The instance to be returned to the pool. - -
- - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This is an optional operation. AddObject is useful for "pre-loading" a - pool with idle objects. -

-
- - If the implementation does not support the operation. - -
- - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently borrowed from the pool. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently idle in the pool. - - -

- This is an optional operation. -

-

- This may be considered an approximation of the number of objects - that can be borrowed without creating any new instances. -

-
- - If the implementation does not support the operation. - -
- - - Set the factory used to create new instances. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Set of permits - - - - - Creates a new instance of the - class. - - - The factory used to instantiate and manage the lifecycle of pooled objects. - - The initial size of the pool. - - If the supplied is . - - - If the supplied is less than or equal to zero. - - - - - Obtain an instance from the pool. - - - In case the pool is unusable. - - - - - - - Return an instance to the pool. - - The instance to be returned to the pool. - - - - - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Synchronized borrow logic. - - - - - - Synchronized release logic. - - - The object to release to the pool. - - - if the object was not a busy one. - - - - - Instantiates the supplied number of instances and adds - them to the pool. - - - The initial number of objects to build. - - - If the supplied number of is - less than or equal to zero. - - - - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Change the state of the pool to unusable. - - - - - Gets the number of instances currently borrowed from the pool. - - - If the implementation does not support the operation. - - - - - - Gets the number of instances currently idle in the pool. - - - If the implementation does not support the operation. - - - - - - Set the factory used to create new instances. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Defines lifecycle methods for objects that are to be used in an - implementation. - - -

- The following methods summarize the contract between an - and an - an . -

- - - - is called whenever a new instance is needed. - - - - is invoked on every instance before it is returned from - the pool. - - - - is invoked on every instance when it is returned to the pool. - - - - is invoked on every instance when it is being dropped from the - pool (see - - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - 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. - - -

- Invoked on every instance when it is being "dropped" - from the pool (whether due to the return value from a call to the - - method, or for reasons specific to the pool implementation.) -

-
- 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. - - -

- Invoked in an implementation-specific fashion to determine if an - instance is still valid to be returned by the pool. - It will only be invoked on an "activated" instance. -

-
- 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. - - -

- Invoked on every instance before it is returned from the pool. -

-
- The instance to be activated. -
- - - Uninitialize an instance to be returned to the pool. - - -

- Invoked on every instance when it is returned to the pool. -

-
- The instance returned to the pool. -
- - - Base class for all pooling exceptions. - - Federico Spinazzi - - - - 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. - - - - - Base class for method builders that contains common functionalities. - - Bruno Baia - - - - Defines interface that proxy method builders have to implement. - - Aleksandar Seovic - Bruno Baia - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - The type builder to use. - - - - - The implementation to use. - - - - - Indicates whether interfaces should be implemented explicitly. - - - - - 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 . - - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Defines proxy method for the target object. - - The method to proxy. - - The interface definition of the method, if applicable. - - - if the supplied is to be - implemented explicitly; otherwise . - - - The for the proxy method. - - - - - Defines generic method parameters based on proxied method metadata. - - - The to use. - - The method to proxy. - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Calls target method directly. - - The IL generator to use. - The method to invoke. - - - - Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. - - The IL generator to use. - The method to test for - the name of the target to be used in error messages - - - - Calls base method directly. - - The IL generator to use. - The method to proxy. - - - - Replaces a raw reference with a reference to a proxy. - - -

- If the target object returns reference to itself -- 'this' -- - we need to treat it as a special case and return a reference - to a proxy object instead. -

-
- The IL generator to use. - The location of the return value. -
- - - Generates code that throws . - - IL generator to use. - the type of the exception to throw - Error message to use. - - - - Base class for proxy builders that can be used - to create a proxy for any class. - - -

- This class provides a set of template - methods that derived classes can override to provide custom behaviour - appropriate to the type of proxy that is being generated (one of - inheritance or composition-based proxying). -

-
- Aleksandar Seovic - Bruno Baia -
- - - Describes the operations for a generic proxy type builder that can be - used to create a proxy type for any class. - - Aleksandar Seovic - - - - Creates the proxy type. - - The generated proxy class. - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - - - - Gets or sets the list of interfaces proxy should implement. - - - - - Should we proxy target attributes? - - - by default. - Target type attributes, method attributes, method's return type attributes - and method's parameter attributes are copied to the proxy. - - - - - The list of custom s that the proxy - class must be decorated with. - - -

- Note that the list is composed of instances of the actual - s that are to be applied, not the - s of the s. -

-
- -

- The following code snippets show examples of how to decorate the - the proxied class with one or more s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary typeAtts = new Hashtable(); - builder.TypeAttributes = typeAtts; - - // applies a single Attribute to the proxied class... - typeAtts = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to the proxied class... - typeAtts = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - The custom s that the proxy - members must be decorated with. - - -

- This dictionary must use simple s for keys - (denoting the member names that the attributes are to be applied to), - with the corresponding values being - s. -

-

- The key may be wildcarded using the '*' character... if so, - then those proxy members that match against the key will be - decorated with the attendant list of - s. This naturally implies that using - the '*' character as a key will result in the attendant list - of s being applied to every member of - the proxied class. -

-
- -

- The following code snippets show examples of how to decorate the - members of a proxied class with one or more - s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary memAtts = new Hashtable(); - builder.MemberAttributes = memAtts; - - // applies a single Attribute to all members of the proxied class... - memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to all members of the proxied class... - memAtts ["*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - - // applies a single Attribute to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - Describes the operations that generates IL instructions - used to build the proxy type. - - Bruno Baia - - - - Generates the IL instructions that pushes - the proxy 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. - - - - The shared instance for this class (and derived classes). - - - - - Creates the proxy type. - - The generated proxy class. - - - - Generates the IL instructions that pushes - the proxy 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. - - - - Creates an appropriate type builder. - - The name to use for the proxy type name. - The type to extends if provided. - The type builder to use. - - - - Applies attributes to the proxy class. - - The type builder to use. - The proxied class. - - - - - - Applies attributes to the proxied method. - - The method builder to use. - The proxied method. - - - - - - Applies attributes to the proxied method's return type. - - The method builder to use. - The proxied method. - - - - - Applies attributes to proxied method's parameters. - - The method builder to use. - The proxied method. - - - - - Calculates and returns the list of attributes that apply to the - specified type. - - The type to find attributes for. - - A list of custom attributes that should be applied to type. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method. - - The method to find attributes for. - - A list of custom attributes that should be applied to method. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method's return type. - - The method to find attributes for. - - A list of custom attributes that should be applied to method's return type. - - - - - - Calculates and returns the list of attributes that apply to the - specified method's parameters. - - The method to find attributes for. - The method's parameter to find attributes for. - - A list of custom attributes that should be applied to the specified method's parameter. - - - - - - Check that the specified object is matching the passed attribute type. - - -

- The specified object can be of different type : -

- - - - - - System.Reflection.CustomAttributeData (Only with .NET 2.0) - - - - - -
- The object instance to check. - The attribute type to test against. - - if the object instance matches the attribute type; - otherwise . - -
- - - Defines the types of the parameters for the specified constructor. - - The constructor to use. - The types for constructor's parameters. - - - - Implements constructors for the proxy class. - - - The builder to use. - - - - - Generates the proxy constructor. - - The constructor builder to use. - The IL generator to use. - The constructor to use. - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - if target virtual methods should not be proxied; - otherwise . - - - - - Gets the mapping of the interface to proxy - into the actual methods on the target type - that does not need to implement that interface. - - -

- If the target type does not implement the interface, - we return the interfaces methods as the target methods for many reasons : -

    -
  • - The target object can change for an object that implements the interface. - (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' - implementation in the Spring AOP framework for an example) -
  • -
  • - Allow Transparent proxies to be proxied. - (See Spring Remoting framework for an example) -
  • -
  • - Allow null target to be proxied. - (See Spring AOP framework which avoid calls to the target object - by intercepting all methods. Think "dynamic mock") - (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) -
  • -
-

-
- - The of the target object. - - The interface to implement. - - An interface mapping for the interface to proxy. - -
- - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - if only members declared at the level - of the supplied 's hierarchy should be proxied; - otherwise . - - - - - Implements the specified . - - The type builder to use. - The type the property is defined on. - The property to proxy. - The implemented methods map. - - - - Implements the specified event. - - The type builder to use. - The type the event is defined on. - The event to proxy. - The implemented methods map. - - - - Returns an array of s that represent - the proxiable interfaces. - - - An interface is proxiable if it's not marked with the - . - - - The array of interfaces from which - we want to get the proxiable interfaces. - - - An array containing the interface s. - - - - - Checks if specified interface is of a special type - that should never be proxied (i.e. ISerializable). - - Interface type to check. - - true if it is, false otherwise. - - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - -

- The default value of this property is the - . -

-
-
- - - Gets or sets the list of interfaces proxy should implement. - - - The default value of this property is all the interfaces - implemented or inherited by the target type. - - - - - Should we proxy target attributes? - - - - - - The list of custom s that the proxy - class must be decorated with. - - - - - - The custom s that the proxy - members must be decorated with. - - - - - - Implementation of IProxyMethodBuilder that delegates method calls to the base class. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Builds a proxy type using composition. - - - - In order for this builder to work, the target must implement - one or more interfaces. - - - Aleksandar Seovic - Bruno Baia - - - - Target instance calls should be delegated to. - - - - - Creates a new instance of the - class. - - - - - Creates a proxy that delegates calls to an instance of the - target object. - - -

- Only interfaces can be proxied using composition, so the target - must implement one or more interfaces. -

-
- The generated proxy class. - - If the - does not implement any interfaces. - -
- - - Create an to create interface implementations - - - - - Allows subclasses to generate additional code - - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Deaclares a field that holds the target object instance. - - - The builder to use for code generation. - - - - - Generates the proxy constructor. - - -

- This implementation creates instance of the target object for delegation - using constructor arguments. -

-
- The constructor builder to use. - The IL generator to use. - The constructor to delegate the creation to. -
- - - Gets or sets a value indicating whether interfaces should be implemented explicitly. - - - if they should be; otherwise, . - - - - - Allows easy access to existing and creation of new dynamic proxies. - - Aleksandar Seovic - Bruno Baia - - - - The name of the assembly that defines proxy types created. - - - - - The attributes of the proxy type to generate. - - - - - Creates an appropriate type builder. - - The proxy type name. - The type to extends if provided. - The type builder to use. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Builds a proxy type using inheritance. - - - - In order for this builder to work, target methods have to be either - , or belong to an interface. - - - Aleksandar Seovic - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Creates a proxy that inherits the proxied object's class. - - -

- Only (non-final) methods can be proxied, - unless they are members of one of the interfaces that target class - implements. In that case, methods will be proxied using explicit - interface implementation, which means that client code will have - to cast the proxy to a specific interface in order to invoke the - methods. -

-
- 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 proxy constructor. - - -

- This implementation delegates the call to a base class constructor. -

-
- The constructor builder to use. - The IL generator to use. - - The base class constructor to delegate the call to. - -
- - - Gets or sets a value indicating whether inherited members should be proxied. - - - if they should be; otherwise, . - - - - - This attribute can be used to mark interfaces that should not be proxied - - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Implementation of IProxyMethodBuilder that delegates method calls to target object. - - Bruno Baia - - - - 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 . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Base class for dynamic members. - - Aleksandar Seovic - - - - Method attributes constant. - - - - - Sets up target instance for invocation. - - IL generator to use. - Type of target instance. - - - - Sets up invocation argument. - - IL generator to use. - Argument type. - Argument position. - - - - Generates method invocation code. - - IL generator to use. - Flag specifying whether method is static. - Flag specifying whether method is on the value type. - Method to invoke. - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Defines constructors that dynamic constructor class has to implement. - - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Safe wrapper for the dynamic constructor. - - - will attempt to use dynamic - constructor if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached constructor info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe constructor wrapper. - - Constructor to wrap. - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Factory class for dynamic constructors. - - Aleksandar Seovic - - - - Creates dynamic constructor instance for the specified . - - Constructor info to create dynamic constructor for. - Dynamic constructor for the specified . - - - - Defines methods that dynamic field class has to implement. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Safe wrapper for the dynamic field. - - - will attempt to use dynamic - field if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached fieldInfo or creates a new entry, if none is found. - - - - - Creates a new instance of the safe field wrapper. - - Field to wrap. - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Holds cached Getter/Setter delegates for a Field - - - - - Factory class for dynamic fields. - - Aleksandar Seovic - - - - Creates dynamic field instance for the specified . - - Field info to create dynamic field for. - Dynamic field for the specified . - - - - Defines methods that dynamic indexer class has to implement. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Safe wrapper for the dynamic indexer. - - - will attempt to use dynamic - indexer if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe indexer wrapper. - - Indexer to wrap. - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Internal PropertyInfo accessor. - - - - - Factory class for dynamic indexers. - - Aleksandar Seovic - - - - Prevent instantiation - - - - - Creates dynamic indexer instance for the specified . - - Indexer info to create dynamic indexer for. - Dynamic indexer for the specified . - - - - Defines methods that dynamic method class has to implement. - - - - - Invokes dynamic method on the specified target object. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Safe wrapper for the dynamic method. - - - will attempt to use dynamic - method if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe method wrapper. - - Method to wrap. - - - - Invokes dynamic method. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Gets the class, that declares this method - - - - - Factory class for dynamic methods. - - Aleksandar Seovic - - - - Creates dynamic method instance for the specified . - - Method info to create dynamic method for. - Dynamic method for the specified . - - - - Defines methods that dynamic property class has to implement. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Safe wrapper for the dynamic property. - - - will attempt to use dynamic - property if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached property info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe property wrapper. - - Property to wrap. - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Internal PropertyInfo accessor. - - - - - Holds cached Getter/Setter delegates for a Property - - - - - Factory class for dynamic properties. - - Aleksandar Seovic - - - - Creates safe dynamic property instance for the specified . - - -

This factory method will create a dynamic property with a "safe" wrapper.

-

Safe wrapper will attempt to use generated dynamic property if possible, - but it will fall back to standard reflection if necessary.

-
- Property info to create dynamic property for. - Safe dynamic property for the specified . - -
- - - Creates dynamic property instance for the specified . - - Property info to create dynamic property for. - Dynamic property for the specified . - - - - Represents a Get method - - the target instance when calling an instance method - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - Represents an Indexer Get method - - the target instance when calling an instance method - - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - - Represents a method - - the target instance when calling an instance method - arguments to be passed to the method - the value return by the method. null when calling a void method - - - - Represents a constructor - - arguments to be passed to the method - the new object instance - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Allows easy access to existing and creation of new dynamic relection members. - - Aleksandar Seovic - - - - The name of the assembly that defines reflection types created. - - - - - The attributes of the reflection type to generate. - - - - - Cache for dynamic property types. - - - - - Cache for dynamic field types. - - - - - Cache for dynamic indexer types. - - - - - Cache for dynamic method types. - - - - - Cache for dynamic constructor types. - - - - - Creates an appropriate type builder. - - - The base name to use for the reflection type name. - - The type builder to use. - - - - Returns dynamic property if one exists. - - Property to look up. - callback function that will be called to create the dynamic property - An for the given property info. - - - - Returns dynamic field if one exists. - - Field to look up. - callback function that will be called to create the dynamic field - An for the given field info. - - - - Returns dynamic indexer if one exists. - - Indexer to look up. - callback function that will be called to create the dynamic indexer - An for the given indexer. - - - - Returns dynamic method if one exists. - - Method to look up. - callback function that will be called to create the dynamic method - An for the given method. - - - - Returns dynamic constructor if one exists. - - Constructor to look up. - callback function that will be called to create the dynamic constructor - An for the given constructor. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG mode, per ConditionalAttribute rules. - - - - - Create a new Get method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field - - - - Create a new Set method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field. - - If the field's returns true, the returned method - will throw an when called. - - - - - Create a new Get method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to read the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new Set method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to write the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new method delegate for the specified method using - - the method to create the delegate for - a delegate that can be used to invoke the method. - - - - Creates a new delegate for the specified constructor. - - the constructor to create the delegate for - delegate that can be used to invoke the constructor. - - - - Creates a instance with the highest possible code access security. - - - If allowed by security policy, associates the method with the s declaring type. - Otherwise associates the dynamic method with . - - - - - Delegates a Method(object target, params object[] args) call to the actual underlying method. - - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Converts to an instance of if necessary to - e.g. avoid e.g. double/int cast exceptions. - - - - This method mimics the behavior of the compiler that - automatically performs casts like int to double in "Math.Sqrt(4)".
- See about implicit, widening type conversions on MSDN - Type Conversion Tables -
- - Note: is expected to be a value type! - -
-
- - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Indicates that an annotated class is a "component". - Such classes are considered as candidates for future features such - as auto-detection when using attribute-based configuration and assembly scanning. - - Other class-level annotations may be considered as identifying - a component as well, typically a special kind of component: - e.g. the Repository attribute. - - Mark Fisher - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the component. - - - - Gets or sets the name of the component - - The name of the component. - - - - Indicates that an annotated class is a "Repository" (or "DAO"). - - - A class with this attribute is eligible for Spring DataAccessException translation. A class - with the Repository attribute is also clarified as to its role in the overall application - architecture for the purpose of tools, aspects, etc. - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Rod Johnson - Jueren Hoeller - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the repository. - - - - Indicates that an annotated class is a "Service" (e.g. a business service facade). - - - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - - - - Implements by using . - - Erich Eichinger - - - - Specifies the contract a strategy must be implement to store and - retrieve data that is specific to the executing thread. - - - All implementations of this interface must treat keys case-sensitive. - - Erich Eichinger - - - - Retrieves an object with the specified . - - The name of the item. - - The object in the current thread's context associated with the - specified or null if no object has been stored previously - - - - - Stores a given object and associates it with the specified . - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - - If the object with the specified is not found, the method does nothing. - - The name of the object to remove. - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - - Acquire/Release protocol, base of many concurrency utilities. - - - -

objects isolate waiting and notification for particular logical - states, resource availability, events, and the like that are shared - across multiple threads.

- -

Use of s sometimes (but by no means always) adds - flexibility and efficiency compared to the use of plain - .Net monitor methods and locking, and are sometimes (but by no means - always) simpler to program with.

- -

Used for implementation of a

-
- - Doug Lea - Federico Spinazzi (.Net) -
- - Wait (possibly forever) until successful passage. - Fail only upon interuption. Interruptions always result in - `clean' failures. On failure, you can be sure that it has not - been acquired, and that no - corresponding release should be performed. Conversely, - a normal return guarantees that the acquire was successful. - - - - - Potentially enable others to pass. -

- Because release does not raise exceptions, - it can be used in `finally' clauses without requiring extra - embedded try/catch blocks. But keep in mind that - as with any java method, implementations may - still throw unchecked exceptions such as Error or NullPointerException - when faced with uncontinuable errors. However, these should normally - only be caught by higher-level error handlers. -

-
-
- - - Wait at most msecs to pass; report whether passed. -

- The method has best-effort semantics: - The msecs bound cannot - be guaranteed to be a precise upper bound on wait time in Java. - Implementations generally can only attempt to return as soon as possible - after the specified bound. Also, timers in Java do not stop during garbage - collection, so timeouts can occur just because a GC intervened. - So, msecs arguments should be used in - a coarse-grained manner. Further, - implementations cannot always guarantee that this method - will return at all without blocking indefinitely when used in - unintended ways. For example, deadlocks may be encountered - when called in an unintended context. -

-
- the number of milleseconds to wait - An argument less than or equal to zero means not to wait at all. - However, this may still require - access to a synchronization lock, which can impose unbounded - delay if there is a lot of contention among threads. - - true if acquired -
- - A latch is a boolean condition that is set at most once, ever. - Once a single release is issued, all acquires will pass. -

- Sample usage. Here are a set of classes that use - a latch as a start signal for a group of worker threads that - are created and started beforehand, and then later enabled. -

- - class Worker implements IRunnable { - private readonly Latch startSignal; - Worker(Latch l) - { - startSignal = l; - } - - public void Run() { - startSignal.acquire(); - DoWork(); - } - - void DoWork() { ... } - } - - class Driver { // ... - void Main() { - Latch go = new Latch(); - for (int i = 0; i < N; ++i) // make threads - new Thread(new ThreadStart(new Worker(go)).Start(); - DoSomethingElse(); // don't let run yet - go.Release(); // let all threads proceed - } - } - -
- Doug Lea - Federico Spinazzi (.Net) -
- - - can acquire ? - - - - - Method mainly used by clients who are trying to get the latch - - - - Wait at most msecs millisconds for a permit - - - - Enable all current and future acquires to pass - - - - - An abstraction to safely store "ThreadStatic" data. - - - By default, is used to store thread-specific data. - You may switch the storage strategy by calling .

- NOTE: Access to the underlying storage is not synchronized for performance reasons. - You should call only once at application startup! - - Erich Eichinger - - -

- Holds the current strategy. - - - Access to this variable is not synchronized on purpose for performance reasons. - Setting a different strategy should happen only once - at application startup. - -
- - - Set the new strategy. - - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - -

Base class for counting semaphores based on Semaphore implementation - from Doug Lea.

-
- - -

Conceptually, a semaphore - maintains a set of permits. Each acquire() blocks if - necessary until a permit is available, and then takes it.

- -

Each release adds a permit. However, no actual permit objects are used; - the Semaphore just keeps a count of the number available - and acts accordingly.

- -

A semaphore initialized to 1 can serve as a mutual exclusion lock.

- - Used for implementation of a -
- Doug Lea - Federico Spinazzi (.Net) -
- - - current number of available permits - - - - -

Create a Semaphore with the given initial number of permits.

-

Using a seed of 1 makes the semaphore act as a mutual - exclusion lock.

- -

Negative seeds are also allowed, - in which case no acquires will proceed until the number of - releases has pushed the number of permits past 0.

-
-
- - - Release a permit - - - - - Acquire a permit - - - - - Wait at most msecs millisconds for a permit - - number of ms to wait - true if aquired - - - Release N permits. release(n) is - equivalent in effect to: -
-            for (int i = 0; i < n; ++i) release();
-            
- But may be more efficient in some semaphore implementations. -
- if n is negative. - - -
- - Return the current number of available permits. - Returns an accurate, but possibly unstable value, - that may change immediately after returning. - - - - - Utility class to use an with the - C# using () {} idiom - - - - - Creates a new trying to the given - - - the to be held - - - - Creates a new trying to the given - - - the to be held - millisecond to try to acquire the lock - - - - Releases the held - - - - - initializes and acquire access to the - - - - - - Implements by using a hashtable. - - Erich Eichinger - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - Thrown by synchronization classes that report - timeouts via exceptions. The exception is treated - as a form (subclass) of InterruptedException. This both - simplifies handling, and conceptually reflects the fact that - timed-out operations are artificially interrupted by timers. - - - - - The approximate time that the operation lasted before - this timeout exception was thrown. - - - - - - 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. - - - 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. - - - - - Override of GetObjectData to allow for private serialization - - serialization info - streaming context - - - Constructs a TimeoutException with given duration value. - - - - - Constructs a TimeoutException with the - specified duration value and detail message. - - - - - Gets the approximate time that the operation lasted before - this timeout exception was thrown. - - - - A TimeoutSync is an adaptor class that transforms all - calls to acquire to instead invoke attempt with a predetermined - timeout value. - - - - - - the adapted sync - - - - - timeout value - - - - Create a TimeoutSync using the given Sync object, and - using the given timeout value for all calls to acquire. - - - - - Try to acquire the sync before the timeout - - In case a time out occurred - - - - - - - - - - - - - - Support to account for differences between java nad .NET: -
    -
-
-
- - - .NET threads have not a method to check if they have been interrupted. - Moreover, differently from java threads, when entering locked - blocks, Monitor, Sleep, SpinWait and so on, a - will be raised by the runtime. -

Spring.Threading classes usually call this method before entering a lock block, to mirror java code -

Usually this is non issue because the same exception will be raised entering the monitor - associated with the lock () -

-
- if the thread has been interrupted -
- - - Normalize the given so that - is is comparable with . - - Date. - - - - - - - - - the difference between millisecodns of the first and second date - - - - Returns the number of nanoseconds for the current value of - - Current number of nanoseconds - - - - Returns the number of nano seconds represented by the - - to use - Number of nano seconds for - - - - Returns a representing the number of nanoseconds passed in via . - - Number of nanoseconds. - representing the number of nanoseconds passed in. - - - - Placeholder for java.lang.System.currentTimeMillis - - The current machine time in milliseconds - - - - Has been interrupted this thread - - - - - Miscellaneous generic collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Various utility methods relating to the manipulation of arrays. - - Aleksandar Seovic - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Use this sort method instead of to overcome - bugs in Mono. - - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Tests equality of two single-dimensional arrays by checking each element - for equality. - - The first array to be checked. - The second array to be checked. - True if arrays are the same, false otherwise. - - - - Returns hash code for an array that is generated based on the elements. - - - Hash code returned by this method is guaranteed to be the same for - arrays with equal elements. - - - Array to calculate hash code for. - - - A hash code for the specified array. - - - - - Returns string representation of an array. - - - Array to return as a string. - - - String representation of the specified . - - - - - Concatenates 2 arrays of compatible element types - - - If either of the arguments is null, the other array is returned as the result. - The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. - - - - - Assertion utility methods that simplify things such as argument checks. - - -

- Not intended to be used directly by applications. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Checks, whether may be invoked on . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the method to test for - - if is null - - - if it is not possible to invoke on - - - - - checks, whether supports the methods of . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the type to test for - - if is null - - - if it is not possible to invoke methods of - type on - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - If the supplied is . - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is . - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - An arbitrary message that will be passed to any thrown . - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is , contains no elements or only null elements. - - The array or collection to check. - The argument name. - - If the supplied is , - contains no elements or only null elements. - - - - - Checks whether the specified can be cast - into the . - - - The argument to check. - - - The name of the argument to check. - - - The required type for the argument. - - - An arbitrary message that will be passed to any thrown - . - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - The exception message to use if the assertion fails. - - if expression is false - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - - if expression is false - - - - - Assert a bool expression, throwing InvalidOperationException - if the expression is false. - - a boolean expression. - The exception message to use if the assertion fails - if expression is false - - - - Creates a new instance of the class. - - -

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

-
-
- - - General utility methods for working with annotations - - - - - Find a single Attribute of the type 'attributeType' from the supplied class, - traversing it interfaces and super classes if no attribute can be found on the - class iteslf. - - - This method explicitly handles class-level attributes which are not declared as - inherited as well as attributes on interfaces. - - The class to look for attributes on . - Type of the attribibute to look for. - the attribute of the given type found, or null - - - - Miscellaneous collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Adds the specified to the specified . - - The collection to add the element to. - The object to add to the collection. - - - - Adds the specified to the specified . - - The enumerable to add the element to. - The object to add to the collection. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Converts an instance to an instance. - - The instance to be converted. - An instance in which its elements are the elements of the instance. - if the is null. - - - - Copies the elements of the to a - new array of the specified element type. - - The instance to be converted. - The element of the destination array to create and copy elements to - An array of the specified element type containing copies of the elements of the . - - - - Returns the first element contained in both, and . - - The implementation assumes that <<< - the source enumerable. may be null - the list of candidates to match against elements. may be null - the first element found in both enumerables or null - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a value of the given type found, or null if none. - If more than one value of the given type is found - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a collection of matching values of the given type found, empty if none found, or null if the input collection was null. - - - - Find a value of one of the given types in the given Collection, - searching the Collection for a value of the first type, then - searching for a value of the second type, etc. - - The collection to search. - The types to look for, in prioritized order. - a value of the given types found, or null if none - If more than one value of the given type is found - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified dictionary is null empty. - - The dictionary to check. - - true if the specified dictionary is empty or null; otherwise, false. - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A callback method used for comparing to items. - - - - the first object to compare - the second object to compare - Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. - - - - - - Utility class containing helper methods for object comparison. - - Aleksandar Seovic - - - Compares two objects. - First object. - Second object. - - 0, if objects are equal; - less than zero, if the first object is smaller than the second one; - greater than zero, if the first object is greater than the second one. - - - - Utility class for .NET configuration files management. - - Aleksandar Seovic - - - - Avoid BeforeFieldInit pitfall - - - - - Parses the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. - Object created by a corresponding . -
- - - Refresh the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. -
- - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Configuration exception. - - - - Creates the configuration exception. - - Configuration exception. - - - - Determines whether the specified exception is configuration exception. - - The exception to check. - - true if the specified exception is configuration exception; otherwise, false. - - - - - Returns the line number of the specified node. - - Node to get the line number for. - The line number of the specified node. - - - - Returns the name of the file specified node is defined in. - - Node to get the file name for. - The name of the file specified node is defined in. - - - - Sets the current to be used by . - - - íf implements , this method invokes - on the new configSystem to chain them.
- Note, that this method requires reflection on internals of -
- the configuration system to set - bypasses the check if the current system has already been initialized - the previous config system, if any -
- - - Resets the global configuration system instance. Use for unit testing only! - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Gets a string specifying the file/resource name related to the configuration details. - - - - - Gets an integer specifying the line number related to the configuration details. - - - - - Gets an integer specifying the line position related to the configuration details. - - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - An implementation, who's elements retain information - about their location in the original XML text document the were read from. - - - When loading a document, the used must implement . - Typical XmlReader implementations like support this interface. - - Erich Eichinger - - - - Overridden to create a retaining the current - text position information. - - - - - Overridden to create a retaining the current - text position information. - - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store null as their property. - - The XML source - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store as their property. - - - The new XmlNode or null if no more nodes exist. - - the name of the resource - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store null as their property. - - - The new XmlNode or null if no more nodes exist. - - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Get info about the current text position during loading a document. - Outside loading a document, the properties of - will always be null. - - - - - Holds the current text position during loading a document - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - Collects information on the constructor to use to create the instance and the argument instances to pass into the - constructor. - - - - - Initializes a new instance of the class. - - The constructor info. - The arg instances. - - - - Gets the constructor info. - - The constructor info. - - - - Gets the arg instances. - - The arg instances. - - - - Discovers the attributes of a - and provides access to the - s metadata. - - Rick Evans - - - - The method name associated with a delegate invocation. - - - - - Creates a new instance of the - class. - - - The event used to extract the delegate - from. - - - if the supplied is - . - - - - - Creates a new instance of the - class. - - - The delegate . - - - If the supplied is not a subclass of the - class, or is . - - - - - Checks to see if the method encapsulated by the supplied method - metadata is compatible with the method signature associated with - this delegate type. - - The method to be checked. - - if the method signature is compatible with - the signature of this delegate; if not, or - if the supplied parameter is - . - - - - - Gets the s of the parameters of the - method signature associated with this delegate type. - - -

- This method will never return ; the returned - array may be empty, but it most certainly - will not be . -

-
- - A array of the parameter - s; or the - array if the method signature has no parameters. - -
- - - Gets the return of the - method signature associated with this delegate type. - - The return . - - - - Gets the metadata about the method signature associated - with this delegate type. - - - The metadata about the method signature associated - with this delegate type. - - - - - Determines whether the supplied - is a type. - - - The to be checked. - - - if the supplied - is a ; - if not or the supplied - is . - - - - - Checks if the signature of the supplied - is compatible with the signature expected by the supplied - . - - The event to be checked against. - - The method signature to check for compatibility. - - - if the signature of the supplied - is compatible with the signature - expected by the supplied ; - if not or either of the supplied - parameters is . - - - - - - The of the delegate. - - - - - Use this class for obtaining instances for dynamic code generation. - - -

- The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. -

- - Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. - -
- -

The following excerpt from demonstrates usage:

- - public class DynamicProxyManager - { - public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; - - public static TypeBuilder CreateTypeBuilder(string name, Type baseType) - { - // Generates type name - string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); - ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); - return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); - } - } - -
- Erich Eichinger - - - -
- - - prevent instantiation - - - - - Returns the for the dynamic module within the specified assembly. - - - If the assembly does not exist yet, it will be created.
- This factory caches any dynamic assembly it creates - calling GetModule() twice with - the same name will *not* create 2 distinct modules! -
- The assembly-name of the module to be returned - the that can be used to define new types within the specified assembly -
- - - Persists the specified dynamic assembly to the file-system - - the name of the dynamic assembly to persist - - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Removes all registered s. - - - - - A utility class for raising events in a generic and consistent fashion. - - Rick Evans - - - - Create a new EventRaiser instance - - - - - Raises the event encapsulated by the supplied - , passing the supplied - to the event. - - The event to be raised. - The arguments to the event. - a map of sink/exception entries that occurred during event raising - - - - Invokes the supplied , passing the supplied - to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Raises events defensively. - - -

- Raising events defensively means that as the raised event is passed to each handler, - any thrown by a handler will be caught and silently - ignored. -

-
- Rick Evans -
- - - Defensively invokes the supplied , passing the - supplied to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Implement this interface to create your own, delegating - and set them using - - - - - - - - - - - A strategy for handling errors. This is especially useful for handling - errors that occur during asynchronous execution as in such cases it may not be - possible to throw the error to the original caller. - - Mark Fisher - Mark Pollack (.NET) - - - - Handles the error. - - The exception. - - - - Utility methods for IO handling - - - - - Copies one stream into another. - (Don't forget to call on the destination stream!) - - - Does not close the input stream! - - - - - Reads a stream into a byte array. - - - Does not close the input stream! - - - - - Various utility methods relating to numbers. - - -

- Mainly for internal use within the framework. -

-
- Aleksandar Seovic -
- - - Determines whether the supplied is an integer. - - The object to check. - - if the supplied is an integer. - - - - - Determines whether the supplied is a decimal number. - - The object to check. - - if the supplied is a decimal number. - - - - - Determines whether the supplied is of numeric type. - - The object to check. - - true if the specified object is of numeric type; otherwise, false. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to a number. - - The object to check. - - true if the specified object is decimal number; otherwise, false. - - - - - Is the supplied equal to zero (0)? - - The number to check. - - id the supplied is equal to zero (0). - - - - - Negates the supplied . - - The number to negate. - The supplied negated. - - If the supplied is not a supported numeric type. - - - - - Returns the bitwise not (~) of the supplied . - - The number. - The value of ~. - - If the supplied is not a supported numeric type. - - - - - Bitwise ANDs (&) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise ORs (|) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise XORs (^) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Adds the specified numbers. - - The first number. - The second number. - - - - Subtracts the specified numbers. - - The first number. - The second number. - - - - Multiplies the specified numbers. - - The first number. - The second number. - - - - Divides the specified numbers. - - The first number. - The second number. - - - - Calculates remainder for the specified numbers. - - The first number (dividend). - The second number (divisor). - - - - Raises first number to the power of the second one. - - The first number. - The second number. - - - - Coerces the types so they can be compared. - - The right. - The left. - - - - Creates a new instance of the class. - - -

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

-
-
- - - Helper methods with regard to objects, types, properties, etc. - - -

- Not intended to be used directly by applications. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The instance for this class. - - - - - An empty object array. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Instantiates the type using the assembly specified to load the type. - - This is a convenience in the case of needing to instantiate a type but not - wanting to specify in the string the version, culture and public key token. - The assembly. - Name of the type. - - - If the or is - - - If cannot load the type from the assembly or the call to InstantiateType(Type) fails. - - - - - Convenience method to instantiate a using - its no-arg constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The to instantiate* - - A new instance of the . - - If the is - - - If the is an abstract class, an interface, - an open generic type or does not have a public no-argument constructor. - -
- - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. - - - - - Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains - open generic type parameters. - - The type. - - - - Convenience method to instantiate a using - the given constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The constructor to use for the instantiation. - - - The arguments to be passed to the constructor. - - A new instance. - - If the is - - - If the 's declaring type is an abstract class, - an interface, an open generic type or does not have a public no-argument constructor. - -
- - - Checks whether the supplied is not a transparent proxy and is - assignable to the supplied . - - -

- Neccessary when dealing with server-activated remote objects, because the - object is of the type TransparentProxy and regular is testing for assignable - types does not work. -

-

- Transparent proxy instances always return when tested - with the 'is' operator (C#). This method only checks if the object - is assignable to the type if it is not a transparent proxy. -

-
- The target to be checked. - The value that should be assigned to the type. - - if the supplied is not a - transparent proxy and is assignable to the supplied . - -
- - - Determine if the given is assignable from the - given value, assuming setting by reflection and taking care of transparent proxies. - - -

- Considers primitive wrapper classes as assignable to the - corresponding primitive types. -

-

- For example used in an object factory's constructor resolution. -

-
- The target . - The value that should be assigned to the type. - True if the type is assignable from the value. -
- - - Check if the given represents a - "simple" property, - i.e. a primitive, a , a - , or a corresponding array. - - -

- Used to determine properties to check for a "simple" dependency-check. -

-
- - The to check. - -
- - - Check if the given class represents a primitive array, - i.e. boolean, byte, char, short, int, long, float, or double. - - - - - Determines whether the specified array is null or empty. - - The array to check. - - true if the specified array is null empty; otherwise, false. - - - - - Determine if the given objects are equal, returning - if both are respectively - if only one is . - - The first object to compare. - The second object to compare. - - if the given objects are equal. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - If the supplied is . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - If the supplied is . - - - - - Gets the qualified name of the given method, consisting of - fully qualified interface/class name + "." method name. - - The method. - qualified name of the method. - - - - Return a String representation of an object's overall identity. - - The object (may be null). - The object's identity as String representation, - or an empty String if the object was null - - - - - Gets a hex String form of an object's identity hash code. - - The obj. - The object's identity code in hex notation - - - - Support matching of file system paths in a manner similar to that of the - NAnt FileSet. - - -

- Any (back)slashes are converted to forward slashes. -

-
- - - // true - PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); - PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); - PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); - // false - PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); - - - Federico Spinazzi -
- - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - should the match consider the case - - if the path is matched by the pattern; - otherwise . - - - - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - - if the path is matched by the pattern; - otherwise . - - - - - Replaces back(slashes) with forward slashes. - - - The path or the pattern to modify. - - A forward-slashed string. - - - - Helper method to convert a NAnt-like pattern into the - appropriate pattern for a regular expression. - - The NAnt-like pattern. - A regex-compatible pattern. - - - - Creates a new instance of the class. - - -

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

-
-
- - Utility methods for simple pattern matching, in particular for - Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. - - Juergen Hoeller - Mark Pollack - - - Match a String against the given pattern, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the pattern to match against - - the String to match - - whether the String matches the given pattern - - - - Match a String against the given patterns, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the patterns to match against - - the String to match - - whether the String matches any of the given patterns - - - - - An implementation of the Java Properties class. - - - For the complete syntax see java.util.Properties JavaDoc. - This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. - - - key1 = value - key2: - key3 - - will result in the name/value pairs: - - key1:="value" - key2:=string.Empty - key3:=<null> - - note, that to specify a null value, the key must not be followed by any character except newline. - - - Simon White - - - - Creates an empty property list with no default values. - - - - - Creates a property list with the specified initial properties. - - The initial properties. - - - - Reads a property list (key and element pairs) from the input stream. - - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - The text reader to load from. - - - - Reads a property list (key and element pairs) from the input stream. - - the dictionary to put it in - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - the dictionary to put it in - The text reader to load from. - - - - Strips whitespace from the front of the specified string. - - The string. - The string with all leading whitespace removed. - - - - Splits the specified string into a key / value pair. - - The line to split. - An array containing the key / value pair. - - - - Searches for the property with the specified key in this property list. - - The key. - The property, or null if the key was not found. - - - - Searches for the property with the specified key in this property list. - - The key. - - The default value to be returned if the key is not found. - - The property, or the default value. - - - - Writes this property list out to the specified stream. - - The stream to write to. - - - - Sets the specified property key / value pair. - - The key. - The value. - - - - Writes the properties in this instance out to the supplied stream. - - The stream to write to. - Arbitrary header information. - - - - Removes the key / value pair identified by the supplied key. - - - The key identifying the key / value pair to be removed. - - - - - Adds the specified key / object pair to this collection. - - The key. - The value. - - - - Adds the specified key / object pair to this collection. - - - - - Various reflection related methods that are missing from the standard library. - - Rod Johnson - Juergen Hoeller - Aleksandar Seovic (.NET) - Stan Dvoychenko (.NET) - Bruno Baia (.NET) - - - - Convenience value that will - match all private and public, static and instance members on a class - in a case inSenSItivE fashion. - - - - - Avoid BeforeFieldInit problem - - - - - Checks, if the specified type is a nullable - - - - - Returns signature for the specified , method name and argument - s. - - The the method is in. - The method name. - - The argument s. - - The method signature. - - - - Returns method for the specified , method - name and argument - s. - - - Searches with BindingFlags - When dealing with interface methods, you probable want to 'normalize' method references by calling - . - - - - The target to find the method on. - - The method to find. - - The argument s. May be - if the method has no arguments. - - The target method. - - - - - Resolves a given to the representing the actual implementation. - - - see article How To Get an Explicit Interface Implementation Method. - - a - the type to lookup - the representing the actual implementation method of the specified - - - - Returns an array of parameter s for the specified method - or constructor. - - The method (or constructor). - An array containing the parameter s. - - If is . - - - - - Returns an array of parameter s for the - specified parameter info array. - - The parameter info array. - An array containing parameter s. - - If is or any of the - elements is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The method. - An array containing the parameter names. - - If is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The parameter info array. - An array containing parameter names. - - If is or any of the - elements is . - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the type of method (used for exception reporting only) - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of constructors, selects the constructor having an exact match on the given ' types. - - the list of constructors to choose from - the arguments to the method - the constructor matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - Packages arguments into argument list containing parameter array as a last argument. - - Argument vaklues to package. - Total number of oarameters. - Type of the param array element. - Packaged arguments. - - - - Convenience method to convert an interface - to a array that contains - all the interfaces inherited and the specified interface. - - The interface to convert. - An array of interface s. - - If the specified is not an interface. - - - If is . - - - - - Is the supplied the default indexer for the - supplied ? - - - The name of the property on the supplied to be checked. - - - The to be checked. - - - if the supplied is the - default indexer for the supplied . - - - If the supplied is . - - - - - Is the supplied declared on one of these interfaces? - - The method to check. - The array of interfaces we want to check. - - if the method is declared on one of these interfaces. - - - If any of the s specified is not an interface. - - - If or any of the specified interfaces is - . - - - - - Returns the default value for the specified - - -

- Follows the standard .NET conventions for default values where - relevant; for example, all numeric types default to the value - 0. -

-
- - The to return default value for. - - - The default value for the specified . - - - If the supplied is an enumerated type that - has no values. - -
- - - Returns an array consisting of the default values for the supplied - . - - - The array of s to return default values for. - - - An array consisting of the default values for the supplied - . - - - If any of the elements in the supplied - array is an enumerated type that has no values. - - - - - - Checks that the parameter s of the - supplied match the parameter - s of the supplied - . - - The method to be checked. - - The array of parameter s to check against. - - - if the parameter s - match. - - - - - Returns an array containing the s of the - objects in the supplied array. - - - The objects array for which the corresponding s - are needed. - - - An array containing the s of the objects - in the supplied array; this array will be empty (but not - if the supplied - is null or has no elements. - - -

- [C#]
- Given an array containing the following objects, - [83, "Foo", new object ()], the - array returned from this method call would consist of the following - elements... - [Int32, String, Object]. -

-
-
- - - Given the return its representation as - it would appear in the source code files. - - - Largely intended to handle generic types where .ToString() will typically return: - "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" - and this method will instead return: - "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" - - The type. - Friendly string representing the Type - - - - Does the given and/or it's superclasses - have at least one or more methods with the given name (with any - argument types)? - - -

- Includes non-public methods in the methods searched. -

-
- - The to be checked. - - - The name of the method to be searched for. Case inSenSItivE. - - - if the given or / and it's - superclasses have at least one or more methods (with any argument types); - if not, or either of the parameters is . - -
- - - Within , counts the number of overloads for the method with the given (case-insensitive!) - - The type to be searched - the name of the method for which overloads shall be counted - The number of overloads for method within type - - - - Creates a . - - -

- Note that if a non- - is supplied, any read write properties exposed by the - will be used to overwrite values that may have been passed in via the - . That is, the will be used - to initialize the custom attribute, and then any read-write properties on the - will be plugged in. -

-
- - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - If the parameter is . - - - If the parameter is not a - that derives from the class. - - -
- - - Creates a . - - - The desired . - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - - - Creates a . - - - The source attribute to copy properties from. - - A custom attribute builder. - - If the supplied is - . - - - - - Creates a . - - - The desired . - - A custom attribute builder. - - - - Creates a . - - - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - A custom attribute builder. - - - - Creates a . - - - The to create - the custom attribute builder from. - - A custom attribute builder. - - - - Calculates and returns the list of attributes that apply to the - specified type or method. - - The type or method to find attributes for. - - A list of custom attributes (CustomAttributeData or Attribute instances) - that should be applied to type or method. - - - - - Tries to find matching methods in the specified - for each method in the supplied list. - - - The to look for matching methods in. - - The methods to match. - - A flag that specifies whether to throw an exception if a matching - method is not found. - - A list of the matched methods. - - If either of the or - parameters are . - - - - - Returns the of the supplied - . - - -

- If the is a - instance, the return value of this method call with be the - parameter cast to a - . If the is - anything other than a , the return value - will be the result of invoking the 's - method. -

-
- - A or instance. - - - The argument if it is a - or the result of invoking - on the argument if it - is an . - - - If the is . - -
- - - Unwraps the supplied - and returns the inner exception preserving the stack trace. - - - The to unwrap. - - The unwrapped exception. - - - - Is the supplied can be accessed outside the assembly ? - - The type to check. - - if the type can be accessed outside the assembly; - Otherwise . - - - - - Determines whether the specified type is nullable. - - The type. - - true if the specified type is ullable]; otherwise, false. - - - - - Is the supplied can be accessed - from the supplied friendly assembly ? - - The type to check. - The friendly assembly name. - - if the type can be accessed - from the supplied friendly assembly; Otherwise . - - - - - Gets all of the interfaces implemented by - the specified . - - - The object to get the interfaces of. - - - All of the interfaces implemented by the - . - - - - - Returns the explicit that is the root cause of an exception. - - - If the InnerException property of the current exception is a null reference - or a , returns the current exception. - - The last exception thrown. - - The first explicit exception thrown in a chain of exceptions. - - - - - Copies all fields from one object to another. - - - The types of both objects must be related. This means, that either of the following is true: - - fromObject.GetType() == toObject.GetType() - fromObject.GetType() is derived from toObject.GetType() - toObject.GetType() is derived from fromObject.GetType() - - - The source object - The object, who's fields will be populated with values from the source object - If the object's types are not related - - - - Convenience method that uses reflection to return the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to retrieve the field value. - Name of the field on the object from which to retrieve the value. - - - - - Convenience method that uses reflection to set the value of a non-public field of a given object. - - Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. - The instance of the object from which to set the field value. - Name of the field on the object to which to set the value. - The field value to set. - - - - Creates a . - - Bruno Baia - - - - Creates a new instance of the - class. - - The custom attribute type. - - - - Creates a new instance of the - class. - - The custom attribute type. - The custom attribute constructor arguments. - - - - Adds the specified values to the constructor argument list - used to create the custom attribute. - - An array of argument values. - - - - Adds a property value to the custom attribute. - - The property name. - The property value. - - - - Creates the . - - The created . - - - - Utility class to be used from within this assembly for executing security critical code - NEVER EVER MAKE THIS PUBLIC! - - Erich Eichinger - - - - Miscellaneous utility methods. - - -

- Mainly for internal use within the framework. -

-
- Rod Johnson - Juergen Hoeller - Keith Donald - Aleksandar Seovic (.NET) - Mark Pollack (.NET) - Rick Evans (.NET) - Erich Eichinger (.NET) -
- - - The string that signals the start of an Ant-style expression. - - - - - The string that signals the end of an Ant-style expression. - - - - - An empty array of instances. - - - - - Creates a new instance of the class. - - -

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

-
-
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - An array of the tokens. -
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - - - Pairs of quote characters. within a pair of quotes are ignored - - An array of the tokens. -
- - - Convert a CSV list into an array of s. - - - Values may also be quoted using doublequotes. - - A CSV list. - - An array of s, or the empty array - if is . - - - - - Take a which is a delimited list - and convert it to a array. - - -

- If the supplied is a - or zero-length string, then a single element - array composed of the supplied - will be - eturned. If the supplied - is , then an empty, - zero-length array will be returned. -

-
- - The to be parsed. - - - The delimeter (this will not be returned). Note that only the first - character of the supplied is used. - - - An array of the tokens in the list. - -
- - - Convenience method to return an - as a delimited - (e.g. CSV) . - - - The to parse. - - - The delimiter to use (probably a ','). - - The delimited string representation. - - - - Convenience method to return an - as a CSV - . - - - The to display. - - The delimited string representation. - - - - Convenience method to return an array as a CSV - . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - - - Convenience method to return a - array as a delimited (e.g. CSV) . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - The delimiter to use (probably a ','). - - - - Checks if a string has length. - - The string to check, may be . - - - if the string has length and is not - . - - - - StringUtils.HasLength(null) = false - StringUtils.HasLength("") = false - StringUtils.HasLength(" ") = true - StringUtils.HasLength("Hello") = true - - - - - - Checks if a has text. - - -

- More specifically, returns if the string is - not , it's is > - zero (0), and it has at least one non-whitespace character. -

-
- - The string to check, may be . - - - if the is not - , - > zero (0), and does not consist - solely of whitespace. - - - - StringUtils.HasText(null) = false - StringUtils.HasText("") = false - StringUtils.HasText(" ") = false - StringUtils.HasText("12345") = true - StringUtils.HasText(" 12345 ") = true - - -
- - - Checks if a is - or an empty string. - - -

- More specifically, returns if the string is - , it's is equal - to zero (0), or it is composed entirely of whitespace - characters. -

-
- - The string to check, may (obviously) be . - - - if the is - , has a length equal to zero (0), or - is composed entirely of whitespace characters. - - - - StringUtils.IsNullOrEmpty(null) = true - StringUtils.IsNullOrEmpty("") = true - StringUtils.IsNullOrEmpty(" ") = true - StringUtils.IsNullOrEmpty("12345") = false - StringUtils.IsNullOrEmpty(" 12345 ") = false - - -
- - - Returns , if it contains non-whitespaces. null otherwise. - - - - - Strips first and last character off the string. - - The string to strip. - The stripped string. - - - - Returns a list of Ant-style expressions from the specified text. - - The text to inspect. - - A list of expressions that exist in the specified text. - - - If any of the expressions in the supplied - is empty (${}). - - - - - Replaces Ant-style expression placeholder with expression value. - - -

- -

-
- The string to set the value in. - The name of the expression to set. - The expression value. - - A new string with the expression value set; the - value if the supplied - is , has a length - equal to zero (0), or is composed entirely of whitespace - characters. - -
- - - Surrounds (prepends and appends) the string value of the supplied - to the supplied . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The prefix and suffix that respectively will be prepended and - appended to the target . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - The surrounded string. -
- - - Surrounds (prepends and appends) the string values of the supplied - and to the supplied - . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The value that will be prepended to the . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - - The value that will be appended to the . If this value - is not a value, it's attendant - value will be used. - - The surrounded string. -
- - - Converts escaped characters (for example "\t") within a string - to their real character. - - The string to convert. - The converted string. - - - - Utility class containing miscellaneous system-level functionality. - - Aleksandar Seovic - - - - Registers assembly resolver that iterates over the - assemblies loaded into the current - in order to find an assembly that cannot be resolved. - - - This method has to be called if you need to serialize dynamically - generated types in transient assemblies, such as Spring AOP proxies, - because standard .NET serialization engine always tries to load - assembly from the disk. - - - - - Returns true if running on Mono - - Tests for the presence of the type Mono.Runtime - - - - Returns true if running on CLR 4.0 under InProc SxS mode - - - - - Gets the thread id for the current thread. Use thread name is available, - otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and - CurrentThread.ManagedThreadId otherwise. - - The thread id. - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Creates a new TextPositionInfo instance. - - - - - Creates a new TextPositionInfo instance, copying values from another instance. - - - - - The filename related to this text position - - - - - The line number related to this text position - - - - - The line position related to this text position - - - - - UniqueKey allows for generating keys unique to a type or particular instance and a partial name, - that can e.g. be used as keys in . - - - // shows usage type-scoped keys - UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); - UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); - - HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; - Assert.AreEqual( "some value unique for class A having key 'myKey'", value); - - HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; - Assert.AreEqual( "some value unique for class B having key 'myKey'", value); - - - - - Initialize a new instance of from its string representation. - See and See for details. - - The string representation of the new instance. - - - - Compares this instance to another. - - - - - Compares this instance to another. - - - - - Returns the hash code for this key. - - - - - - Returns a string representation of this key. - - - - - Creates a new key instance unique to the given instance. - - The instance the key shall be unique to - The partial key to be made unique - - - If is of type - - - - Creates a new key instance unique to the given type. - - The type the key shall be unique to - The partial key to be made unique - - - - Returns a key unique for the given instance. - - The instance the key shall be unique to - The partial key to be made unique - A key formatted as typename[instance-id].partialkey - - - - Returns a key unique for the given type. - - The type the key shall be unique to - The partial key to be made unique - A key formatted as typename.partialkey - - - - XML utility methods. - - Aleksandar Seovic - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - to be used for resolving external references - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - - A non-validating implementation. - - - - - Implementation of that adds error message - to the validation errors container. - - Aleksandar Seovic - - - - Abstract base class that should be extended by all - validation actions. - - -

- This class implements template Execute method - and defines OnValid and OnInvalid methods that - can be overriden - by specific validation actions. -

-
- Aleksandar Seovic -
- - - An action that should be executed after validator is evaluated. - - -

- This interface allows us to define the actions that should be executed - after validation in a generic fashion. -

-

- For example, addition of error messages to validation errors collection - is performed by one specific implementation of this interface, . -

-
- Aleksandar Seovic -
- - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Initializes a new instance of the class. - - - - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is not valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Evaluates 'when' expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - Error message resource identifier. - Names of the error providers this message should be added to. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Resolves the error message. - - Validation context to resolve message parameters against. - Additional context parameters. - Resolved error message - - - - Resolves the message parameters. - - List of parameters to resolve. - Validation context to resolve parameters against. - Additional context parameters. - Resolved message parameters. - - - - Sets the expressions that should be resolved to error message parameters. - - The expressions that should be resolved to error message parameters. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression that defines the exception to throw when the validator is not valid. - - - - Initializes a new instance of the class with an expression - that defines the exception to throw. - - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the exception to throw - - The throws. - - - - Implementation of that allows you - to define Spring.NET expressions that should be evaluated after - validation. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression to execute when validator is valid. - - The expression to execute when validator is valid. - - - - Gets or sets the expression to execute when validator is not valid. - - The expression to execute when validator is not valid. - - - - Implementation of the custom configuration parser for validator definitions. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parses the validator definition. - - Validator's identifier. - The element to parse. - The parser helper. - Validator object definition. - - - - Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with - the parsed value. - - - - - Parses and potentially registers a validator. - - - Only validators that have id attribute specified are registered - as separate object definitions within application context. - - Validator XML element. - The parser helper. - Validator object definition. - - - - Gets the name of the object type for the specified element. - - The element. - The name of the object type. - - - - Creates an error message action based on the specified message element. - - The message element. - The parser helper. - The error message action definition. - - - - Creates a generic action based on the specified element. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Creates object definition for the validator reference. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Evaluates validator test using condition evaluator. - - Aleksandar Seovic - - - - Base class that defines common properties for all single validators. - - -

- Custom single validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class that defines common properties for all validators. - - -

- Custom validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - An object that can validate application-specific objects. - - -

- The primary motivation for this interface is to enable validation to be - decoupled from the (user) interface and placed in business objects. -

-

- Application developers writing their own custom - implementations will - typically not implement this interface directly. In most cases, custom - validators woud be better served deriving from the - class, with the - custom validation ligic being implemented in an override of the - - - template method. -

-
- Aleksandar Seovic - -
- - - Validates the specified object. - - The object to validate. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Evaluates when expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Processes the error messages. - - Whether validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Gets or sets the validation actions. - - The actions that should be executed after validation. - - - - Creates a new instance of the validator without any - and criteria - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates test object. - - Object to validate. - True if specified object is valid, False otherwise. - - - - Evaluates test expression. - - Root context to use for expression evaluation. - Additional context parameters. - Result of the test expression evaluation, or validation context if test is null. - - - - Gets or sets the test expression. - - The test expression. - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Evaluates the test using condition evaluator. - - -

- Test can be any logical expression that is supported by the Spring.NET logical - expression evaluation engine, and can use any variables that can be resolved - by the variable resolver used by the validation engine. -

-
- The object to validate. - - if the supplied is valid. - -
- - - Perform credit card validations. - - - By default, all supported card types are allowed. You can specify - which credit card type validator should be used by setting - the value of property to a concrete - instance. - - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid credit card number. - - The object to validate. - - if the supplied is valid - credit card number. - - - - - Checks if the is a valid credit card number. - - - The card number to validate. - - - true if the card number is valid. - - - - - Validates card number with the specified validator. - - - Credit card number to validate. - - - true if credit card number is a valid number of credit card type specified. - - - - - Checks for a valid credit card number. - - - Credit Card Number. - - - true if the card number passes the LuhnCheck. - - - - - Credit card type validator to use. - - - Can be concrete implementations of - interface. The following are available implementations: - , , , - . - - - - - CreditCardType interface defines how validation is performed - for one type/brand of credit card. - - - - - Returns true if the card number matches this type of - credit card. - - - The card number, never null. - - - true if the number matches. - - - - - Visa credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a visa number. - - - - - American Express credit card type validation support. - - - - - Indicates, wheter the given credit card number matches an amex number. - - - - - Discover credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a discover number. - - - - - Mastercard credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a mastercard number. - - - - - Perform email validations. - - -

- This implementation is not guaranteed to catch all possible errors in an - email address. For example, an address like nobody@noplace.nowhere will - pass validator, even though there is no TLD "nowhere". - - Goran Milosavljevic - - -

- Creates a new instance of the EmailValidator class. - -
- - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid e-mail address. - - The object to validate. - - if the supplied is valid - e-mail address. - - - - - Regular expression used for validation of object passed to this . - - - - - Validates that the object is valid ISBN-10 or ISBN-13 value. - - Goran Milosavljevic - - - - Creates a new instance of the ISBNValidator class. - - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the ISBN-10 or - ISBN-13 validation rules. - - The object to validate. - - if the supplied is valid ISBN. - - - - - Validates against ISBN-10 or ISBN-13 validation - rules. - - - ISBN string to validate. - - - true if is a valid ISBN-10 or ISBN-13 code. - - - - - ISBN-10 consists of 4 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 1-5 characters, second 1-7, third 1-6, - and fourth is 1 digit or an X. - - - - - ISBN-13 consists of 5 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 978 or 979, the second group is - 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. - - - - - Validates that object matches specified regular expression. - - -

- The test expression must evaluate to a ; - otherwise, an exception is thrown. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Validates an object. - - Object to validate. - - if the supplied - object is valid. - - - If the supplied is not a - - - - - - The regular expression text to match against. - - The regular expression text. - - - - Gets or sets a value indicating whether to do a partial match instead of a full match. - Default is false. - - - - - The for the regular expression evaluation. - - The regular expression evaluation options. - - - - - Validates that required value is not empty. - - -

- This validator uses following rules to determine if target value is valid: - - - - - - - - - - - - - - - - - - - - - - - - - -
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
-

-

- You cannot use this validator to validate any value types other than the ones - specified in the table above. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a variable expression that will be evaluated and the object - obtained as a result of this evaluation will be tested using the rules described - in the class overview of the - class. - - The object to validate. - - if the supplied is valid. - - - - - Validates that the value is valid URL. - - Goran Milosavljevic - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the URL validation rules. - - The object to validate. - - if the supplied is valid. - - - - - Regular expression used for validation of object passed to this . - - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one or more of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

Note, that defaults to true for this validator type!

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class for composite validators - - - - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the child validators. - - The validators. - - - - When set true, shortcircuits evaluation. - - - Setting this property true causes the evaluation process to prematurely abort - if the end result is known. Any remaining child validators will not be considered then. - Setting this value false causes implementations to evaluate all child validators, regardless - of the potentially already known result. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - implementation that supports validating collections. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid for all of the objects in the specified collection. -

-

- You can specify if you want to validate all of the collection elements regardless of the errors by - setting the property to false. -

-

Note, that defaults to true for this validator type!

-

- If you set the IncludeElementErrors property to true, - ValidationErrors collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. -

-
- Damjan Tomic - Aleksandar Seovic -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The bool that determines if all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Validates the specified collection of objects. - If the IncludeElementErrors property was set to true, - collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. - - The collection to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the value that indicates whether to validate all elements of the collection - regardless of the errors. - - This is just an alias for property - - - - Gets or sets the value that indicates whether to capture all the errors of the specific - elements of the collection - - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one and only one of the validators in the Validators collection are valid -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

- By default, this validator group uses == true semantics. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - An interface that validation errors containers have to implement. - - Aleksandar Seovic - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied error . - - -

- If there are no errors for the supplied , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all error providers. - - - - - Allows developers to specify which validator should be used - to validate method argument. - - Damjan Tomic - Aleksandar Seovic - - - - Creates an attribute instance. - - - The name of the validator to use (must be defined within - Spring application context). - - - - - Gets the name of the validator to use. - - The name of the validator to use. - - - - A container for validation errors. - - -

- This class groups validation errors by validator names and allows - access to both the complete errors collection and to the errors for a - certain validator. -

-
- Aleksandar Seovic - Goran Milosavljevic -
- - - Default constructor. - - - - - This property is reserved, apply the - - to the class instead. - - - An that describes the - XML representation of the object that is produced by - the - method and consumed by the - - method. - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all providers. - - - - - Thrown by the validation advice if the method parameters validation fails. - - Aleksandar Seovic - - - - Creates a new instance of the ValidationException class. - - - - - Creates a new instance of the ValidationException class with - specified validation errors. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the ValidationException class with the - specified message and validation errors. - - - A message about the exception. - - - Validation errors. - - - - - Creates a new instance of the ValidationException 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 ValidationException class with the - specified message, root cause and validation errors. - - - A message about the exception. - - - The root exception that is being wrapped. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Implements object serialization. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Gets validation errors. - - Validation errors. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Represents a reference to an externally defined validator object - - -

- This class allows validation groups to reference validators that - are defined outside of the group itself. -

-

- It also allows users to narrow the context for the referenced validator - by specifying value for the Context property. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Creates a new instance of the class. - - - The expression that determines if this validator should be evaluated. - - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the name of the referenced validator. - - The name of the referenced validator. - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - 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. - -
- - + + + + Spring.Core + + + + + An abstract implementation that can + be used as base class for concrete implementations. + + Aleksandar Seovic + Erich Eichinger + + + + Defines a contract that all cache implementations have to fulfill. + + Aleksandar Seovic + Erich Eichinger + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method have no expiration time + and default cache priority. + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method use the default + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + If equals , + or is true, this cache + instance's value will be applied. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Actually does the cache implementation specific insert operation into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Gets/Set the Default time-to-live (TTL) for items inserted into this cache. + Used by + + + + + Gets/Sets a value, whether the this cache instance's + shall be applied to all items, regardless of their individual TTL + when is called. + + + + + Gets the number of items in the cache. + + + May be overridden by subclasses for cache-specific efficient implementation. + + + + + Gets a collection of all cache item keys. + + + + + Abstract base class containing shared properties for all cache attributes. + + Aleksandar Seovic + + + + The instance used to parse values. + + + + + + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + The cache key cannot evaluate be null or an empty string. + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the cache key for the item. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + Gets an expression instance that should be evaluated in order + to determine the cache key for the item. + + + An expression instance that should be evaluated in order to determine + the cache key for the item. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether the item should be cached. + + + An expression string that should be evaluated in order to determine + whether the item should be cached. + + + + + Gets an expression instance that should be evaluated in order + to determine whether the item should be cached. + + + An expression instance that should be evaluated in order to determine + whether the item should be cached. + + + + + The amount of time an object should remain in the cache. + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache + formatted to be recognizable by . + + + + + The amount of time an object should remain in the cache (in seconds). + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache (in seconds). + + + + + This attribute should be used to mark methods whose argument(s) + need to be cached. + + +

+ This attribute allows application developers to specify that an argument + of the method should be cached, but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheParameterAdvice to + all of the members that have this attribute defined. +

+

+ You can specify this attribute multiple times on the same method in order to + cache several method parameters. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark methods whose result + needs to be cached. + + +

+ This attribute allows application developers to mark that a result + of the method invocation should be cached, but it will not do any + caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used with methods that return an + in order to cache each item separately. + + +

+ This attribute allows application developers to specify that each item + from the collection returned by the method should be cached, + but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark method that should + invalidate one or more cache items when invoked. + + +

+ This attribute allows application developers to specify that some + cache items should be evicted from cache when the method is invoked, + but it will not do any eviction by itself. +

+

+ In order to actually evict cache items, an application developer + must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression string that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether items should be evicted. + + + An expression string that should be evaluated in order to determine + whether items should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine whether items should be evicted. + + + An expression instance that should be evaluated in order to determine + whether items should be evicted. + + + + + A simple implementation backed by a dictionary that + never expires cache items. + + Aleksandar Seovic + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL) in milliseconds. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + +

DictionarySet is an abstract class that supports the creation of new Set + types where the underlying data store is an IDictionary instance.

+ +

You can use any object that implements the IDictionary interface to hold set data. + You can define your own, or you can use one of the objects provided in the Framework. + The type of IDictionary you choose will affect both the performance and the behavior + of the Set using it.

+ +

To make a Set typed based on your own IDictionary, simply derive a + new class with a constructor that takes no parameters. Some Set implmentations + cannot be defined with a default constructor. If this is the case for your class, + you will need to override Clone() as well.

+ +

It is also standard practice that at least one of your constructors takes an ICollection or + an ISet as an argument.

+
+
+ +

A collection that contains no duplicate elements. This class models the mathematical + Set abstraction, and is the base class for all other Set implementations. + The order of elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + Operator + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + | + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + & + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + ^ + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + - + + +
+
+ + +

A collection that contains no duplicate elements. This interface models the mathematical + Set abstraction. + The order of elements in a set is dependent on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guaranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns if this set contains no elements. + + + + + A collection that contains no duplicate elements. + + +

+ This interface models the mathematical + abstraction. The order of + elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various + methods, and thus is not + guaranteed. +

+

+ overrides the + method to test for "equivalency": + whether the two sets contain the same elements. The "==" and "!=" + operators are not overridden by design, since it is often desirable to + compare object references for equality. +

+

+ Also, the method is not + implemented on any of the set implementations, since none of them are + truly immutable. This is by design, and it is the way almost all + collections in the .NET framework function. So as a general rule, don't + store collection objects inside + instances. You would typically want to use a keyed + instead. +

+

+ None of the implementations in + this library are guaranteed to be thread-safe in any way unless wrapped + in a . +

+

+ The following table summarizes the binary operators that are supported + by the class. +

+ + + Operation + Description + Method + + + Union (OR) + + Element included in result if it exists in either A OR + B. + + Union() + + + Intersection (AND) + + Element included in result if it exists in both A AND + B. + + InterSect() + + + Exclusive Or (XOR) + + Element included in result if it exists in one, but not both, + of A and B. + + ExclusiveOr() + + + Minus (n/a) + + Take all the elements in A. Now, if any of them exist in + B, remove them. Note that unlike the other operators, + A - B is not the same as B - A. + + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + +

+ That is, the element is included if it is in either + or this set. Neither this set nor the input + set are modified during the operation. The return value is a + clone of this set with the extra elements added in. +

+
+ A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included if it exists in both sets. The + Intersect() operation does not modify the input sets. It + returns a clone of this set with the appropriate elements + removed. +

+
+ A set of elements. + + The intersection of this set with . + +
+ + + Performs a "minus" of this set from the + set. + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + this set. The original sets are not modified during this operation. + The result set is a clone of this + containing the elements from + the operation. +

+
+ A set of elements. + + A set containing the elements from this set with the elements in + removed. + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of this set containing the elements + from the exclusive-or operation. +

+
+ A set of elements. + + A set containing the result of + ^ this. + +
+ + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains no elements. + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns a clone of the Set instance. This will work for derived Set + classes if the derived class implements a constructor that takes no arguments. + + A clone of this object. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the Set is synchronized across threads. Note that + enumeration is inherently not thread-safe. Use the SyncRoot to lock the + object during enumeration. + + + + + An object that can be used to synchronize this collection to make it thread-safe. + When implementing this, if your object uses a base object, like an IDictionary, + or anything that has a SyncRoot, return that object instead of "this". + + + + + Indicates whether the given instance is read-only or not + + + if the ISet is read-only; otherwise, . + In the default implementation of Set, this property always returns false. + + + + + Provides the storage for elements in the Set, stored as the key-set + of the IDictionary object. Set this object in the constructor + if you create your own Set class. + + + + + Adds the specified element to this set if it is not already present. + + The to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. Needed for + non-generic ISet methods implementation + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + The placeholder object used as the value for the IDictionary instance. + + + There is a single instance of this object globally, used for all Sets. + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + None of the objects based on DictionarySet are synchronized. Use the + SyncRoot property instead. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates wether the Set is read-only or not + + + + + Implements a Set based on a Dictionary (which is equivalent of + non-genric HashTable) This will give the best lookup, add, and remove + performance for very large data-sets, but iteration will occur in no particular order. + + + + + Creates a new set instance based on a Dictinary. + + + + + Creates a new set instance based on a Dictinary and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + +

Implements an immutable (read-only) Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + basisSet can still change the data-set. So GetHashCode() is not implemented + for this Set, as is the case for all Set implementations in this library. + This design decision was based on the efficiency of not having to Clone() the + basisSet every time you wrap a mutable Set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + nothing + is always thrown + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + nothing + is always thrown + + + + Removes all objects from the set. + + is always thrown + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + nothing + is always thrown + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + nothing + is always thrown + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + nothing + is always thrown + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns an object that can be used to synchronize use of the Set across threads. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates that the given instance is read-only + + + + + Implements an ordered Set based on a dictionary. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + A collection of elements that defines the initial set contents. + + + + Represents a read only wrapper around a generic IDictionary. The design pattern + mirrors ReadOnlyCollection, and follows the apparent pattern that write operations + do not throw an exception, but simply make no change to the underlying collection. + + Originally put into the public domain. + http://www.simple-talk.com/community/forums/thread/2263.aspx + + + + Original from Public Domain + Mark Pollack (.NET) + + + + Inner storage for ReadOnlyDictionary + + + + + Easy access to non-generic dictionary API + + + + + Initializes a new instance of the class. + + The dictionary to wrap. + + + + Add does not change a read only Dictionary + + The object to use as the key of the element to add. + The object to use as the value of the element to add. + The is read-only. + + + + Determines whether the contains an element with the specified key. + + The key to locate in the . + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Remove does not change a read only Dictionary, will throw an exception. + + The is read-only. + + + + Tries the get value. + + The key. + The value. + + + + + Add does not change a read only Dictionary + + The object to add to the . + The is read-only. + + + + Clear does not change a read only Dictionary. + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if item is found in the ; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + arrayIndex is less than 0. + array is null. + array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. + + + + Remove does not change a read only Dictionary. Throws an exception + + The object to remove from the . + + true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . + + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Add does not change a read only Dictionary. Throws an exception. + + The to use as the key of the element to add. + The to use as the value of the element to add. + The is read-only.-or- The has a fixed size. + + + + Determines whether the object contains an element with the specified key. + + The key to locate in the object. + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Returns an object for the object. + + + An object for the object. + + + + + Remove does not change a read only Dictionary. Throws an exception. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. + + + + Runs when the entire object graph has been deserialized. + + The object that initiated the callback. The functionality for this parameter is not currently implemented. + + + + Populates a with the data needed to serialize the target object. + + The to populate with data. + The destination (see ) for this serialization. + The caller does not have the required permission. + + + + Gets a read only containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the value with the specified key. + Set will throw an exception + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + Gets an containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the with the specified key. Set throws an exception. + + + The is read-only. + if try to set value + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + Implements a Set based on a sorted tree. This gives good performance for operations on very + large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration + occurs in order. Elements that you put into this type of collection must implement IComparable, + and they must actually be comparable. You can't mix string and int values, for example. + + + + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree. + + The to use for sorting. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + The to use for sorting. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe Set wrapper. + + The Set object that this object will wrap. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot + to synchronize the entire enumeration process. + + + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns , indicating that this object is thread-safe. The exception to this + is enumeration, which is inherently not thread-safe. Use the SyncRoot object to + lock this object for the entire duration of the enumeration. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates whether given instace is read-only or not + + + + + This class provides skeletal implementations of some + operations. + + +

+ The implementations in this class are appropriate when the base + implementation does not allow elements. The methods + , + , and + are based on + the , + , and + methods + respectively but throw exceptions instead of indicating failure via + or returns. +

+ An implementation that extends this class must + minimally define a method + which does + not permit the insertion of elements, along with methods + , and + . Typically, + additional methods will be overridden as well. If these requirements + cannot be met, consider instead subclassing + }. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + A collection designed for holding elements prior to processing. + + +

+ Besides basic operations, + queues provide additional insertion, extraction, and inspection + operations. +

+

+ Each of these methods exists in two forms: one throws + an exception if the operation fails, the other returns a special + value (either or , depending on the + operation). The latter form of the insert operation is designed + specifically for use with capacity-restricted + implementations; in most implementations, insert operations cannot + fail. +

+

+ Queues typically, but do not necessarily, order elements in a + FIFO (first-in-first-out) manner. Among the exceptions are + priority queues, which order elements according to a supplied + comparator, or the elements' natural ordering, and LIFO queues (or + stacks) which order the elements LIFO (last-in-first-out). + Whatever the ordering used, the head of the queue is that + element which would be removed by a call to + or + . In a FIFO queue, all new + elements are inserted at the tail of the queue. Other kinds of queues may + use different placement rules. Every implementation + must specify its ordering properties. +

+

+ The method inserts an + element if possible, otherwise returning . This differs from the + method, which can fail to + add an element only by throwing an exception. The + method is designed for + use when failure is a normal, rather than exceptional occurrence, for example, + in fixed-capacity (or "bounded" queues. +

+

+ The + methods remove and + return the head of the queue. Exactly which element is removed from the + queue is a function of the queue's ordering policy, which differs from + implementation to implementation. The + and + methods differ only in their + behavior when the queue is empty: the + method throws an exception, + while the method returns + . +

+

+ The and + methods return, but do + not remove, the head of the queue. +

+

+ The interface does not define the blocking queue + methods, which are common in concurrent programming. +

+

+ implementations generally do not allow insertion + of elements, although some implementations, such as + a linked list, do not prohibit the insertion of . + Even in the implementations that permit it, should + not be inserted into a , as is also + used as a special return value by the + method to + indicate that the queue contains no elements. +

+

+ implementations generally do not define + element-based versions of methods + and , but instead inherit the + identity based versions from the class object, because element-based equality + is not always well-defined for queues with the same elements but different + ordering properties. +

+

+ Based on the back port of JCP JSR-166. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the class of the supplied prevents it + from being added to this queue. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue + + if this queue is empty +
+ + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue. + + If this queue is empty. +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Returns if there are no elements in the , otherwise. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Inserts the specified element into this queue if it is possible + to do so immediately without violating capacity restrictions. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that + it throws an exception if this queue is empty. +

+
+ + The head of this queue + + + If this queue is empty. + +
+ + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+

+ ALso note that this implementation returns the result of + unless the queue + is empty. +

+
+ The head of this queue. + + If this queue is empty. + +
+ + + Removes all of the elements from this queue. + + +

+ The queue will be empty after this call returns. +

+

+ This implementation repeatedly invokes + until it + returns . +

+
+
+ + + Adds all of the elements in the supplied + to this queue. + + +

+ Attempts to + + of a queue to itself result in . + Further, the behavior of this operation is undefined if the specified + collection is modified while the operation is in progress. +

+

+ This implementation iterates over the specified collection, + and adds each element returned by the iterator to this queue, in turn. + An exception encountered while trying to add an element (including, + in particular, a element) may result in only some + of the elements having been successfully added when the associated + exception is thrown. +

+
+ + The collection containing the elements to be added to this queue. + + + if this queue changed as a result of the call. + + + If the supplied or any one of its elements are . + + + If the collection is the current or + the collection size is greater than the queue capacity. + +
+ + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Returns if there are no elements in the , otherwise. + + + + + Returns the current capacity of this queue. + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. + + Erich Eichinger + + + + Creates a case-insensitive hashtable using . + + + + + Creates a case-insensitive hashtable using the given . + + the to calculate the hashcode + + + + Creates a case-insensitive hashtable using the given , initially + populated with entries from another dictionary. + + the dictionary to copy entries from + the to calculate the hashcode + + + + Initializes a new, empty instance of the class that is serializable using the specified and objects. + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the object. + info is null. + + + + Implements the interface and returns the data needed to serialize the . + + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the . + info is null. + + + + Calculate the hashcode of the given string key, using the configured culture. + + + + + + + Compares two keys + + + + + Creates a shallow copy of the current instance. + + + + + is an + class that supports the creation of new + types where the underlying data + store is an instance. + + +

+ You can use any object that implements the + interface to hold set + data. You can define your own, or you can use one of the objects + provided in the framework. The type of + you + choose will affect both the performance and the behavior of the + using it. +

+

+ This object overrides the method, + but not the method, because + the class is mutable. + Therefore, it is not safe to use as a key value in a dictionary. +

+

+ To make a typed based on your + own , simply derive a new + class with a constructor that takes no parameters. Some + implmentations cannot be defined + with a default constructor. If this is the case for your class, you + will need to override clone as well. +

+

+ It is also standard practice that at least one of your constructors + takes an or an + as an argument. +

+
+ +
+ + + A collection that contains no duplicate elements. + + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs a "union" of two sets, where all the elements in both are + present. + + +

+ That is, the element is included if it is in either + or . The return + value is a clone of one of the sets ( + if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. +

+
+ A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + +
+ + + Performs a "union" of two sets, where all the elements in both are + present. + + A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included only if it exists in both + and . Neither input + object is modified by the operation. The result object is a + clone of one of the input objects ( + if it is not ) containing the elements from + the intersect operation. +

+
+ A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs a "minus" of set from set + . + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + set . The original sets are not modified + during this operation. The result set is a clone of set + containing the elements from the operation. +

+
+ A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + +
+ + + Performs a "minus" of set from set + . + + A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of one of the sets ( + if it is not ) + containing the elements from the exclusive-or operation. +

+
+ A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Returns a clone of the + instance. + + +

+ This will work for derived + classes if the derived class implements a constructor that takes no + arguments. +

+
+ A clone of this object. +
+ + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + This method will test the + against another for + "equality". + + +

+ In this case, "equality" means that the two sets contain the same + elements. The "==" and "!=" operators are not overridden by design. + If you wish to check for "equivalent" + instances, use + Equals(). If you wish to check to see if two references are + actually the same object, use "==" and "!=". +

+
+ + A object to compare to. + + + if the two sets contain the same elements. + +
+ + + Gets the hashcode for the object. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + +

+ When implementing this, if your object uses a base object, like an + , or anything that has + a SyncRoot, return that object instead of "this". +

+
+ + An object that can be used to synchronize this collection to make + it thread-safe. + +
+ + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Provides the storage for elements in the + , stored as the key-set + of the object. + + +

+ Set this object in the constructor if you create your own + class. +

+
+
+ + + The placeholder object used as the value for the + instance. + + + There is a single instance of this object globally, used for all + s. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Implements an based on a + hash table. + + +

+ This will give the best lookup, add, and remove performance for very + large data-sets, but iteration will occur in no particular order. +

+
+ +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class, and + initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an that automatically + changes from a list based implementation to a hashtable based + implementation when the size reaches a certain threshold. + + +

+ This is good if you are unsure about whether you data-set will be tiny + or huge. +

+ + Because this uses a dual implementation, iteration order is not + guaranteed! + +
+ +
+ + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size, and initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an immutable (read-only) + wrapper. + + +

+ Although this class is advertised as immutable, it really isn't. + Anyone with access to the wrapped + can still change the data. So + is not implemented for this , as + is the case for all + implementations in this library. This design decision was based on the + efficiency of not having to clone the wrapped + every time you wrap a mutable + . +

+
+
+ + + Constructs an immutable (read-only) + wrapper. + + + The that is to be wrapped. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + + Removes all objects from this set. + + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the + instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + Simple linked list implementation. + + Simon White + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class that contains all + elements of the specified list. + + + A list of elements that defines the initial contents. + + + + + Removes the object at the specified index. + + The lookup index. + + If the specified is greater than the + number of objects within the list. + + + + + Inserts an object at the specified index. + + The lookup index. + The object to be inserted. + + If the specified is greater than the + number of objects within the list. + + + + + Removes the first instance of the specified object found. + + The object to remove + + + + Returns if this list contains the specified + element. + + The element to look for. + + if this list contains the specified element. + + + + + Removes all objects from the list. + + + + + Returns the index of the first instance of the specified + found. + + The object to search for + + The index of the first instance found, or -1 if the element was not + found. + + + + + Adds the specified object to the end of the list. + + The object to add + The index that the object was added at. + + + + Adds all of the elements of the supplied + list to the end of this list. + + The list of objects to add. + + + + Checks whether the list can be modified. + + + If the list cannot be modified. + + + + + Validates the specified index. + + The lookup index. + + If the index is invalid. + + + + + Returns the node at the specified index. + + The lookup index. + The node at the specified index. + + If the specified is greater than the + number of objects within the list. + + + + + Returns the node (and index) of the first node that contains + the specified value. + + The value to search for. + + The node, or if not found. + + + + + Removes the specified node. + + The node to be removed. + + + + Copies the elements in this list to an array. + + +

+ The type of array needs to be compatible with the objects in this + list, obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + + + If the supplied is . + + + If the supplied is less than zero + or is greater than the length of . + + + If the supplied is of insufficient size. + +
+ + + Gets an enumerator for the elements in the + . + + +

+ Enumerators are fail fast. +

+
+ + An over the elements + in the . + +
+ + + Is list read only? + + + if the list is read only. + + + + + Returns the node at the specified index. + + +

+ This is the indexer for the + class. +

+
+ +
+ + + Is the list a fixed size? + + + if the list is a fixed size list. + + + + + Returns if the list is synchronized across + threads. + + + + This implementation always returns . + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + The number of objects within the list. + + + + + An object that can be used to synchronize this + to make it thread-safe. + + + An object that can be used to synchronize this + to make it thread-safe. + + + + + Implements a based on a list. + + +

+ Performance is much better for very small lists than either + or . + However, performance degrades rapidly as the data-set gets bigger. Use a + instead if you are not sure your data-set + will always remain very small. Iteration produces elements in the order they were added. + However, element order is not guaranteed to be maintained by the various + mathematical operators. +

+
+
+ + + Creates a new set instance based on a list. + + + + + Creates a new set instance based on a list and initializes it based on a + collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Thrown when an element is requested from an empty . + + Griffin Caprio + + + + Creates a new instance of the + class. + + + + + 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. + + + + + 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. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + An unbounded priority based on a priority + heap. This queue orders elements according to an order specified + at construction time, which is specified either according to their + natural order (see , or according to a + , depending on which constructor is + used. A priority queue does not permit elements. + A priority queue relying on natural ordering also does not + permit insertion of non-comparable objects (doing so will result + . + +

+ The head of this queue is the lowest element + with respect to the specified ordering. If multiple elements are + tied for lowest value, the head is one of those elements -- ties are + broken arbitrarily. + +

+ A priority queue is unbounded, but has an internal + capacity governing the size of an array used to store the + elements on the queue. It is always at least as large as the queue + size. As elements are added to a priority queue, its capacity + grows automatically. The details of the growth policy are not + specified. + +

+ This class and its enumerator implement all of the + optional methods of the and + interfaces. + The enumerator provided in method + is not guaranteed to traverse the elements of the PriorityQueue in any + particular order. + +

+ Note that this implementation is NOT synchronized. + Multiple threads should not access a + instance concurrently if any of the threads modifies the list + structurally. Instead, use the thread-safe PriorityBlockingQueue. +

+ Josh Bloch + Griffin Caprio (.NET) +
+ + + Priority queue represented as a balanced binary heap: the two children + of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is + ordered by comparator, or by the elements' natural ordering, if + comparator is null: For each node n in the heap and each descendant d + of n, n <= d. + + The element with the lowest value is in queue[1], assuming the queue is + nonempty. (A one-based array is used in preference to the traditional + zero-based array to simplify parent and child calculations.) + + queue.length must be >= 2, even if size == 0. + + + + The number of elements in the priority queue. + + + + The comparator, or null if priority queue uses elements' + natural ordering. + + + + + The number of times this priority queue has been + structurally modified. + + + + + Creates a with the default initial capacity + (11) that orders its elements according to their natural + ordering (using ). + + + + + Creates a with the specified initial capacity + that orders its elements according to their natural ordering + (using ). + + the initial capacity for this priority queue. + + if is less than 1. + + + + Creates a with the specified initial capacity + that orders its elements according to the specified comparator. + + the initial capacity for this priority queue. + the comparator used to order this priority queue. + If then the order depends on the elements' natural ordering. + + if is less than 1. + + + + Creates a containing the elements in the + specified collection. The priority queue has an initial + capacity of 110% of the size of the specified collection or 1 + if the collection is empty. If the specified collection is an + instance of a , the priority queue will be sorted + according to the same comparator, or according to its elements' + natural order if the collection is sorted according to its + elements' natural order. Otherwise, the priority queue is + ordered according to its elements' natural order. + + the collection whose elements are to be placed into this priority queue. + if elements of cannot be + compared to one another according to the priority queue's ordering + if or any element with it is + + + + + + Common code to initialize underlying queue array across + constructors below. + + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Amount of bits to shift + The resulting number from the shift operation + + + + Establishes the heap invariant assuming the heap + satisfies the invariant except possibly for the leaf-node indexed by k + (which may have a nextExecutionTime less than its parent's). + + + This method functions by "promoting" queue[k] up the hierarchy + (by swapping it with its parent) repeatedly until queue[k] + is greater than or equal to its parent. + + + + + Establishes the heap invariant (described above) in the subtree + rooted at k, which is assumed to satisfy the heap invariant except + possibly for node k itself (which may be greater than its children). + + + This method functions by "demoting" queue[k] down the hierarchy + (by swapping it with its smaller child) repeatedly until queue[k] + is less than or equal to its children. + + + + + Establishes the heap invariant in the entire tree, + assuming nothing about the order of the elements prior to the call. + + + + + Returns the of or - 1, + whichever is smaller. + + base size + percentage to return + of + + + + Initially fill elements of the queue array under the + knowledge that it is sorted or is another , in which + case we can just place the elements in the order presented. + + + + + Initially fill elements of the queue array that is not to our knowledge + sorted, so we must rearrange the elements to guarantee the heap + invariant. + + + + + Removes and returns element located at from queue. (Recall that the queue + is one-based, so 1 <= i <= size.) + + + Normally this method leaves the elements at positions from 1 up to i-1, + inclusive, untouched. Under these circumstances, it returns . + Occasionally, in order to maintain the heap invariant, it must move + the last element of the list to some index in the range [2, i-1], + and move the element previously at position (i/2) to position i. + Under these circumstances, this method returns the element that was + previously at the end of the list and is now at some position between + 2 and i-1 inclusive. + + + + Resize array, if necessary, to be able to hold given index + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + and this queue does not permit + elements. + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + + + Removes a single instance of the specified element from this + queue, if it is present. + + + + + Returns an over the elements in this queue. + The enumerator does not return the elements in any particular order. + + an enumerator over the elements in this queue. + + + + Removes all elements from the priority queue. + The queue will be empty after this call returns. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Queries the queue to see if it contains the specified + + element to look for. + if the queue contains the , + otherwise. + + + Returns the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering + (using ). + + + the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering. + + + + + Save the state of the instance to a stream (that + is, serialize it). + + The length of the array backing the instance is + emitted (int), followed by all of its elements (each an + ) in the proper order. + + the stream + the context + + + + Reconstitute the instance from a stream (that is, + deserialize it). + + the stream + the context + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Copies the elements of the to an , starting at index 0. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Gets the Capacity of this queue. Will equal + + + + + Returns the queue count. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Returns if there are no elements in the , otherwise. + + + + + Index (into queue array) of element to be returned by subsequent call to next. + + + + + Implements an based on a sorted + tree. + + +

+ This gives good performance for operations on very large data-sets, + though not as good - asymptotically - as a + . However, iteration occurs + in order. +

+

+ Elements that you put into this type of collection must implement + , and they must actually be comparable. + You can't mix and + values, for example. +

+

+ This implementation does + not support elements that are . +

+
+ +
+ + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree using for ordering. + + + + + Creates a new set instance based on a sorted tree and initializes + it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Synchronized that should be returned by synchronized + dictionary implementations in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that should be returned by synchronized + collections in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that, unlike hashtable created + using method, synchronizes + reads from the underlying hashtable in addition to writes. + + +

+ In addition to synchronizing reads, this implementation also fixes + IEnumerator/ICollection issue described at + http://msdn.microsoft.com/en-us/netframework/aa570326.aspx + (search for SynchronizedHashtable for issue description), by implementing + interface explicitly, and returns thread safe enumerator + implementations as well. +

+

+ This class should be used whenever a truly synchronized + is needed. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of + + + + + Initializes a new instance of + + + + + Initializes a new instance of , copying initial entries from + handling keys depending on . + + + + + Creates a instance that + synchronizes access to the underlying . + + the hashtable to be synchronized + + + + Creates a wrapper that synchronizes + access to the passed . + + the hashtable to be synchronized + + + + Adds an element with the provided key and value to the object. + + The to use as the value of the element to add. + The to use as the key of the element to add. + An element with the same key already exists in the object. + key is null. + The is read-only.-or- The has a fixed size. 2 + + + + Removes all elements from the object. + + The object is read-only. 2 + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + + Determines whether the object contains an element with the specified key. + + + true if the contains an element with the key; otherwise, false. + + The key to locate in the object. + key is null. 2 + + + + Returns, whether this contains an entry with the specified . + + The key to look for + , if this contains an entry with this + + + + Returns, whether this contains an entry with the specified . + + The value to look for + , if this contains an entry with this + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + The type of the source cannot be cast automatically to the type of the destination array. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 + + + + Returns an object for the object. + + + An object for the object. + + + + + Removes the element with the specified key from the object. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + key is null. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Gets a value indicating whether the object is read-only. + + + true if the object is read-only; otherwise, false. + + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Gets an object containing the keys of the object. + + + An object containing the keys of the object. + + + + + Gets an object containing the values in the object. + + + An object containing the values in the object. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets or sets the element with the specified key. + + + The element with the specified key. + + The key of the element to get or set. + The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. + key is null. 2 + + + + Implements a thread-safe wrapper. + + +

+ The implementation is extremely conservative, serializing critical + sections to prevent possible deadlocks, and locking on everything. The + one exception is for enumeration, which is inherently not thread-safe. + For this, you have to lock the SyncRoot object for the + duration of the enumeration. +

+
+ +
+ + + Constructs a thread-safe + wrapper. + + + The object that this object + will wrap. + + + If the supplied ecposes a + SyncRoot value. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the instance. + + A clone of this object. + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Abstract Type Filter that provides methods to load a required type from assembly. + + + + + Represents the base interface for all component-scan type filters + + + + + Determine a match based on the given type object. + + + true if there is a match; false is there is no match + + + + Required Type to compare against provided Type + + + + + Determine a match based on the given type object. + + + true if there is a match; false is there is no match + + + + Is loading a Type from a string passed to method in the form [Type.FullName], [Assembly.Name] + + + + + A simple filter which matches classes that are assignable to a given type. + + + + + Create a Type Filter with required type + + type name including assembly name + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + A simple filter which matches classes with a given attribute, + checking inherited annotations as well. + + + + + Creates a Type Filter with required type attribute + + + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + Creates a new instance of a given type string + + + + + Creates a new instance of given type filter type string + + Custom type filter to create + An instance of ITypeFilter or NULL if no instance can be created + + + + Creates a new instance of given name generator type string + + Custom type name generator string to create + An instance of IObjectNameGenerator or NULL if no instance can be created + + + + A simple filter for matching a fully-qualified class name with a regex + + + + + Creates a type filter with provided pattern + + Regex pattern + + + + Determine a match based on the given type object. + + Type to compare against + true if there is a match; false is there is no match + + + + Returns a string that represents the current object. + + + A string that represents the current object. + + 2 + + + + AssemblyTypeScanner that only accepts types that also meet the requirements of being ObjectDefintions. + + + + + AssemblyTypeScanner that provides for applying a final hard-coded Required Constraint to all types found in the the scanned assemblies + in addition to respecting the constraints passed to it during its configuration. + + + + + Scans Assebmlies for Types that satisfy a given set of constraints. + + + + + Scanner that can filter types from assemblies based on constraints. + + + + + Add the Assembly containing the specified . + + + + + + + Adds the predicate to the assembly filter constraints. + + The assembly predicate. + + + + + Adds the predicte to the include filter for . + + The predicate. + + + + + Adds the predicte to the exclude filter for . + + The predicate. + + + + + Includes the specific types. + + The types. + + + + + Includes the type. + + The to include. + + + + + Excludes the type. + + The to exclude. + + + + + Perform the Scan, applying all provided + + + + + + Logger Instance. + + + + + Names of Assemblies to exclude from being loaded for scanning. + + + + + Names of Assemblies to include for scanning. + + + + + Assembly Inclusion Predicates. + + + + + Type Exclusion Predicates. + + + + + Type Exclusion Predicates. + + + + + Type Inclusion Predicates. + + + + + Type Inclusion TypeFilters. + + + + + Assemblies to scan. + + + + + Stores the object default definitons defined in the XML configuration documnet + + + + + Assemblies the type of the having. + + + + + + + Excludes the type. + + + + + + + Includes the type. + + + + + + + Includes the types. + + The type source. + + + + + Performs the Scan, respecting all filter settings. + + + + + + Adds the assembly filter. + + The assembly predicate. + + + + + Adds the exclude filter. + + The predicate. + + + + + Adds the exclude filter. + + The type filter. + + + + + Adds the include filter. + + The predicate. + + + + + Adds the include filter. + + The filter type. + + + + + Applies the assembly filters to the assembly candidates. + + The assembly candidates. + + + + + Determines whether the compound predicate is satisfied by the specified type. + + The type. + + true if the compound predicate is satisfied by the specified type; otherwise, false. + + + + + Determines whether [is excluded type] [the specified type]. + + The type. + + true if [is excluded type] [the specified type]; otherwise, false. + + + + + Determines whether [is included assembly] [the specified assembly]. + + The assembly. + + true if [is included assembly] [the specified assembly]; otherwise, false. + + + + + Determines whether [is included type] [the specified type]. + + The type. + + true if [is included type] [the specified type]; otherwise, false. + + + + + Sets the default filters. + + + + + Loads the assemblies found. + + The folder path. + The extension. + + + + Stores the object default definitons defined in the XML configuration documnet + + + + + Determines whether the compound predicate is satisfied by the specified type. + + The type. + + true if the compound predicate is satisfied by the specified type; otherwise, false. + + + + + Determines whether the required constraint is satisfied by the specified type. + + The type. + + true if the required constraint is satisfied by the specified type; otherwise, false. + + + + + Registers the defintions for types. + + The registry. + The types to register. + + + + Applies the assembly filters to the assembly candidates. + + The assembly candidates. + + + + + Determines whether the specified candidate is and excluded assembly. + + The candidate. + + true if the specified candidate is an excluded assembly ; otherwise, false. + + + + + Determines whether the required constraint is satisfied by the specified type. + + The type. + + true if the required constraint is satisfied by the specified type; otherwise, false. + + + + + Sets the default filters. + + + + + Scans the and register types. + + The registry within which to register the types. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The assemblies to include predicates. + + + + Initializes a new instance of the class. + + The names of assemblies to include. + + + + Provides the name generator for all scanned objects. + Default is + + + + + Represents a collection of Types. + + + + + Logger Instance. + + + + + Initializes a new instance of the class. + + The assembly. + + + + Gets the enumerator. + + + + + + Utility class that allows for convenient registration of common + and definitions for attribute based configuration + + + + + Mark Pollack (.NET) + Mark Fisher + Juergen Hoeller + Chris Beams + + + + The object name of the internally managed Configuration attribute processor. + + + + + The object name of the internally managed Autowire attribute processor + + + + + The object name of the internally managed Required attribute processor. + + + + + The object name of the internally managed InitDestroy attribute processor. + + + + + Registers the attribute config processors. + + The registry. + + + + Default Name Generator for attribute driven component scan. + + First choice is the provided name of the Component attribute. + Fallback is the short type name. + + + + + Strategy interface for generating object names for object definitions + + Juergen Hoeller + Mark Pollack (.NET) + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + + the generated object name + + + + + Indicates that a class declares one or more methods and may be processed + by the Spring container to generate object definitions and service requests for those objects + at runtime. + + Configuration is meta-annotated as a , therefore Configuration + classes are candidates for component-scanning. + + May be used in conjunction with the attribute to indicate that all object + methods declared within this class are by default lazily initialized. + +

Constraints

+
    +
  • Configuration classes must be non-sealed
  • +
  • Configuration classes must have a default/no-arg constructor
  • +
+
+
+ + + Indicates that an annotated class is a "component". + Such classes are considered as candidates for future features such + as auto-detection when using attribute-based configuration and assembly scanning. + + Other class-level annotations may be considered as identifying + a component as well, typically a special kind of component: + e.g. the Repository attribute. + + Mark Fisher + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the component. + + + + Gets or sets the name of the component + + The name of the component. + + + + Initializes a new instance of the ConfigurationAttribute class. + + + + + Initializes a new instance of the Configuration class. + + + + + + Represents an instance of the metadata that has been parsed from a class with the applied to it. + + + + + Initializes a new instance of the ConfigurationClass class. + + + + + + + Adds the imported resource. + + The imported resource. + The reader class capable of interpreting the imported resource. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Validates the specified and reports all discovered violations to the provided problem reporter for appropriate action. + + The problem reporter. + + + + Gets the type of the configuration class. + + The type of the configuration class. + + + + Gets the imported resources. + + The imported resources. + + + + Gets the methods. + + The methods. + + + + Gets or sets the name of the object. + + The name of the object. + + + + Gets the resource. + + The resource. + + + + Gets the SimpleName of the object. + + The simple name. + + + + Initializes a new instance of the class. + + The message. + The location. + + + + Initializes a new instance of the Problem class. + + + + + + + + Implementation of the IResource that represents an assembly containing one or more resources. + + + + + The central abstraction for Spring.NET's access to resources such as + s. + + +

+ This interface encapsulates a resource descriptor that abstracts away + from the underlying type of resource; possible resource types include + files, memory streams, and databases (this list is not exhaustive). +

+

+ A can definitely be opened and accessed + for every such resource; if the resource exists in a physical form (for + example, the resource is not an in-memory stream or one that has been + extracted from an assembly or ZIP file), a or + can also be accessed. The actual + behavior is implementation-specific. +

+

+ This interface, when used in tandem with the + interface, forms the backbone of + Spring.NET's resource handling. Third party extensions or libraries + that want to integrate external resources with Spring.NET's IoC + container are encouraged expose such resources via this abstraction. +

+

+ Interfaces cannot obviously mandate implementation, but derived classes + are strongly encouraged to expose a constructor that takes a + single as it's sole argument (see example). + Exposing such a constructor will make your custom + implementation integrate nicely + with the class. +

+
+ Juergen Hoeller + Rick Evans (.NET) + + +
+ + + Simple interface for objects that are sources for + s. + + +

+ This is the base interface for the abstraction encapsulated by + Spring.NET's interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Return an for this resource. + + + + Clients of this interface must be aware that every access of this + property will create a fresh ; + it is the responsibility of the calling code to close any such + . + + + + An . + + + If the stream could not be opened. + + + + + Creates a resource relative to this resource. + + + The path (always resolved as relative to this resource). + + + The relative resource. + + + If the relative resource could not be created from the supplied + path. + + + If the resource does not support the notion of a relative path. + + + + + Does this resource represent a handle with an open stream? + + +

+ If , the + cannot be read multiple times, and must be read and then closed to + avoid resource leaks. +

+

+ Will be for all usual resource descriptors. +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + +
+ + + Returns a handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available on a filesystem, or cannot be + exposed as a handle. + + + +
+ + + Returns a description for this resource. + + +

+ The description is typically used for diagnostics and other such + logging when working with the resource. +

+

+ Implementations are also encouraged to return this value from their + method. +

+
+ + A description for this resource. + +
+ + + Does this resource actually exist in physical form? + + +

+ An example of a resource that physically exists would be a + file on a local filesystem. An example of a resource that does not + physically exist would be an in-memory stream. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + Initializes a new instance of the class. + + The type. + + + + Creates a resource relative to this resource. + + The path (always resolved as relative to this resource). + The relative resource. + + If the relative resource could not be created from the supplied + path. + + + If the resource does not support the notion of a relative path. + + + + + Does this resource represent a handle with an open stream? + + + if this resource represents a handle with an + open stream. + + +

+ If , the + cannot be read multiple times, and must be read and then closed to + avoid resource leaks. +

+

+ Will be for all usual resource descriptors. +

+
+ +
+ + + Returns the handle for this resource. + + The handle for this resource. + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + If the resource is not available or cannot be exposed as a + . + + + +
+ + + Returns a handle for this resource. + + + The handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + If the resource is not available on a filesystem, or cannot be + exposed as a handle. + + + +
+ + + Returns a description for this resource. + + A description for this resource. + +

+ The description is typically used for diagnostics and other such + logging when working with the resource. +

+

+ Implementations are also encouraged to return this value from their + method. +

+
+
+ + + Does this resource actually exist in physical form? + + + if this resource actually exists in physical + form (for example on a filesystem). + + +

+ An example of a resource that physically exists would be a + file on a local filesystem. An example of a resource that does not + physically exist would be an in-memory stream. +

+
+ + +
+ + + Return an for this resource. + + An . + + + Clients of this interface must be aware that every access of this + property will create a fresh + ; + it is the responsibility of the calling code to close any such + . + + + + If the stream could not be opened. + + + + + Enhances Configuration classes by generating a dynamic proxy capable of + interacting with the Spring container to respect object semantics. + + Chris Beams + Juergen Hoeller + Bruno Baia (.NET) + + + + + Creates a new instance of the class. + + + The supplied ObjectFactory to check for the existence of object definitions. + + + + + Generates a dynamic subclass of the specified Configuration class with a + container-aware interceptor capable of respecting scoping and other bean semantics. + + The Configuration class. + The enhanced subclass. + + + + Intercepts the invocation of any -decorated methods in order + to ensure proper handling of object semantics such as scoping and AOP proxying. + + + + + Process the -decorated method to check + for the existence of this object. + + The method providing the object definition. + When this method returns true, contains the object definition. + true if the object exists; otherwise, false. + + + + Builds a proxy type using inheritance. + + + + In order for this builder to work, target methods have to be either + , or belong to an interface. + + + Aleksandar Seovic + Bruno Baia + + + + Base class for proxy builders that can be used + to create a proxy for any class. + + +

+ This class provides a set of template + methods that derived classes can override to provide custom behaviour + appropriate to the type of proxy that is being generated (one of + inheritance or composition-based proxying). +

+
+ Aleksandar Seovic + Bruno Baia +
+ + + Describes the operations for a generic proxy type builder that can be + used to create a proxy type for any class. + + Aleksandar Seovic + + + + Creates the proxy type. + + The generated proxy class. + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + + + + Gets or sets the list of interfaces proxy should implement. + + + + + Should we proxy target attributes? + + + by default. + Target type attributes, method attributes, method's return type attributes + and method's parameter attributes are copied to the proxy. + + + + + The list of custom s that the proxy + class must be decorated with. + + +

+ Note that the list is composed of instances of the actual + s that are to be applied, not the + s of the s. +

+
+ +

+ The following code snippets show examples of how to decorate the + the proxied class with one or more s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary typeAtts = new Hashtable(); + builder.TypeAttributes = typeAtts; + + // applies a single Attribute to the proxied class... + typeAtts = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to the proxied class... + typeAtts = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + The custom s that the proxy + members must be decorated with. + + +

+ This dictionary must use simple s for keys + (denoting the member names that the attributes are to be applied to), + with the corresponding values being + s. +

+

+ The key may be wildcarded using the '*' character... if so, + then those proxy members that match against the key will be + decorated with the attendant list of + s. This naturally implies that using + the '*' character as a key will result in the attendant list + of s being applied to every member of + the proxied class. +

+
+ +

+ The following code snippets show examples of how to decorate the + members of a proxied class with one or more + s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary memAtts = new Hashtable(); + builder.MemberAttributes = memAtts; + + // applies a single Attribute to all members of the proxied class... + memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to all members of the proxied class... + memAtts ["*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + + // applies a single Attribute to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + Describes the operations that generates IL instructions + used to build the proxy type. + + Bruno Baia + + + + Generates the IL instructions that pushes + the proxy 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. + + + + The shared instance for this class (and derived classes). + + + + + Creates the proxy type. + + The generated proxy class. + + + + Generates the IL instructions that pushes + the proxy 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. + + + + Creates an appropriate type builder. + + The name to use for the proxy type name. + The type to extends if provided. + The type builder to use. + + + + Applies attributes to the proxy class. + + The type builder to use. + The proxied class. + + + + + + Applies attributes to the proxied method. + + The method builder to use. + The proxied method. + + + + + + Applies attributes to the proxied method's return type. + + The method builder to use. + The proxied method. + + + + + Applies attributes to proxied method's parameters. + + The method builder to use. + The proxied method. + + + + + Calculates and returns the list of attributes that apply to the + specified type. + + The type to find attributes for. + + A list of custom attributes that should be applied to type. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method. + + The method to find attributes for. + + A list of custom attributes that should be applied to method. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method's return type. + + The method to find attributes for. + + A list of custom attributes that should be applied to method's return type. + + + + + + Calculates and returns the list of attributes that apply to the + specified method's parameters. + + The method to find attributes for. + The method's parameter to find attributes for. + + A list of custom attributes that should be applied to the specified method's parameter. + + + + + + Check that the specified object is matching the passed attribute type. + + +

+ The specified object can be of different type : +

+ + + + + + System.Reflection.CustomAttributeData (Only with .NET 2.0) + + + + + +
+ The object instance to check. + The attribute type to test against. + + if the object instance matches the attribute type; + otherwise . + +
+ + + Defines the types of the parameters for the specified constructor. + + The constructor to use. + The types for constructor's parameters. + + + + Implements constructors for the proxy class. + + + The builder to use. + + + + + Generates the proxy constructor. + + The constructor builder to use. + The IL generator to use. + The constructor to use. + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + if target virtual methods should not be proxied; + otherwise . + + + + + Gets the mapping of the interface to proxy + into the actual methods on the target type + that does not need to implement that interface. + + +

+ If the target type does not implement the interface, + we return the interfaces methods as the target methods for many reasons : +

    +
  • + The target object can change for an object that implements the interface. + (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' + implementation in the Spring AOP framework for an example) +
  • +
  • + Allow Transparent proxies to be proxied. + (See Spring Remoting framework for an example) +
  • +
  • + Allow null target to be proxied. + (See Spring AOP framework which avoid calls to the target object + by intercepting all methods. Think "dynamic mock") + (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) +
  • +
+

+
+ + The of the target object. + + The interface to implement. + + An interface mapping for the interface to proxy. + +
+ + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + if only members declared at the level + of the supplied 's hierarchy should be proxied; + otherwise . + + + + + Implements the specified . + + The type builder to use. + The type the property is defined on. + The property to proxy. + The implemented methods map. + + + + Implements the specified event. + + The type builder to use. + The type the event is defined on. + The event to proxy. + The implemented methods map. + + + + Returns an array of s that represent + the proxiable interfaces. + + + An interface is proxiable if it's not marked with the + . + + + The array of interfaces from which + we want to get the proxiable interfaces. + + + An array containing the interface s. + + + + + Checks if specified interface is of a special type + that should never be proxied (i.e. ISerializable). + + Interface type to check. + + true if it is, false otherwise. + + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + +

+ The default value of this property is the + . +

+
+
+ + + Gets or sets the list of interfaces proxy should implement. + + + The default value of this property is all the interfaces + implemented or inherited by the target type. + + + + + Should we proxy target attributes? + + + + + + The list of custom s that the proxy + class must be decorated with. + + + + + + The custom s that the proxy + members must be decorated with. + + + + + + Creates a new instance of the + class. + + + + + Creates a proxy that inherits the proxied object's class. + + +

+ Only (non-final) methods can be proxied, + unless they are members of one of the interfaces that target class + implements. In that case, methods will be proxied using explicit + interface implementation, which means that client code will have + to cast the proxy to a specific interface in order to invoke the + methods. +

+
+ 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 proxy constructor. + + +

+ This implementation delegates the call to a base class constructor. +

+
+ The constructor builder to use. + The IL generator to use. + + The base class constructor to delegate the call to. + +
+ + + Gets or sets a value indicating whether inherited members should be proxied. + + + if they should be; otherwise, . + + + + + Base class for method builders that contains common functionalities. + + Bruno Baia + + + + Defines interface that proxy method builders have to implement. + + Aleksandar Seovic + Bruno Baia + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + The type builder to use. + + + + + The implementation to use. + + + + + Indicates whether interfaces should be implemented explicitly. + + + + + 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 . + + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + Generates the IL instructions that pushes + the proxy 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. + + + + Defines proxy method for the target object. + + The method to proxy. + + The interface definition of the method, if applicable. + + + if the supplied is to be + implemented explicitly; otherwise . + + + The for the proxy method. + + + + + Defines generic method parameters based on proxied method metadata. + + + The to use. + + The method to proxy. + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Calls target method directly. + + The IL generator to use. + The method to invoke. + + + + Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise. + + The IL generator to use. + The method to test for + the name of the target to be used in error messages + + + + Calls base method directly. + + The IL generator to use. + The method to proxy. + + + + Replaces a raw reference with a reference to a proxy. + + +

+ If the target object returns reference to itself -- 'this' -- + we need to treat it as a special case and return a reference + to a proxy object instead. +

+
+ The IL generator to use. + The location of the return value. +
+ + + Generates code that throws . + + IL generator to use. + the type of the exception to throw + Error message to use. + + + + Represents a class method marked with the . + + + + + Initializes a new instance of the ConfigurationClassMethod class. + + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Validates the specified problem reporter. + + The problem reporter. + + + + Gets the configuration class. + + The configuration class. + + + + Gets the method metadata. + + The method metadata. + + + + Gets the resource location. + + The resource location. + + + + Reads the class with the applied and converts it into an instance. + + + + + Initializes a new instance of the ConfigurationClassObjectDefinitionReader class. + + + + + + + Loads the object definitions. + + The configuration model. + + + + Checks the class to see if it is a candidate to be a source. + + The object definition. + + + + + A plain-vanilla object definition. + + +

+ This is the most common type of object definition; + instances + do not derive from a parent + , and usually + (but not always - see below) have an + + and (optionally) some + and + . +

+

+ Note that + instances do not have to specify an + : + This can be useful for deriving + instances + from such definitions, each with it's own + , + inheriting common property values and other settings from the parent. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Common base class for object definitions, factoring out common + functionality from + and + . + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Extension of , + holding attributes as objects in order + to keep track of the definition source. + + + + + Support class for , providing + a base implementation of all methods. To be extended by subclasses. + + + + + Interface defining a generic contract for attaching and accessing metadata + to/from arbitrary objects. + + + + + Set the attribute defined by name to the supplied value. + In general, users should take care to prevent overlaps with other + metadata attributes by using fully-qualified names, perhaps using + class or package names as prefix. + + the unique attribute key + the attribute value to be attached + + + + Get the value of the attribute identified by name. + Return null if the attribute doesn't exist. + + the unique attribute key + the current value of the attribute, if any + + + + Remove the attribute identified by name and return its value. + Return null if no attribute under name is found. + + the unique attribute key + The last value of the attribute, if any + + + + Checks weather a specific attributes exists + + The unique attribute key + + true if the attribute identified by name exists. + Otherwise return false + + + + + Return the names of all attributes. + + + + Map with String keys and Object values + + + Copy the attributes from the supplied AttributeAccessor to this accessor. + @param source the AttributeAccessor to copy from + + + + Interface to be implemented by bean metadata elements + that carry a configuration source object. + + + + + Return the configuration source Object for this metadata element + (may be null). + + + + + Add the given BeanMetadataAttribute to this accessor's set of attributes. + + The BeanMetadataAttribute object to register + + + + Look up the given BeanMetadataAttribute in this accessor's set of attributes. + + the name of the attribute + the corresponding BeanMetadataAttribute object, + or null if no such attribute defined + + + + + Set the configuration source object for this metadata element. +

The exact type of the object will depend on the configuration mechanism used.

+
+
+ + + Describes a configurable object instance, which has property values, + constructor argument values, and further information supplied by concrete + implementations. + + Rick Evans + + + + Describes an object instance, which has property values, constructor + argument values, and further information supplied by concrete implementations. + + +

+ This is just a minimal interface: the main intention is to allow + + (like PropertyPlaceholderConfigurer) to access and modify property values. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + Return the event handlers for any events exposed by this object. + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The name of the parent definition of this object definition, if any. + + + + + The target scope for this object. + + + + + Get the role hint for this object definition + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition. + + Note that this does not have to be the actual type name used at runtime, + in case of a child definition overrding/inheriting the the type name from its + parent. It can be modifed during object factory post-processing, typically + replacing the original class name with a parsed variant of it. + Hence, do not consider this to be the definitive bean type at runtime + but rather only use it for parsing purposes at the individual object + definition level. + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Return whether this bean is a primary autowire candidate. + If this value is true for exactly one bean among multiple + matching candidates, it will serve as a tie-breaker. + + + + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + The method overrides (if any) for this object. + + + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + + + + + Return the event handlers for any events exposed by this object. + + + + + Get or set the role hint for this object definition + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition (if any). + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The dependency check code. + + + + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + + The object definition used to initialise the member fields of this + instance. + + +

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

+
+
+ + + Register a qualifier to be used for autowire candidate resolution, + keyed by the qualifier's type name. + + + + + + Return whether this bean has the specified qualifier. + + + + + Return the qualifier mapped to the provided type name. + + + + + Return all registered qualifiers. + + the Set of objects. + + + + Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition. + + the AbstractBeanDefinition to copy from + + + + Resolves the type of the object, resolving it from a specified + object type name if necessary. + + + A resolved instance. + + + If the type cannot be resolved. + + + + + Validate this object definition. + + + In the case of a validation failure. + + + + + Validates all + + + + + Validate the supplied . + + + The + to be validated. + + + + + Override settings in this object definition from the supplied + object definition. + + + The object definition used to override the member fields of this instance. + + + + + Returns a that represents the current + . + + + A that represents the current + . + + + + + The name of the parent definition of this object definition, if any. + + + + + The property values that are to be applied to the object + upon creation. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The property values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + Does this definition have any + ? + + + if this definition has at least one + . + + + + + The constructor argument values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The constructor argument values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The event handler values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The event handler values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The method overrides (if any) for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The name of the target scope for the object. + Defaults to "singleton", ootb alternative is "prototype". Extended object factories + might support further scopes. + + + + + Get or set the role hint for this object definition + + + + + Is this definition a singleton, with + a single, shared instance returned on all calls to an enclosing + container (typically an + or + ). + + +

+ If , an object factory will apply the + prototype design pattern, with each caller requesting an + instance getting an independent instance. How this is defined + will depend on the object factory implementation. singletons + are the commoner type. +

+
+ +
+ + + Gets a value indicating whether this instance is prototype, with an independent instance + returned for each call. + + + true if this instance is prototype; otherwise, false. + + + + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup + by object factories that perform eager initialization of + singletons. +

+
+
+ + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be + instantiated itself but rather just serving as a parent for concrete + child object definitions. + + + if this object definition is "abstract". + + + + + The of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + + Is the of the object definition a resolved + ? + + + + + Returns the of the + of the object definition (if any). + + + + + A description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. The default is + , + which means that no autowiring will be performed. +

+
+
+ + + Gets the resolved autowire mode. + + +

+ This resolves + + to one of + + or + . +

+
+
+ + + The dependency checking mode. + + +

+ The default is + . +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before this object definition. +

+ + Dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Set whether this bean is a primary autowire candidate. + If this value is true for exactly one bean among multiple + matching candidates, it will serve as a tie-breaker. + + + + + The name of the initializer method. + + +

+ The default value is the constant, + in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default value is the constant, + in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The + method will be invoked on the specified + . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Does this object definition have any constructor argument values? + + + if his object definition has at least one + element in it's + + property. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + + The of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + Whether to perform a dependency check for objects (not + applicable to autowiring a constructor, thus ignored there) + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + +

+ Takes an object class name to avoid eager loading of the object class. +

+
+ + The assembly qualified of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + The + to be applied to a new instance of the object. + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. +

+
+ + The definition that is to be copied. + +
+ + + Validate this object definition. + + + In the case of a validation failure. + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Is always null for a . + + + It is safe to request this property's value. Setting any other value than null will + raise an . + + Raised on any attempt to set a non-null value on this property. + + + + Parses classes with the applied to them. + + + + + Initializes a new instance of the ConfigurationClassParser class. + + + + + + Parses the specified type. + + The type. + Name of the object. + + + + Validates this instance. + + + + + Processes the configuration class. + + The configuration class. + + + + Gets all methods with custom attribute for class. + + The class. + The custom attribute. + + + + + Gets the configuration classes. + + The configuration classes. + + + + Postprocesses the applied types registered with the . + + + + + Allows for custom modification of an application context's object + definitions, adapting the object property values of the context's + underlying object factory. + + +

+ Application contexts can auto-detect + IObjectFactoryPostProcessor objects in their object definitions and + apply them before any other objects get created. +

+

+ Useful for custom config files targeted at system administrators that + override object properties configured in the application context. +

+

+ See PropertyResourceConfigurer and its concrete implementations for + out-of-the-box solutions that address such configuration needs. +

+
+ Juergen Hoeller + Rick Evans (.Net) +
+ + + Modify the application context's internal object factory after its + standard initialization. + + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + The object factory used by the application context. + + + In case of errors. + +
+ + + Interface that can be implemented by objects that should be orderable, e.g. in an + . + + +

+ The actual order can be interpreted as prioritization, the first object (with the + lowest order value) having the highest priority. +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Postsprocesses the object definition registry. + + The registry. + + + + Postprocesses the object factory. + + The object factory. + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Sets the problem reporter. + + The problem reporter. + + + + objects on which the current object depends. Any objects specified are guaranteed to be + created by the container before this object. Used infrequently in cases where a object + does not explicitly depend on another through properties or constructor arguments, + but rather depends on the side effects of another object's initialization. + Note: This attribute will not be inherited by child object definitions, + hence it needs to be specified per concrete object definition. + + Using at the class level has no effect unless component-scanning + is being used. If a -attributed class is declared via XML, + attribute metadata is ignored, and + <object depends-on="..."/> is respected instead. + + + + + + Initializes a new instance of the DependsOn class. + + + + + Initializes a new instance of the DependsOn class. + + + + + Gets or sets the name. + + The name. + + + + Indicates one or more classes to import. + + Provides functionality equivalent to the <import/> element in Spring XML. + Only supported for actual -attributed classes. + + + If XML or other non- object definition resources need to be + imported, use + + + + + + Initializes a new instance of the Import class. + + + + + Initializes a new instance of the Import class. + + + + + + The class or classes to import. + + The type. + + + + Supports providing one or more implementations to import when creating s. + + + + + Initializes a new instance of the ImportResourceAttribute class. + + + + + + Initializes a new instance of the ImportResourceAttribute class. + + + + + + implementation to use when processing resources specified + by the attribute. + + The . + + + + Resource paths to import. Resource-loading prefixes such as assembly:// and + file://, etc may be used. + + The resources. + + + + Indicates whether a object is to be lazily initialized. + + If this attribute is not present on a Component or object definition, eager + initialization will occur. If present and set to true, the + object/Component will not be initialized until referenced by another object or + explicitly retrieved from the enclosing . + If present and set to false, the object will be instantiated on startup by object factories + that perform eager initialization of singletons. + + + If Lazy is present on a class, this indicates that all + methods within that should be lazily + initialized. If Lazy is present and false on a object method within a + Lazy-annotated Configuration class, this indicates overriding the 'default + lazy' behavior and that the object should be eagerly initialized. + + + + + + Initializes a new instance of the LazyAttribute class. + + + + + + Initializes a new instance of the LazyAttribute class. + + + + + Whether lazy initialization should occur. + + true if [lazy initialize]; otherwise, false. + + + + Identifies the Method as providing and Object Definition. + + + + + The optional name of a method to call on the Object instance upon closing the + application context, for example a Close() method on a DataSource. + The method must have no arguments but may throw any exception. + + Note: Only invoked on objects whose lifecycle is under the full control of the + factory, which is always the case for singletons but not guaranteed + for any other scope. + + + + The destroy method. + + + + The optional name of a method to call on the object instance during initialization. + Not commonly used, given that the method may be called programmatically directly + within the body of a Object-annotated method. + + The init method. + + + + The name of this object, or if multiple, aliases for this object. If left unspecified + the name of the object is the name of the attributed method. If specified, the method + name is ignored. + + The name. + + + + Gets the comma-delimited list of names/aliases as an array. + + The array of names. + + + + Utilities to provide support for manipulating ReflectionOnly types in the . + + + + + Load the into the ReflectionsOnly context based on its partial name. + + The partial name. + The matching + + + + A GenericObjectDefinition that provides attribute driven propulation + of properties like LazyInit, Scope or Qualifier + + + + + GenericObjectDefinition is a one-stop shop for standard object definition purposes. + Like any object definition, it allows for specifying a class plus optionally + constructor argument values and property values. Additionally, deriving from a + parent bean definition can be flexibly configured through the "parentName" property. + + In general, use this class for the purpose of + registering user-visible object definitions (which a post-processor might operate on, + potentially even reconfiguring the parent name). + Use / + where parent/child relationships happen to be pre-determined. + + + + Juergen Hoeller + Erich Eichinger + + + + Creates a new to be configured through its + object properties and configuration methods. + + + + + Creates a new as deep copy of the given + object definition. + + the original object definition to copy from + + + + Returns a representation of this + for debugging purposes. + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Name provided by the Component Attribute + + + + + Creates a GenericObjectDefinition that applies the default values provided + in the XML Spring config document. Additionally parses the specific class + attributesthat allows the definition of LazyInit, Scope or Qualifier + + Type of scanned component + Defualts provided in Spring Config document + + + + Provides the name of the object scanned + + return the provided attribute name of the full object type name + + + + When used as a type-level attribute, indicates the name of a scope to use + for instances of the attributed type. + + When used as a method-level attribute in conjunction with the + attribute, indicates the name of a scope to use for + the instance returned from the method. + + In this context, scope means the lifecycle of an instance, such as + singleton, prototype, and so forth. + + + + + + Initializes a new instance of the Scope class. + + + + + + Specifies the scope to use for the annotated object. + + The scope. + + + + Object Defintion Parser for interpreting classes when primary configuration is peformed via XML. + + + + + Interface used to handle custom, top-level tags. + + Implementations are free to turn the metadata in the custom tag into as + many as required. + + Rob Harrop + Mark Pollack (.NET) + + + + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the IObjectDefinitionRegistry + embedded in the supplied + + +

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

+
+ + The element to be parsed. + + + The object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry + + + The primary object definition. + +
+ + + 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 ObjectDefinitions from classes identified by an . + + + + + 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. +

+
+
+ + + Configures the scanner. + + The parser context. + The element. + + + + + NamespaceParser allowing for the configuration of + declarative transaction management using either XML or using attributes. + This namespace handler is the central piece of functionality in the + Spring transaction management facilities and offers two appraoches + to declaratively manage transactions. + One approach uses transaction semantics defined in XML using the + <tx:advice> elements, the other uses attributes + in combination with the <tx:annotation-driven> element. + Both approached are detailed in the Spring reference manual. + + + + + Support class for implementing custom namespace parsers. + + Parsing of individual elements is done via a ObjectDefintionParser. + Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser + to handle a specific element. + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. + + +

+ Used by + for actually parsing a DOM document or + fragment. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Sandu Turcan (.NET) +
+ + + Invoked by after construction but before any + elements have been parsed. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Invoked by after construction but before any + elements have been parsed. + + + + + Parses an element under the root node, typically + an object definition or import statement. + + + The element to be parsed. + + + The parser context. + + + The number of object defintions created from this element. + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Register the specified for the given + + + + + Register the for the 'advice' and + 'attribute-driven' tags. + + + + + Simple listener that logs application events to the console. + + +

+ Intended for use during debugging only. +

+
+ Rod Johnson + Griffin Caprio (.NET) + +
+ + + A listener for application events. + + Rod Johnson + Griffin Caprio (.NET) + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Creates a new instance of the + class. + + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle events. + + Griffin Caprio (.NET) + + + + + + + Encapsulates the data associated with an event raised by an + . + + Rod Johnson + Mark Pollack (.NET) + Griffin Caprio (.NET) + + + + + Creates a new instance of the + class. + + + + + The date and time when the event occured. + + + The date and time when the event occured. + + + + + The system time in milliseconds when the event happened. + + + The system time in milliseconds when the event happened. + + + + + Creates a new instance of the ContextEventArgs class to represent the + supplied context event. + + The type of context event. + + + + Returns a string representation of this object. + + A string representation of this object. + + + + The event type. + + + + + The various context event types. + + + + + The event type when the context is refreshed or created. + + + + + The event type when the context is closed. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Extensions to enable scanning on any AbstractApplicationContext-derived type. + + + + + Scans for types using the provided scanner. + + The context. + The scanner. + + + + Scans for types that satisfy specified predicates located in the specified scan path. + + The context. + The assembly scan path. + The assembly predicate. + The type predicate. + + + + Scans the specified context. + + The context. + The assembly scan path. + The assembly predicate. + The type predicate. + The assemblies to scan. + + + + Scans for types that satisfy specified predicates. + + The context. + The assembly predicate. + The type predicate. + + + + Scans for types using the default scanner. + + The context. + + + + Scans the with assembly filter. + + The context. + The assembly predicate. + + + + Scans the with type filter. + + The context. + The type predicate. + + + + Partial implementation of the + interface. + + +

+ Does not mandate the type of storage used for configuration, but does + implement common functionality. Uses the Template Method design + pattern, requiring concrete subclasses to implement + methods. +

+

+ In contrast to a plain vanilla + , an + is supposed + to detect special objects defined in its object factory: therefore, + this class automatically registers + s, + s + and s that are + defined as objects in the context. +

+

+ An may be also supplied as + an object in the context, with the special, well-known-name of + "messageSource". Else, message resolution is delegated to the + parent context. +

+
+ Rod Johnson + Juergan Hoeller + Griffin Caprio (.NET) + + +
+ + + Configurable implementation of the + interface. + + +

+ This implementation + supports the configuration of resource access protocols and the + corresponding .NET types that know how to handle those protocols. +

+

+ Basic protocol-to-resource type mappings are also defined by this class, + while others can be added either internally, by application contexts + extending this class, or externally, by the end user configuring the + context. +

+

+ Only one resource type can be defined for each protocol, but multiple + protocols can map to the same resource type (for example, the + "http" and "ftp" protocols both map to the + type. The protocols that are + mapped by default can be found in the following list. +

+

+ + + assembly + + + config + + + file + + + http + + + https + + +

+
+ Aleksandar Seovic + + + +
+ + + Describes an object that can load + s. + + +

+ An implementation is + generally required to support the functionality described by this + interface. +

+

+ The class is a + standalone implementation that is usable outside an + ; the aforementioned + class is also used by the + class. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Return an handle for the + specified resource. + + +

+ The handle should always be a reusable resource descriptor; this + allows one to make repeated calls to the underlying + . +

+

+

    +
  • + Must support fully qualified URLs, e.g. "file:C:/test.dat". +
  • +
  • + Should support relative file paths, e.g. "test.dat" (this will be + implementation-specific, typically provided by an + implementation). +
  • +
+

+ + An handle does not imply an + existing resource; you need to check the value of an + 's + property to determine + conclusively whether or not the resource actually exists. + +
+ The resource location. + + An appropriate handle. + + + + +
+ + + The separator between the protocol name and the resource name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified default protocol for unqualified resources. + + + + + Returns a that has been + mapped to the protocol of the supplied . + + The name of the resource. + + A new instance for the + supplied . + + + If a + mapping does not exist for the supplied . + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + + Checks that the supplied starts + with one of the protocol names currently mapped by this + instance. + + The name of the resource. + + if the supplied + starts with one of the known + protocols; if not, or if the supplied + is itself . + + + + + Extracts the protocol name from the supplied + . + + The name of the resource. + + The extracted protocol name or if the + supplied is unqualified (or + is itself ). + + + + + The default protocol to use for unqualified resources. + + +

+ The initial value is "file". +

+
+
+ + + Provides the means to configure an application context in addition to + the methods exposed on the + interface. + + +

+ This interface is to be implemented by most (if not all) + implementations. +

+

+ Configuration and lifecycle methods are encapsulated here to avoid + making them obvious to + client code. +

+

+ Calling will close this + application context, releasing all resources and locks that the + implementation might hold. This includes disposing all cached + singleton objects. +

+ + does not invoke the + attendant on any parent + context. + +
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + The central interface to Spring.NET's IoC container. + + +

+ implementations + provide: + + + + Object factory functionality inherited from the + + and + interfaces. + + + + + The ability to resolve messages, supporting internationalization. + Inherited from the + interface. + + + + + The ability to load file resources in a generic fashion. + Inherited from the + interface. + + + + + Acts an an event registry for supporting loosely coupled eventing + between objecs. Inherited from the + interface. + + + + + The ability to raise events related to the context lifecycle. Inherited + from the + interface. + + + + + Inheritance from a parent context. Definitions in a descendant context + will always take priority. + + + +

+

+ In addition to standard object factory lifecycle capabilities, + implementations need + to detect + , + , and + objects and supply + their attendant dependencies accordingly. +

+

+ This interface is the central client interface in Spring.NET's IoC + container implementation. As such it does inherit a quite sizeable + number of interfaces; implementations are strongly encouraged to use + composition to satisfy each of the inherited interfaces (where + appropriate of course). +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + +
+ + + Extension of the interface + to be implemented by object factories that can enumerate all their object instances, + rather than attempting object lookup by name one by one as requested by clients. + + +

+ implementations that preload + all their objects (for example, DOM-based XML factories) may implement this + interface. This interface is discussed in + "Expert One-on-One J2EE Design and Development", by Rod Johnson. +

+

+ If this is an , + the return values will not take any + hierarchy into account, but + will relate only to the objects defined in the current factory. + Use the helper class to + get all objects. +

+

+ With the exception of + , + the methods and properties in this interface are not designed for frequent + invocation. Implementations may be slow. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + The root interface for accessing a Spring.NET IoC container. + + + + This is the basic client view of a Spring.NET IoC container; further interfaces + such as and + + are available for specific purposes such as enumeration and configuration. + + + This is the root interface to be implemented by objects that can hold a number + of object definitions, each uniquely identified by a + name. An independent instance of any of these objects can be obtained + (the Prototype design pattern), or a single shared instance can be obtained + (a superior alternative to the Singleton design pattern, in which the instance is a + singleton in the scope of the factory). Which type of instance + will be returned depends on the object factory configuration - the API is the same. + The Singleton approach is more useful and hence more common in practice. + + + The point of this approach is that the IObjectFactory is a central registry of + application components, and centralizes the configuring of application components + (no more do individual objects need to read properties files, for example). + See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a + discussion of the benefits of this approach. + + + Normally an IObjectFactory will load object definitions stored in a configuration + source (such as an XML document), and use the + namespace to configure the objects. However, an implementation could simply return + .NET objects it creates as necessary directly in .NET code. There are no + constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties + file etc. Implementations are encouraged to support references amongst objects, + to either Singletons or Prototypes. + + + In contrast to the methods in + , all of the methods + in this interface will also check parent factories if this is an + . If an object is + not found in this factory instance, the immediate parent is asked. Objects in + this factory instance are supposed to override objects of the same name in any + parent factory. + + + Object factories are supposed to support the standard object lifecycle interfaces + as far as possible. The maximum set of initialization methods and their standard + order is: + + + + + + 's + property. + + + + + 's + property. + + + + + + (only applicable if running within an ). + + + + + The + + method of + s. + + + + + 's + method. + + + + + A custom init-method definition. + + + + + The + + method of + s. + + + + +

+ + On shutdown of an object factory, the following lifecycle methods apply: + + + + + + 's + method. + + + + + A custom destroy-method definition. + + + + + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + +

+ Is this object a singleton? + + + + That is, will + always return the same object? + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Does this object factory contain an object with the given name? + + + + The concrete lookup strategy depends on the implementation. E.g. s + will also search their parent factory if a name isn't found . + + + The name of the object to query. + True if an object with the given name is defined. + + + + Return the aliases for the given object name, if defined. + + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + Provides a measure of type safety by throwing an exception if the object is + not of the required . + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + Determine the type of the object with the given name. + + + + More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. + + + The name of the object to query. + + The type of the object or if not determinable. + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + In addition to being generally useful, typically this method is used to provide + dependency injection functionality for objects that are instantiated outwith the + control of a developer. A case in point is the way that the current (1.1) + ASP.NET classes instantiate web controls... the instantiation takes place within + a private method of a compiled page, and thus cannot be hooked into the + typical Spring.NET IOC container lifecycle for dependency injection. + + + + The following code snippet assumes that the instantiated factory instance + has been configured with an object definition named + 'ExampleNamespace.BusinessObject' that has been configured to set the + Dao property of any ExampleNamespace.BusinessObject instance + to an instance of an appropriate implementation... + + namespace ExampleNamespace + { + public class BusinessObject + { + private IDao _dao; + + public BusinessObject() {} + + public IDao Dao + { + get { return _dao; } + set { _dao = value; } + } + } + } + + with the corresponding driver code looking like so... + + IObjectFactory factory = GetAnIObjectFactoryImplementation(); + BusinessObject instance = new BusinessObject(); + factory.ConfigureObject(instance, "object_definition_name"); + // at this point the dependencies for the 'instance' object will have been resolved... + + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + If there is no object definition for the supplied . + + + If any of the target object's dependencies could not be created. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + This is the indexer for the + interface. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Check if this object factory contains an object definition with the given name. + + +

+ Does not consider any hierarchy this factory may participate in. +

+ + Ignores any singleton objects that have been registered by other means + than object definitions. + +
+ The name of the object to look for. + + if this object factory contains an object + definition with the given name. + +
+ + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Sub-interface implemented by object factories that can be part + of a hierarchy. + + Rod Johnson + Rick Evans (.NET) + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts, also resolving a given alias if necessary. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Return the parent object factory, or + if this factory does not have a parent. + + + The parent object factory, or + if this factory does not have a parent. + + + + + Describes an object that can resolve messages. + + +

+ This enables the parameterization and internationalization of messages. +

+

+ Spring.NET provides one out-of-the-box implementation for production + use: +

    +
  • .
  • +
+

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + The default message if name is not found. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + +

+ This method must use the + + value to obtain a resource. +

+

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The resolved object, or if not found. + +
+ + + Gets a localized resource object identified by the supplied + . + + +

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + +
+ + + Applies resources to object properties. + + +

+ Resource key names are of the form objectName.propertyName. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + + Encapsulates event publication functionality. + + +

+ Serves as a super-interface for the + interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Publishes an application context event. + + + The source of the event. May be . + + + The event that is to be raised. + + + + + A registry that manages subscriptions to and the + publishing of events. + + Griffin Caprio + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + Subscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Raised in response to an application context event. + + + + + Returns the date and time this context was loaded. + + +

+ This is to be set immediately after an + has been + instantiated and its configuration has been loaded. Implementations + are permitted to update this value if the context is reset or + refreshed in some way. +

+
+ + The representing when this context + was loaded. + + +
+ + + Gets the parent context, or if there is no + parent context. + + +

+ If the parent context is , then this context + is the root of any context hierarchy. +

+
+ + The parent context, or if there is no + parent. + +
+ + + Gets and sets a name for this context. + + + A name for this context. + + + + + Interface defining methods for start/stop lifecycle control. + The typical use case for this is to control asynchronous processing. + + + + Can be implemented by both components (typically a Spring object defined in + a spring and containers + (typically a spring . Containers will + propagate start/stop signals to all components that apply. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Gets a value indicating whether this component is currently running. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + true if this component is running; otherwise, false. + + + + + Add an + + that will get applied to the internal object factory of this + application context on refresh, before any of the object + definitions are evaluated. + + +

+ To be invoked during context configuration. +

+
+ + The factory processor to register. + + +
+ + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Return the internal object factory of this application context. + + +

+ Can be used to access specific functionality of the factory. +

+ + This is just guaranteed to return an instance that is not + after the context has been refreshed + at least once. + + + Do not use this to post-process the object factory; singletons + will already have been instantiated. Use an + + to intercept the object factory setup process before objects even + get touched. + +
+ +
+ + + Sets the parent of this application context. + + + + The parent should not be changed: it should only be set + outside a constructor if it isn't available when an instance of + this class is created. + + + + The parent context. + + + + + Interface for registries that hold object definitions, i.e. + + and + + instances. + + +

+ Typically implemented by object factories that work with the + + hierarchy internally. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Determine whether the given object name is already in use within this registry, + i.e. whether there is a local object or alias registered under this name. + + + + + Return the names of all objects defined in this registry. + + + The names of all objects defined in this registry, or an empty array + if none defined + + + + + Return the names of all objects defined in this registry. + If includeAncestors is true it includes all objects in the defined parent factories. + + to include parent factories in result + + The names of all objects defined in this registry, if includeAncestors is true it includes + all objects in the defined parent factories, or an empty array if none defined + + + + + Check if this registry contains a object definition with the given name. + + + The name of the object to look for. + + + True if this object factory contains an object definition with the + given name. + + + + + Returns the + + for the given object name. + + + The name of the object to find a definition for. + + + The for + the given name (never null). + + + If the object definition cannot be resolved. + + + In case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Return the aliases for the given object name, if defined. + + the object name to check for aliases + + +

+ Will ask the parent factory if the object cannot be found in this + factory instance. +

+
+ + The aliases, or an empty array if none. + + + If there's no such object definition. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + + The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Return the number of objects defined in the registry. + + + The number of objects defined in the registry. + + + + + Name of the .Net config section that contains Spring.Net context definition. + + + + + Default name of the root context. + + + + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then message resolution + will be delegated to the parent context (if any). +

+
+
+ + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then a default + will be used. +

+
+
+ + + The instance for this class. + + + + + The instance we delegate + our implementation of said interface to. + + + + + The instance we + delegate our implementation of said interface to. + + + + + Protects access to the internal object factory used by the ApplicationContext if attempted to be accessed when in improper state. + + The internal ObjectFactory used by the ApplicationContext + Cannot Access ApplicationContext in this state! + + + + Creates a new instance of the + with no parent context. + + +

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

+
+
+ + + Creates a new instance of the + with no parent context. + + +

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

+
+ Flag specifying whether to make this context case sensitive or not. +
+ + + Creates a new instance of the + with the supplied parent context. + + +

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

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent application context. +
+ + + Adds the given to the list of standard + processors being added to the underlying + + + Each time is called on this context, the context ensures, that + all default s are registered with the underlying . + + The instance. + + + + Closes this context and disposes of any resources (such as + singleton objects in the wrapped + ). + + + + + Subclasses must implement this method to perform the actual + configuration loading. + + +

+ This method is invoked by + , + before any other initialization occurs. +

+
+ + In the case of errors encountered while refreshing the object factory. + +
+ + + Returns the internal object factory of the parent context if it implements + ; else, + returns the parent context itself. + + + The parent context's object factory, or the parent itself. + + + + + Raises an application context event. + + + Any arguments to the event. May be . + + + + + Raises an application context event. + + + The source of the event. + + + Any arguments to the event. May be . + + + + + Create the strategy to be used + + + + + Modify the application context's internal object factory after its standard + initialization. + + +

+ All object definitions will have been loaded, but no objects + will have been instantiated yet. This allows for the registration + of special + s + in certain + implementations. +

+
+ + The object factory used by the application context. + + + In the case of errors. + . +
+ + + Template method which can be overridden to add context-specific + work before the underlying object factory gets refreshed. + + + + + Template method which can be overridden to add context-specific + refresh work. + + +

+ Called on initialization of special objects, before instantiation + of singletons. +

+
+
+ + + Template method which can be overridden to add context-specific + work after the context was refreshed but before the + event gets raised. + + + + + Instantiate and invoke all registered + + objects, respecting any explicit ordering. + + + + Must be called before singleton instantiation. + + + In the case of errors. + + + + Resets the well-known ObjectPostProcessorChecker that logs an info + message when an object is created during IObjectPostProcessor + instantiation, i.e. when an object is not eligible for being + processed by all IObjectPostProcessors. + + + + + Initializes the default event registry for this context. + + + + + Returns the internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + The internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + + + Initializes the default message source for this context. + + +

+ Uses any parent context's message source if one is not available + in this context. +

+
+
+ + + Add a new + that will get applied to the internal object factory of this application context + on refresh, before any of the object definitions are evaluated. + + + The factory processor to register. + + + + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Registers well-known s and + preregisters well-known dependencies using + + the raw object factory as returned from + + + + Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory + + + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of all objects defined in this factory, if includeAncestorsis true + includes all parent factories. + + to include parent factories into result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Check if this object factory contains an object definition with the given name. + + The name of the object to look for. + + True if this object factory contains an object definition with the given name. + + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + + if an object with the given name is defined. + + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Is this object a singleton? + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determine the of the object with the + given name. + + The name of the object to query. + + The of the object, or + if not determinable. + + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + + + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Determine whether the given object name is already in use within this context, + i.e. whether there is a local object. May be override by subclasses, the default + implementation simply returns + + + + + Register a new object definition with this registry. + Must support + + and . + + The name of the object instance to register. + The definition of the object instance to register. + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + The name of the object. + The alias that will behave the same as the object name. + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + + Subscribes to published events of a all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Publishes an application context event. + + +

+ +

+
+ + The source of the event. May be . + + + The event that is to be raised. + + +
+ + + An object that can be used to synchronize access to the + + + + + Set the to be used by this context. + + + + + The timestamp when this context was first loaded. + + + The timestamp (milliseconds) when this context was first loaded. + + + + + Gets a flag indicating whether context should be case sensitive. + + true if object lookups are case sensitive; otherwise, false. + + + + The for this context. + + + If the context has not been initialized yet. + + + + + The for this context. + + + If the context has not been initialized yet. + + + + + Returns the list of the + s + that will be applied to the objects created with this factory. + + +

+ The elements of this list are instances of implementations of the + + interface. +

+
+ + The list of the + s + that will be applied to the objects created with this factory. + +
+ + + Return the internal object factory of this application context. + + + + + Gets the parent context, or if there is no + parent context. + + + The parent context, or if there is no + parent. + + + + + + Gets a value indicating whether this component is currently running. + + + true if this component is running; otherwise, false. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + + + Gets a dictionary of all singleton beans that implement the + ILifecycle interface in this context. + + A dictionary of ILifecycle objects with object name as key. + + + + Raised in response to an implementation-dependant application + context event. + + + + + The date and time this context was first loaded. + + + The representing when this context + was first loaded. + + + + + A name for this context. + + + A name for this context. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return the parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + + Allows for custom modification of new object instances, e.g. + checking for marker interfaces or wrapping them with proxies. + + +

+ Application contexts can auto-detect + + objects in their object definitions and apply them before any other + objects get created. Plain object factories allow for programmatic + registration of post-processors. +

+

+ Typically, post-processors that populate objects via marker interfaces + or the like will implement + , + and post-processors that wrap objects with proxies will normally implement + . +

+
+ Juergen Hoeller + Aleksandar Seovic (.NET) + +
+ + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + 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. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + 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. + +
+ + + Abstract implementation of the interface, + implementing common handling of message variants, making it easy + to implement a specific strategy for a concrete . + + +

Subclasses must implement the abstract ResolveObject + method.

+

Note: By default, message texts are only parsed through + String.Format if arguments have been passed in for the message. In case + of no arguments, message texts will be returned as-is. As a consequence, + you should only use String.Format escaping for messages with actual + arguments, and keep all other messages unescaped. +

+

Supports not only IMessageSourceResolvables as primary messages + but also resolution of message arguments that are in turn + IMessageSourceResolvables themselves. +

+

This class does not implement caching of messages per code, thus + subclasses can dynamically change messages over time. Subclasses are + encouraged to cache their messages in a modification-aware fashion, + allowing for hot deployment of updated messages. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + Harald Radi (.NET) + + + +
+ + + Sub-interface of to be + implemented by objects that can resolve messages hierarchically. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + holds the logger instance shared with subclasses. + + + + + Initializes this instance. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ If the lookup is not successful throw NoSuchMessageException +
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException. +

+
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message if name is not found. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException +

+
+
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + The value object storing those attributes that are required to + properly resolve a message. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful. + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. If + the resource name resolves to null, then in .NET 1.1 the return + value will be String.Empty whereas in .NET 2.0 it will return + null. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Resolve the given code and arguments as message in the given culture, + returning null if not found. Does not fall back to the code + as default message. Invoked by GetMessage methods. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Try to retrieve the given message from the parent MessageSource, if any. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Return a fallback default message for the given code, if any. + + + Default is to return the code itself if "UseCodeAsDefaultMessage" + is activated, or return no fallback else. In case of no fallback, + the caller will usually receive a NoSuchMessageException from GetMessage + + The code to lookup up, such as 'calculator.noRateSet'. + The default message to use, or null if none. + + + + Renders the default message string. The default message is passed in as specified by the + caller and can be rendered into a fully formatted default message shown to the user. + + Default implementation passed he String for String.Format resolving any + argument placeholders found in them. Subclasses may override this method to plug + in custom processing of default messages. + + The default message. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The rendered default message (with resolved arguments) + + + + Format the given default message String resolving any + agrument placeholders found in them. + + The message to format. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The formatted message (with resolved arguments) + + + + Search through the given array of objects, find any + MessageSourceResolvable objects and resolve them. + + + Allows for messages to have MessageSourceResolvables as arguments. + + + The array of arguments for a message. + The with which the + resource is associated. + An array of arguments with any IMessageSourceResolvables resolved + + + + Gets the specified resource (e.g. Icon or Bitmap). + + The name of the resource to resolve. + + The to resolve the + code for. + + The resource if found. otherwise. + + + + Applies resources from the given name on the specified object. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Subclasses must implement this method to resolve a message. + + The code to lookup up, such as 'calculator.noRateSet'. + The with which the + resource is associated. + The resolved message from the backing store of message data. + + + + Resolves an object (typically an icon or bitmap). + + +

+ Subclasses must implement this method to resolve an object. +

+
+ The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + +
+ + + Applies resources to object properties. + + +

+ Subclasses must implement this method to apply resources + to an arbitrary object. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + Gets or Sets a value indicating whether to use the message code as + default message instead of throwing a NoSuchMessageException. + Useful for development and debugging. Default is "false". + + +

Note: In case of a IMessageSourceResolvable with multiple codes + (like a FieldError) and a MessageSource that has a parent MessageSource, + do not activate "UseCodeAsDefaultMessage" in the parent: + Else, you'll get the first code returned as message by the parent, + without attempts to check further codes.

+

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, + AbstractMessageSource contains special checks + to delegate to the internal GetMessageInternal method if available. + In general, it is recommended to just use "UseCodeAsDefaultMessage" during + development and not rely on it in production in the first place, though.

+

Alternatively, consider overriding the GetDefaultMessage + method to return a custom fallback message for an unresolvable code.

+
+ + true if use the message code as default message instead of + throwing a NoSuchMessageException; otherwise, false. + +
+ + + The parent message source used to try and resolve messages that + this object can't resolve. + + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + Convenient abstract superclass for + implementations that + draw their configuration from XML documents containing object + definitions as understood by an + . + + Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Creates a new instance of the + class + with the given parent context. + + +

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

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent context. +
+ + + Instantiates and populates the underlying + with the object + definitions yielded up by the + method. + + + In the case of errors encountered while refreshing the object factory. + + + In the case of errors encountered reading any of the resources + yielded by the method. + + + + + + Initialize the object definition reader used for loading the object + definitions of this context. + + +

+ The default implementation of this method is a no-op; i.e. it does + nothing. Can be overridden in subclasses to provide custom + initialization of the supplied + ; for example, a derived + class may want to turn off XML validation. +

+
+ + The object definition reader used by this context. + +
+ + + Load the object definitions with the given + . + + +

+ The lifecycle of the object factory is handled by + ; + therefore this method is just supposed to load and / or register + object definitions. +

+
+ + The reader containing object definitions. + + In case of object registration errors. + + + In the case of errors encountered reading any of the resources + yielded by either the or + the methods. + +
+ + + Loads the object definitions into the given object factory, typically through + delegating to one or more object definition readers. + + The object factory to lead object definitions into + + + + + + Create a new reader instance for importing object definitions into the specified . + + the to be associated with the reader + a new instance. + + + + Customizes the internal object factory used by this context. + + Called for each attempt. +

+ The default implementation is empty. Can be overriden in subclassses to customize + DefaultListableBeanFatory's standard settings. +

+ The newly created object factory for this context +
+ + + Create an internal object factory for this context. + + +

+ Called for each attempt. + This default implementation creates a + + with the internal object factory of this context's parent serving + as the parent object factory. Can be overridden in subclasse,s + for example to customize DefaultListableBeanFactory's settings. +

+
+ The object factory for this context. +
+ + + Determine whether the given object name is already in use within this context's object factory, + i.e. whether there is a local object or alias registered under this name. + + + + + An array of resource locations, referring to the XML object + definition files that this context is to be built with. + + +

+ Examples of the format of the various strings that would be + returned by accessing this property can be found in the overview + documentation of with the + class. +

+
+ + An array of resource locations, or if none. + +
+ + + An array of resources that this context is to be built with. + + +

+ Examples of the format of the various strings that would be + returned by accessing this property can be found in the overview + documentation of with the + class. +

+
+ + An array of s, or if none. + +
+ + + Subclasses must return their internal object factory here. + + + The internal object factory for the application context. + + + + + + + implementation that passes the application context to object that + implement the + , + , and + interfaces. + + +

+ If an object's class implements more than one of the + , + , and + interfaces, then the + order in which the interfaces are satisfied is as follows... + + + + + + + + + + + +

+

+ Application contexts will automatically register this with their + underlying object factory. Applications should thus never need to use + this class directly. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + The that this + instance will work with. + + + + + Apply this + to the given new object instance before any object + initialization callbacks. + + + The new object instance. + + + The name of the object. + + + The 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. + + + 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. + + + + + + Convenient superclass for application objects that want to be aware of + the application context, e.g. for custom lookup of collaborating object + or for context-specific resource access. + + +

+ It saves the application context reference and provides an + initialization callback method. Furthermore, it offers numerous + convenience methods for message lookup. +

+

+ There is no requirement to subclass this class: it just makes things + a little easier if you need access to the context, e.g. for access to + file resources or to the message source. Note that many application + objects do not need to be aware of the application context at all, + as they can receive collaborating objects via object references. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) +
+ + + To be implemented by any object that wishes to be notified + of the that it runs in. + + +

+ Implementing this interface makes sense when an object requires access + to a set of collaborating objects. Note that configuration via object + references is preferable to implementing this interface just for object + lookup purposes. +

+

+ This interface can also be implemented if an object needs access to + file resources, i.e. wants to call + , or access to + the . However, it is + preferable to implement the more specific + + interface to receive a reference to the + object in that scenario. +

+

+ Note that dependencies can also + be exposed as object properties of the + type, populated via strings with + automatic type conversion performed by an object factory. This obviates + the need for implementing any callback interface just for the purpose + of accessing a specific file resource. +

+

+ + is a convenience implementation of this interface for your + application objects. +

+

+ For a list of all object lifecycle methods, see the overview for the + interface. +

+
+ Rod Johnson + Mark Pollack (.NET) + + + +
+ + + 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. + + +
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + The that this + object runs in. + +
+ + + Intializes the wrapped + . + + +

+ This is a template method that subclasses can override for custom + initialization behavior. +

+

+ Gets called by the + + instance directly after setting the context instance. +

+ + Does not get called on reinitialization of the context. + +
+ + In the case of any initialization errors. + + + If thrown by application context methods. + +
+ + + The context class that any context passed to the + + must be an instance of. + + + The + . + + + + + Return a for the + application context used by this object, for easy message access. + + + + + Gets or sets the that this + object runs in. + + + When passed an unexpected + implementation + instance that is not compatible with the + defined by the value of the + . + property. Also, thrown when trying to re-initialize with a + different than was + originally used. + + + If thrown by any application context methods. + + + + + + + ApplicationContext that can scan to identify object definitions + + + + + Generic ApplicationContext implementation that holds a single internal + instance and does not + assume a specific object definition format. + + + Implements the interface in order + to allow for aplying any object definition readers to it. + Typical usage is to register a variety of object definitions via the + interface and then call + to initialize those + objects with application context semantics (handling + , auto-detecting + ObjectFactoryPostProcessors, etc). + + In contrast to other IApplicationContext implementations that create a new internal + IObjectFactory instance for each refresh, the internal IObjectFactory of this context + is available right from the start, to be able to register object definitions on it. + may only be called once + Usage examples + + GenericApplicationContext ctx = new GenericApplicationContext(); + // register your objects and object definitions + ctx.RegisterObjectDefinition(...) + ctx.Refresh(); + + + Mark Pollack + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true names in the context are case sensitive. + + + + Initializes a new instance of the class. + + The object factory instance to use for this context. + + + + Initializes a new instance of the class. + + The parent application context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + + + + Initializes a new instance of the class. + + The object factory to use for this context + The parent applicaiton context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + The object factory to use for this context + + + + Do nothing operation. We hold a single internal ObjectFactory and rely on callers + to register objects throug our public methods (or the ObjectFactory's). + + + In the case of errors encountered while refreshing the object factory. + + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + + + + Return the internal object factory of this application context. + + + + + + Gets the underlying object factory of this context, available for + registering object definitions. + + You need to call Refresh to initialize the + objects factory and its contained objects with application context + semantics (autodecting IObjectFactoryPostProcessors, etc). + The internal object factory (as DefaultListableObjectFactory). + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true names in the context are case sensitive. + + + + Initializes a new instance of the class. + + The object factory instance to use for this context. + + + + Initializes a new instance of the class. + + The parent application context. + + + + Initializes a new instance of the class. + + The name of the application context.if set to true names in the context are case sensitive.The parent application context. + + + + Initializes a new instance of the class. + + The object factory to use for this contextThe parent applicaiton context. + + + + Initializes a new instance of the class. + + The name of the application context.if set to true names in the context are case sensitive.The parent application context.The object factory to use for this context + + + + Creates an instance + using context definitions supplied in a custom configuration and + configures the with that instance. + + + Implementations of the + interface must provide the following two constructors: + + + + A constructor that takes a string array of resource locations. + + + + + A constructor that takes a reference to a parent application context + and a string array of resource locations (and in that order). + + + +

+ Note that if the type attribute is not present in the declaration + of a particular context, then a default + + is assumed. This default + + is currently the + ; please note the exact + of this default is an + implementation detail, that, while unlikely, may do so in the future. + to +

+
+ +

+ This is an example of specifying a context that reads its resources from + an embedded Spring.NET XML object configuration file... +

+ + + + +
+ + + + + + + + + +

+ This is an example of specifying a context that reads its resources from + a custom configuration section within the same application / web + configuration file and uses case insensitive object lookups. +

+

+ Please note that you must adhere to the naming + of the various sections (i.e. '<sectionGroup name="spring">' and + '<section name="context">'. +

+ + + + +
+
+ + + + + + + + + + + + +

+ And this is an example of specifying a hierarchy of contexts. The + hierarchy in this case is only a simple parent->child hierarchy, but + hopefully it illustrates the nesting of context configurations. This + nesting of contexts can be arbitrarily deep, and is one way... child + contexts know about their parent contexts, but parent contexts do not + know how many child contexts they have (if any), or have references + to any such child contexts. +

+ + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mark Pollack + Aleksandar Seovic + Rick Evans + + + + + Creates an instance + using the context definitions supplied in a custom + configuration section. + + +

+ This instance is + also used to configure the . +

+
+ + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + An instance + populated with the object definitions supplied in the configuration + section. + +
+ + + Create all child-contexts in the given for the given context. + + The parent context to use + The current configContext + The list of child context elements + + + + Instantiates a new context. + + + + + Gets the context's name specified in the name attribute of the context element. + + The current configContext + The context element + + + + Extracts the context-type from the context element. + If none is specified, returns the parent's type. + + + + + Extracts the case-sensitivity attribute from the context element + + + + + Gets the context specified in the type + attribute of the context element. + + +

+ If this attribute is not defined it defaults to the + type. +

+
+ + If the context type does not implement the + interface. + +
+ + + Returns the array of resources containing object definitions for + this context. + + + + + Returns the array of child contexts for this context. + + + + + The of + created if no type attribute is specified on a context element. + + + + + + Get the context's case-sensitivity to use if none is specified + + +

+ Derived handlers may override this property to change their default case-sensitivity. +

+

+ Defaults to 'true'. +

+
+
+ + + Specifies, whether the instantiated context will be automatically registered in the + global . + + + + + Returns if the context should be lazily + initialized. + + + + + Constants defining the structure and values associated with the + schema for laying out Spring.NET contexts in XML. + + + + + Defines a single + . + + + + + Specifies a context name. + + + + + Specifies if context should be case sensitive or not. Default is true. + + + + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but its generally regarded + as better form if the names of one's objects + are specified explicitly. +

+
+
+ + + Specifies whether context should be lazy initialized. + + + + + Defines an + + + + + Specifies the URI for an + . + + + + + Provides access to a central registry of + s. + + +

+ A singleton implementation to access one or more application contexts. Application + context instances are cached. +

+

Note that the use of this class or similar is unnecessary except (sometimes) for + a small amount of glue code. Excessive usage will lead to code that is more tightly + coupled, and harder to modify or test. Consider refactoring your code to use standard + Dependency Injection techniques or implement the interface IApplicationContextAware to + obtain a reference to an application context.

+
+ Mark Pollack + Aleksandar Seovic + +
+ + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the ContextRegistry class. + + +

+ Explicit static constructor to tell C# compiler + not to mark type as beforefieldinit. +

+
+
+ + + Registers an instance of an + . + + +

+ This is usually called via a + inside a .NET + application configuration file. +

+
+ The application context to be registered. + + If a context has previously been registered using the same name + +
+ + + Handles events raised by an application context. + + + + + + + Removes the context from the registry + + + Has no effect if the context wasn't registered + + ´the context to remove from the registry + + + + Returns the root application context. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The root application context. +
+ + + Returns context based on specified name. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The context name. + The specified context, or null, if context with that name doesn't exists. + + If the context name is null or empty + +
+ + + Removes all registered + s from this + registry. + + + Raises the event while still holding a lock on + + + + + Allows to check, if a context is already registered + + The context name. + true, if the context is already registered. false otherwise + + + + This event is fired, if ContextRegistry.Clear() is called.
+ Clients may register to get informed +
+ + This event is fired while still holding a lock on the Registry.
+ 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used +
+
+ + + Gets an object that should be used to synchronize access to ContextRegistry + from the calling code. + + + + + Default implementation of the + interface. + + +

+ Provides easy ways to store all the necessary values needed to resolve + messages from an . +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Describes objects that are suitable for message resolution in a + . + + +

+ Spring.NET's own validation error classes implement this interface. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + +

+ The last code will therefore be the default one. +

+
+ + A array of codes which are associated + with this message. + +
+ + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + Creates a new instance of the + class + using a single code. + + The message code to be resolved. + + + + Initializes a new instance of the class. + + The codes to be used to resolve this message + + + + Creates a new instance of the + class + using multiple codes. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + + + Creates a new instance of the + class + using multiple codes and a default message. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + The default message used if no code could be resolved. + + + + + Creates a new instance of the + class + from another resolvable. + + +

+ This is the copy constructor for the + class. +

+
+ + The to be copied. + + + If the supplied is . + +
+ + + Returns a representation of this + . + + + A representation of this + . + + + + + Calls the visit method on the supplied + to output a version of this class. + + The visitor to use. + + A representation of this + . + + + + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + + A array of codes which are associated + with this message. + + + + + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + + Return the default code for this resolvable. + + + The default code of this resolvable; this will be the last code in + the codes array, or if this instance has no + codes. + + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + + Default section handler that can handle any configuration section. + + +

+ Simply returns the configuration section as an . +

+
+ Aleksandar Seovic +
+ + + Returns the configuration section as an + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is a null reference. + + + The for the section. + + Config section as XmlElement. + + + + Empty implementation that + simply delegates all method calls to it's parent + . + + +

+ If no parent is available, + no messages will be resolved (and a + will be thrown). +

+

+ Used as placeholder by the + class, + if the context definition doesn't define its own + . Not intended for direct use + in applications. +

+
+ Juergan Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + + Helper class for easy access to messages from an + , providing various + overloaded GetMessage methods. + + +

+ Available from + , but also + reusable as a standalone helper to delegate to in application objects. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + + +
+ + + Creates a new instance of the + class + that uses the current + for all locale specific lookups. + + + The to use to locate messages. + + + + + Creates a new instance of the + class + + + The to use to locate + messages. + + + The to use for + locale specific messages. + + + + + Retrieve the message for the given code and the default + . + + The code of the message. + The message. + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + The message. + + + + Retrieve the message for the given code and the default + . + + The code of the message. + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + . + + + The . + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + in the given + . + + + The . + + + The to use for + lookups. + + The message + + If the message could not be found. + + + + + Visitor class to represent + instances. + + +

+ Used in the first instance to supply stringified versions of + instances. +

+

+ Other methods can be added here to return different representations, + including XML, CSV, etc.. +

+
+ Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + + + Outputs the supplied + as a nicely formatted . + + + The to output. + + + + + Configuration section handler for the (recommended, Spring.NET standard) parsers + config section. + + +

+ Spring.NET allows the registration of custom configuration parsers that + can be used to create simplified configuration schemas that better + describe object definitions. +

+

+ For example, Spring.NET uses this facility internally in order to + define simplified schemas for various AOP, Data and Services definitions. +

+
+ +

+ The following example shows how to configure both this section handler + and how to define custom configuration parsers within a Spring.NET + config section. +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Registers parsers specified in the (recommended, Spring.NET standard) + parsers config section with the . + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because parsers + are registered as a side-effect of this object's execution and there + is thus no need to return anything. + + + + + An that doesn't do a whole lot. + + +

+ is an implementation of + the NullObject pattern. It should be used in those situations where a + needs to be passed (say to a + method) but where the resolution of messages is not required. +

+

+ There should not (typically) be a need to instantiate instances of this class; + does not maintan any state + and the instance is + thus safe to pass around. +

+
+ Aleksandar Seovic +
+ + + The canonical instance of the + class. + + + + + Creates a new instance of the class. + + +

+ Consider using + instead. +

+
+
+ + + Simply returns the supplied message as-is. + + The code of the message to resolve. + + The to resolve the + code for. + + + The supplied message as-is. + + + + + Always returns . + + The code of the object to resolve. + + The to resolve the + code for. + + + (always). + + + + + Does nothing. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Handler for Spring.NET resourceHandlers config section. + + +

+ Spring allows registration of custom resource handlers that can be used to load + object definitions from. +

+

+ For example, if you wanted to store your object definitions in a database instead + of in the config file, you could write a custom implementation + and register it with Spring using 'db' as a protocol name. +

+

+ Afterwards, you would simply specify resource URI within the context config element + using your custom resource handler. +

+
+ +

+ The following example shows how to configure both this section handler, + how to define custom resource within Spring config section, and how to load + object definitions using custom resource handler: +

+ + + + +
+ + + + + + + + + + + + + + Aleksandar Seovic + + + + + Registers resource handlers that are specified in + the resources config section with the . + + + The configuration settings in a corresponding parent + configuration section. Ignored. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns null, because resource handlers are registered + as a sideffect of its execution and there is no need to return anything. + + + + + An implementation that + accesses resources from .resx / .resource files. + + Note that for the method + GetResourceObject if the resource name resolves to null, then in + .NET 1.1 the return value will be String.Empty whereas + in .NET 2.0 it will return null. + Griffin Caprio (.NET) + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + + + + Defines a simple initialization callback for objects that need to to some + post-initialization logic after all of their dependencies have been injected. + + +

+ An implementation of the + + method might perform some additional custom initialization (over and above that + performed by the constructor), or merely check that all mandatory properties + have been set (this last example is a very typical use case of this interface). +

+ + The use of the + interface + by non-Spring.NET framework code can be avoided (and is generally + discouraged). The Spring.NET container provides support for a generic + initialization method given to the object definition in the object + configuration store (be it XML, or a database, etc). This requires + slightly more configuration (one attribute-value pair in the case of + XML configuration), but removes any dependency on Spring.NET from the + class definition. + +
+ Rod Johnson + Rick Evans (.NET) + +
+ + + 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. + +
+ + + Creates a new instance of the + class. + + + + + Resolves a given code by searching through each assembly name in + the base names array. + + The code to resolve. + + The to use for lookups. + + The message from the resource set. + + + + Resolves a given code by searching through each assembly name in the array. + + The code to resolve. + + The to use for lookups. + + The object from the resource set. + + + + Uses a System.ComponentModel.ComponentResourceManager + to apply resources to object properties. + Resource key names are of the form objectName.propertyName + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + An object that contains the property values to be applied. + + + The base name of the object to use for the key lookup. + + + The to use for lookups. + If , uses the + value. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + + + Resolves a code into an object given a base name. + + The to search. + The code to resolve. + + The to use for lookups. + + The object from the resource file. + + + + Returns a representation of the + . + + A representation of the + . + + + + Invoked by an + after it has set all object properties supplied. + + +

+ The list may contain objects of type or + . types + are converted to instances using the notation + resourcename, assembly partial name. +

+
+ + If the conversion from a to a + can't be performed. + +
+ + + The collection of s + in this . + + + + + that allows concrete registration of + objects and messages in code, rather than from external configuration sources. + + +

+ Mainly useful for testing. +

+
+ Rod Johnson + Griffin Caprio (.NET) +
+ + + Creates a new instance of the StaticApplicationContext class. + + + + + Creates a new instance of the StaticApplicationContext class. + + The parent application context. + + + + Creates a new, named instance of the StaticApplicationContext class. + + the context name + The parent application context. + + + + Do nothing: we rely on callers to update our public methods. + + + + + Register a singleton object with the default object factory. + + The name of the object. + The of the object. + The property values for the singleton instance. + + + + Registers a prototype object with the default object factory. + + The name of the prototype object. + The of the prototype object. + The property values for the prototype instance. + + + + Associate the given message with the given code. + + The lookup code. + + The that the message should be found within. + + The message associated with the lookup code. + + + + Simple implementation of + that allows messages to be held in an object and added programmatically. + + +

+ Mainly useful for testing. +

+

+ This supports internationalization. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Returns a format string. + + The code of the message to resolve. + + The to resolve the + code for. + + + A format string or if not found. + + + + + + Resolves an object (typically an icon or bitmap). + + The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + + + + + + Applies resources to object properties. + + +

+ Uses a System.ComponentModel.ComponentResourceManager + internally to apply resources to object properties. Resource key + names are of the form objectName.propertyName. +

+

+ This feature is not currently supported on version 1.0 of the .NET platform. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + +
+ + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The message format associated with this lookup code. + + + + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The object associated with this lookup code. + + + + + Returns a representation of this + message source. + + + A containing all of this message + source's messages. + + + + + Configuration section handler for the Spring.NET typeAliases + config section. + + +

+ Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+

+ This includes type names specified within an object definition, as well + as values of the properties or constructor arguments that expect + instances. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type aliases within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeAliases config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of this + object's execution and thus there is no need to return anything. + + + + + Configuration section handler for the Spring.NET typeConverters + config section. + + +

+ Type converters are used to convert objects from one type into another + when injecting property values, evaluating expressions, performing data + binding, etc. +

+

+ They are a very powerful mechanism as they allow Spring.NET to automatically + convert string-based property values from the configuration file into the appropriate + type based on the target property's type or to convert string values submitted + via a web form into a type that is used by your data model when Spring.NET data + binding is used. Because they offer such tremendous help, you should always provide + a type converter implementation for your custom types that you want to be able to use + for injected properties or for data binding. +

+

+ The standard .NET mechanism for specifying type converter for a particular type is + to decorate the type with a , passing the type + of the -derived class as a parameter. +

+

+ This mechanism will still work and is a preferred way of defining type converters if + you control the source code for the type that you want to define a converter for. However, + this configuration section allows you to specify converters for the types that you don't + control and it also allows you to override some of the standard type converters, such as + the ones that are defined for some of the types in the .NET Base Class Library. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type converters within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeConverters config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of + its execution and thus there is no need to return anything. + + + + + An implementation that + reads context definitions from XML based resources. + + +

+ Currently, the resources that are supported are the file, + http, ftp, config and assembly resource + types. +

+

+ You can provide custom implementations of the + interface and and register them + with any that inherits + from the + + interface. +

+ + In case of multiple config locations, later object definitions will + override ones defined in previously loaded resources. This can be + leveraged to deliberately override certain object definitions via an + extra XML file. + +
+ +

+ Find below some examples of instantiating an + using a + variety of different XML resources. +

+ + // an XmlApplicationContext that reads its object definitions from an + // XML file that has been embedded in an assembly... + IApplicationContext context = new XmlApplicationContext + ( + "assembly://AssemblyName/NameSpace/ResourceName" + ); + + // an XmlApplicationContext that reads its object definitions from a + // number of disparate XML resources... + IApplicationContext context = new XmlApplicationContext + ( + // from an XML file that has been embedded in an assembly... + "assembly://AssemblyName/NameSpace/ResourceName", + // and from a (relative) filesystem-based resource... + "file://Objects/services.xml", + // and from an App.config / Web.config resource... + "config://spring/objects" + ); + +
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + +
+ + + Initializes a new instance of the XmlApplicationContext class. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The created context will be case sensitive. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + This constructor is meant to be used by derived classes. By passing =false, it is + the responsibility of the deriving class to call to initialize the context instance. + + if true, is called automatically. + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + An array of resource locations, referring to the XML object + definition files with which this context is to be built. + + + An array of resource locations, or if none. + + + + + + An array of resources instances with which this context is to be built. + + + An array of s, or if none. + + + + + + Encapsulates arguments to the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + + + + Initializes a new instance of the XmlApplicationContextArgs class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + if set to true [case sensitive]. + if set to true [refresh]. + + + Exception thrown during application context initialization. + Rod Johnson + Mark Pollack (.NET) + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException 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 ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the + class. + + + + + 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. + + + + + 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. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Marks an interface as being an application event listener. + + Griffin Caprio + + + + + Creates a new instance of the + class. + + + + + The callback for application events. + + + + + To be implemented by any object that wishes to be notified + of the associated with it. + + +

+ In the current implementation, the + will typically be the + associated that + spawned the implementing object. +

+

+ The can usually also be + passed on as an object reference to arbitrary object properties or + constructor arguments, because a + is typically defined as an + object with the well known name "messageSource" in the + associated application context. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Sets the associated + with this object. + + +

+ Invoked after population of normal object properties but + before an initializing callback such as the + + method of the + interface + or a custom init-method. +

+

+ It is also invoked before the + + property of any + + implementation. +

+
+ + The associated + with this object. + +
+ + + Interface to be implemented by any object that wishes to be notified + of the (typically the + ) that it runs in. + + +

+ Note that dependencies can also + be exposed as object properties of type + , populated via strings with + automatic type conversion by the object factory. This obviates the + need for implementing any callback interface just for the purpose of + accessing a specific resource. +

+

+ You typically need an + when your application object has to access a variety of file resources + whose names are calculated. A good strategy is to make the object use + a default resource loader but still implement the + interface to allow + for overriding when running in an + . +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Sets the + that this object runs in. + + +

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

+
+
+ + + Thrown when a message cannot be resolved. + + Rod Johnson + Mark Pollack (.NET) + + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class with the + specified message. + + + 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. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for given culture. + + + The that was used + to search for the code. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for the current UI culture. + + + + + Convenience base class for + implementations, pre-implementing typical behavior. + + +

+ The method will + check whether a or + can be opened; + will always return + ; + and + throw an exception; + and will + return the value of the + property. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Aleksandar Seovic (.NET) + +
+ + + The default special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + A string representation of the resource. + + + If the supplied is + or contains only whitespace character(s). + +
+ + + Strips any protocol name from the supplied + . + + +

+ If the supplied does not + have any protocol associated with it, then the supplied + will be returned as-is. +

+
+ + + GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); + // returns www.mycompany.com/resource.txt + + + + The name of the resource. + + + The name of the resource without the protocol name. + +
+ + + Resolves the supplied to its value + sans any leading protocol. + + + The name of the resource. + + + The name of the resource without the protocol name. + + + + + + Resolves the presence of the + value + in the supplied into a path. + + +

+ The default implementation simply returns the supplied + as is. +

+
+ + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + +
+ + + This implementation returns the + of this resource. + + + + + + Determines whether the specified is + equal to the current . + + +

+ This implementation compares values. +

+
+ +
+ + + Serves as a hash function for a particular type, suitable for use + in hashing algorithms and data structures like a hash table. + + +

+ This implementation returns the hashcode of the + property. +

+
+ +
+ + + Factory Method. Create a new instance of the current resource type using the given resourceName + + + + + The ResourceLoader to be used for resolving relative resources + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Creates a new resource that is relative to this resource based on the + supplied . + + +

+ This method can accept either a fully qualified resource name or a + relative resource name as it's parameter. +

+

+ A fully qualified resource is one that has a protocol prefix and + all elements of the resource name. All other resources are treated + as relative to this resource, and the following rules are used to + locate a relative resource: +

+ + + If the starts with '..', + the current resource path is navigated backwards before the + is concatenated to the current + of + this resource. + + + If the starts with '/', the + current resource path is ignored and a new resource name is + appended to the + of + this resource. + + + If the starts with '.' or a + letter, a new path is appended to the current + of + this resource. + + +
+ + The name of the resource to create. + + The relative resource. + + If the process of resolving the relative resource yielded an + invalid URI. + + + If this resource does not support the resolution of relative + resources (as determined by the value of the + + property). + + +
+ + + Calculates a new resource path based on the supplied + . + + + The relative path to evaluate. + + The newly calculated resource path. + + + + The special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+ +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the protocol associated with this resource (if any). + + +

+ The value of this property may be if no + protocol is associated with the resource type (for example if the + resource is a memory stream). +

+
+ + The protocol associated with this resource (if any). + +
+ + + Does this resource represent a handle with an open stream? + + +

+ This, the default implementation, always returns + . +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + + + + + Returns a handle for this resource. + + +

+ This, the default implementation, always throws a + , assuming that the + resource cannot be resolved to an absolute file path. +

+
+ + The handle for this resource. + + + This implementation always throws a + . + + + +
+ + + Does this resource actually exist in physical form? + + +

+ This implementation checks whether a + can be opened, falling back to whether a + can be opened. +

+

+ This will cover both directories and content resources. +

+

+ This implementation will also return if + permission to the (file's) path is denied. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + Does this support relative + resource retrieval? + + +

+ This property is generally to be consulted prior to attempting + to attempting to access a resource that is relative to this + resource (via a call to + ). +

+

+ This, the default implementation, always returns + . +

+
+ + if this + supports relative resource + retrieval. + +
+ + + Gets the root location of the resource. + + +

+ Where root resource can be taken to mean that part of the resource + descriptor that doesn't change when a relative resource is looked + up. Examples of such a root location would include a drive letter, + a web server name, an assembly name, etc. +

+
+ + The root location of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets the current path of the resource. + + +

+ An example value of this property would be the name of the + directory containing a filesystem based resource. +

+
+ + The current path of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets those characters that are valid path separators for the + resource type. + + +

+ An example value of this property would be the + and + values for a + filesystem based resource. +

+

+ Any derived classes that override this method are expected to + return a new array for each access of this property. +

+
+ + Those characters that are valid path separators for the resource + type. + + + This, the default implementation, always throws a + . + +
+ + + An implementation for + resources stored within assemblies. + + +

+ This implementation expects any resource name passed to the + constructor to adhere to the following format: +

+

+ assembly://assemblyName/namespace/resourceName +

+
+ Aleksandar Seovic (.NET) + Federico Spinazzi (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the assembly resource. + + + If the supplied did not conform + to the expected format. + + + If the assembly specified in the supplied + was loaded twice with two + different evidences. + + + If the assembly specified in the supplied + could not be found. + + + If the caller does not have the required permission to load + the assembly specified in the supplied + . + + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the caller does not have the required permission to load + the underlying assembly's manifest. + + + + + + + Does the embedded resource specified in the value passed to the + constructor exist? + + + if this resource actually exists in physical + form (for example on a filesystem). + + + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (the assembly name in this + case). + + + The root location of the resource. + + + + + + Gets the current path of the resource (the namespace in which the + target resource was embedded in this case). + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + + + + Used when retrieving information from the standard .NET configuration + files (App.config / Web.config). + + +

+ If created with the name of a configuration section, then all methods + aside from the description return , + , or throw an exception. If created with an + , then the + property + will return a corresponding to parse. +

+
+ Mark Pollack + Rick Evans +
+ + + Creates new instance of the + class. + + + The actual XML configuration section. + + + If the supplied is . + + + + + Creates new instance of the + class. + + + The name of the configuration section. + + + If the supplied is + or contains only whitespace character(s). + + + + + Returns the handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a description for this resource (the name of the + configuration section in this case). + + + A description for this resource. + + + + + + Does this resource actually exist in physical form? + + +

+ This implementation always returns . +

+
+ + + + + +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Exposes the actual for the + configuration section. + + +

+ Introduced to accomodate line info tracking during parsing. +

+
+
+ + + Holder that combines with a specific encoding to be used for reading + from the resource + + Juergen Hoeller + Erich Eichinger (.NET) + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + the resource to read from. Must not be null + whether to autoDetect encoding from byte-order marks () + + + + Create an encoded resource using the specified encoding. + + the resource to read from. Must not be null + the encoding to use. If null, encoding will be autodetected. + whether to autoDetect encoding from byte-order marks () + + + + + + + + + + Determine whether equals this instance. + + + true if obj is an and both + , and are equal. + + + + + Calculate the unique hash code for this instance. + + + + + + Get a textual description of the resource. + + + + + Get the underlying resource + + + + + Get the encoding to use for reading, if any. May be null + + + + + whether to autoDetect encoding from byte-order marks () + + + + + A backed resource. + + +

+ Supports resolution as both a and a + . +

+

+ Also supports the use of the ~ character. If the ~ character + is the first character in a resource path (sans protocol), the ~ + character will be replaced with the value of the + System.AppDomain.CurrentDomain.BaseDirectory property (an example of + this can be seen in the examples below). +

+
+ +

+ Consider the example of an application that is running (has been launched + from) the C:\App\ directory. The following resource paths will map + to the following resources on the filesystem... +

+ + strings.txt C:\App\strings.txt + ~/strings.txt C:\App\strings.txt + file://~/strings.txt C:\App\strings.txt + file://~/../strings.txt C:\strings.txt + ../strings.txt C:\strings.txt + ~/../strings.txt C:\strings.txt + + // note that only a leading ~ character is resolved to the executing directory... + stri~ngs.txt C:\App\stri~ngs.txt + +
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + If the supplied is + or contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + Supresses initialization of this instance. Used from derived classes. + + + If the supplied is + or contains only whitespace character(s). + + + + + Initializes this instance. + + + + + + Resolves the handle + for the supplied . + + + The name of the file system resource. + + + The handle for this resource. + + + + + Resolves the root location for the supplied . + + + The name of the file system resource. + + + The root location of the resource. + + + + + Resolves the path for the supplied . + + + The name of the file system resource. + + + The current path of the resource. + + + + + Resolves the presence of the + value + in the supplied into a path. + + + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the underlying handle for + this resource. + + + The handle for this resource. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (a drive or UNC file share + name in this case). + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the underlying file could not be found. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + adapter implementation for a + . + + +

+ Should only be used if no other + implementation is applicable. +

+

+ In contrast to other + implementations, this is an adapter for an already opened + resource - the + therefore always returns . Do not use this class + if you need to keep the resource descriptor somewhere, or if you need + to read a stream multiple times. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The input to use. + + + Where the input comes from. + + + If the supplied is + . + + + + + The input to use. + + + If the underlying has already + been read. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Custom type converter for instances. + + +

+ A resource path may contain placeholder variables of the form ${...} + that will be expended to environment variables. +

+

+ Currently only supports conversion from a + instance. +

+
+ +

+ On Win9x boxes, this resource path, ${userprofile}\objects.xml will + be expanded at runtime with the value of the 'userprofile' environment + variable substituted for the '${userprofile}' portion of the path. +

+ + // assuming a user called Rick, running on a plain vanilla Windows XP setup... + // this resource path... + + ${userprofile}\objects.xml + + // will become (after expansion)... + + C:\Documents and Settings\Rick\objects.xml + +
+ Mark Pollack + + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified resourceLoader. + + the underlying IResourceLoader to be used to resolve resources + + + + Returns whether this converter can convert an object of one + to a + + + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + + + + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An if successful. + + + If the resource name objectained form the supplied + is malformed. + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + Resolve the given path, replacing placeholder values with + corresponding property values if necessary. + + +

+ This implementation resolves environment variables only. +

+
+ The original resource path. + The resolved resource path. +
+ + + Return the used to + resolve the string. + + + The used to resolve + the string. + + + + + Registry class that allows users to register and retrieve protocol handlers. + + + + Resource handler is an implementation of interface + that should be used to process resources with the specified protocol. + + + They are used throughout the framework to access resources from various + sources. For example, application context loads object definitions from the resources + that are processed using one of the registered resource handlers. + + Following resource handlers are registered by default: + + + Protocol + Handler Type + Description + + + config + + Resolves the resources by loading specified configuration section from the standard .NET config file. + + + file + + Resolves filesystem resources. + + + http + + Resolves remote web resources. + + + https + + Resolves remote web resources via HTTPS. + + + ftp + + Resolves ftp resources. + + + assembly + + Resolves resources that are embedded into an assembly. + + + web + Spring.Core.IO.WebResource, Spring.Web* + Resolves resources relative to the web application's virtual directory. + + + * only available in web applications. + + Users can create and register their own protocol handlers by implementing interface + and mapping custom protocol name to that implementation. See for details + on how to register custom protocol handler. + + + Aleksandar Seovic + + + + Name of the .Net config section that contains definitions + for custom resource handlers. + + + + + Registers standard and user-configured resource handlers. + + + + + Returns resource handler for the specified protocol name. + + + + This method returns object that should be used + to create an instance of the -derived type by passing + resource location as a parameter. + + + Name of the protocol to get the handler for. + Resource handler constructor for the specified protocol name. + If is null. + + + + Returns true if a handler is registered for the specified protocol, + false otherwise. + + Name of the protocol. + + true if a handler is registered for the specified protocol, false otherwise. + + If is null. + + + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The type name of the concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Allows to create any arbitrary Url format + + + + + A adapter implementation encapsulating a simple string. + + Erich Eichinger + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Get the to + for accessing this resource. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Gets the encoding used to create a byte stream of the string. + + + + + Gets the content encapsulated by this . + + + + + A backed resource + on top of + + +

+ Obviously supports resolution as a , and also + as a in the case of the "file:" + protocol. +

+
+ +

+ Some examples of the strings that can be used to initialize a new + instance of the class + include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) + + + +
+ + + Creates a new instance of the + class. + + +

+ Some examples of the values that the + can typically be expected to hold include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ + A string representation of the resource. + +
+ + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the instance + used for the resource resolution. + + + A instance. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + Returns a handle for this resource. + + + The handle for this resource. + + + If the resource is not available on a filesystem. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource. + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Converts string representation of a credential for Web client authentication + into an instance of . + + +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. +

+ + + + + + +
+ Bruno Baia +
+ + + Can we convert from the sourcetype + to a instance ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A instance if successful. + + + + + A custom for any + primitive numeric type such as , + , , etc. + + +

+ Can use a given for + (locale-specific) parsing and rendering. +

+

+ This is not meant to be used as a system + but rather as a + locale-specific number converter within custom controller code, to + parse user-entered number strings into number properties of objects, + and render them in a UI form. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The primitive numeric to convert to. + + + The to use for + (locale-specific) parsing and rendering + + + Is an empty string allowed to be converted? If + , an empty string value will be converted to + numeric 0. + + Id the supplied is not a primitive + . + + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + +
+ + + Converts the specified object (a string) to the required primitive + type. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + A primitive representation of the string value. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Custom implementation for + objects. + + +

+ Handles conversion from an XML formatted string to a + object + (see below for an example of the expected XML format). +

+

+ This converter must be registered before it will be available. Standard + converters in this namespace are automatically registered by the + class. +

+
+ +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. Note that the name of the top level + (document) element is quite arbitrary... it is only the content that + matters (and which must be in the format + <add key="..." value="..."/>. For your continued sanity + though, you may wish to standardize on the top level name of + 'dictionary' (although you are of course free to not do so). +

+ + + + + + +

+ The following example uses a different top level (document) element + name, but is equivalent to the first example. +

+ + + + + + +
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from an + XML formatted instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + + + + Converts string representation of a regular expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts string representation of the registry key + into instance. + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Generates partial registry key name. + + + Key elements. + + + Index of the last element to use. + + + Friendly key name containing key element from + 0 to , inclusive. + + + + + Returns for the specified + root hive name. + + + Root hive name. + + + Registry key for the specified name. + + + + + Converts a two part string, (resource name, assembly name) + to a ResourceManager instance. + + + + + This constant represents the name of the folder/assembly containing global resources. + + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + If the specified does not denote a valid resource + + + + Converter for from a comma separated + list of RBG values. + + +

+ Please note that this class does not implement converting + to a comma separated list of RBG values from a + . +

+
+ Federico Spinazzi +
+ + + Returns whether this converter can convert an object of one + to a + . + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Converts the specified object (a string) a + instance. + + + A + that provides a format context. + + + The to use + as the current culture: currently ignored. + + + The value that is to be converted, in "R,G,B", "A,R,G,B", or + symbolic color name (). + + + A representation of the string value. + + + If the input string is not in a supported format, or is not one of the + predefined system colors (). + + + + + A custom for + runtime type references. + + +

+ Currently only supports conversion to and from a + . +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to the + of this converter. + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Returns whether this converter can convert the object to the specified + . + + + A + that provides a format context. + + + A that represents the + you want to convert to. + + True if the conversion is possible. + + + + Converts the given value to the type of this converter. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An that represents the converted value. + + + + + Converts the given value object to the specified type, + using the specified context and culture information. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + The to convert the + parameter to. + + + An that represents the converted value. + + + + + Converter for to directly set a + property. + + Jurgen Hoeller + Mark Pollack (.NET) + + + + Create a new StreamConverter using the default + . + + + + + Create a new StreamConverter using the given + . + + + The to use. + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts a separated to a + array. + + +

+ Defaults to using the , (comma) as the list separator. Note that the value + of the current is + not used. +

+

+ If you want to provide your own list separator, you can set the value of the + + property to the value that you want. Please note that this value will be used + for all future conversions in preference to the default list separator. +

+

+ Please note that the individual elements of a string will be passed + through as is (i.e. no conversion or trimming of surrounding + whitespace will be performed). +

+

+ This should be + automatically registered with any + implementations. +

+
+ + + public class StringArrayConverterExample + { + public static void Main() + { + StringArrayConverter converter = new StringArrayConverter(); + + string csvWords = "This,Is,It"; + string[] frankBoothWords = converter.ConvertFrom(csvWords); + + // the 'frankBoothWords' array will have 3 elements, namely + // "This", "Is", "It". + + // please note that extraneous whitespace is NOT trimmed off + // in the current implementation... + string csv = " Cogito ,ergo ,sum "; + string[] descartesWords = converter.ConvertFrom(csv); + + // the 'descartesWords' array will have 3 elements, namely + // " Cogito ", "ergo ", "sum ". + // notice how the whitespace has NOT been trimmed. + } + } + + + +
+ + + Can we convert from a the sourcetype to a array? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to a + array. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + The value that will be used as the list separator when performing + conversions. + + + A 'single' string character that will be used as the list separator + when performing conversions. + + + If the supplied value is not and is an empty + string, or has more than one character. + + + + + Base parser for custom specifiers. + + + + + Convert int value to a Timespan based on the specifier + + + + + + + Check if the string contains the specifier and + + + + + + + Specifier + + + + + Recognize 10d as ten days + + + + + Parse value as days + + Timespan in days + + + + + Day specifier: d + + + + + Recognize 10h as ten hours + + + + + Parse value as hours + + Timespan in hours + + + + + Hour specifier: h + + + + + Recognize 10m as ten minutes + + + + + Parse value as minutes + + Timespan in minutes + + + + + Minute specifier: m + + + + + Recognize 10s as ten seconds + + + + + Parse value as seconds + + Timespan in seconds + + + + + Second specifier: s + + + + + Recognize 10ms as ten milliseconds + + + + + Parse value as milliseconds + + Timespan in milliseconds + + + + + Millisecond specifier: ms + + + + + Converter for instances. + + Bruno Baia + Roberto Paterlini + + + + Creates a new instance of the + class. + + + + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Utility methods that are used to convert objects from one type into another. + + Aleksandar Seovic + + + + Convert the value to the required (if necessary from a string). + + The proposed change value. + + The we must convert to. + + Property name, used for error reporting purposes... + + If there is an internal error. + + The new value, possibly the result of type conversion. + + + + Utility method to create a property change event. + + + The full name of the property that has changed. + + The property old value + The property new value + + A new . + + + + + Determines if a Type implements a specific generic interface. + + Candidate to evaluate. + The to test for in the Candidate . + if a match, else + + + + Registry class that allows users to register and retrieve type converters. + + Aleksandar Seovic + + + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + Registers standard and configured type converters. + + + + + Returns for the specified type. + + Type to get the converter for. + a type converter for the specified type. + If is null. + + + + Registers for the specified type. + + Type to register the converter for. + Type converter to register. + If either of arguments is null. + + + + Registers for the specified type. + + + This is a convinience method that accepts the names of both + type to register converter for and the converter itself, + resolves them using , creates an + instance of type converter and calls overloaded + method. + + Type name of the type to register the converter for (can be a type alias). + Type name of the type converter to register (can be a type alias). + If either of arguments is null or empty string. + + If either of arguments fails to resolve to a valid . + + + If type converter does not derive from or if it cannot be instantiated. + + + + + Converts between instances of and their string representations. + + Erich Eichinger + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A that provides a format context. + + + A that represents the you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful, otherwise. + + The conversion cannot be performed. + + + + Returns whether this converter can convert the object to the specified type, using the specified context. + + An that provides a format context. + A that represents the type you want to convert to. + + true if this converter can perform the conversion; otherwise, false. + + + At the moment only conversion to string is supported. + + + + + Converts the given value object to the specified type, using the specified context and culture information. + + + + An that represents the converted value. + + + A . If null is passed, the current culture is assumed. + An that provides a format context. + The to convert the value parameter to. + The to convert. + The conversion cannot be performed. + The destinationType parameter is null. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Resolves (instantiates) a by it's (possibly + assembly qualified) name, and caches the + instance against the type name. + + Rick Evans + Bruno Baia + Erich Eichinger + + + + Resolves a by name. + + +

+ The rationale behind the creation of this interface is to centralise + the resolution of type names to instances + beyond that offered by the plain vanilla + method call. +

+
+ Rick Evans +
+ + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + The cache, mapping type names ( instances) against + instances. + + + + + Creates a new instance of the class. + + + The that this instance will delegate + actual resolution to if a + cannot be found in this instance's cache. + + + If the supplied is . + + + + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holder for the generic arguments when using type parameters. + + +

+ Type parameters can be applied to classes, interfaces, + structures, methods, delegates, etc... +

+
+
+ + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The character that separates a list of generic arguments. + + + + + Creates a new instance of the GenericArgumentsHolder class. + + + The string value to parse looking for a generic definition + and retrieving its generic arguments. + + + + + Returns the array declaration portion of the definition, e.g. "[,]" + + + + + + Returns an array of unresolved generic arguments types. + + +

+ A empty string represents a type parameter that + did not have been substituted by a specific type. +

+
+ + An array of strings that represents the unresolved generic + arguments types or an empty array if not generic. + +
+ + + The (unresolved) generic type name portion + of the original value when parsing a generic type. + + + + + The (unresolved) generic method name portion + of the original value when parsing a generic method. + + + + + Is the string value contains generic arguments ? + + +

+ A generic argument can be a type parameter or a type argument. +

+
+
+ + + Is generic arguments only contains type parameters ? + + + + + Is this an array type definition? + + + + + Resolves a generic by name. + + Bruno Baia + + + + Resolves a by name. + + Rick Evans + Aleksandar Seovic + Bruno Baia + + + + Resolves the supplied to a + instance. + + + The unresolved (possibly partially assembly qualified) name + of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Uses + to load an and then the attendant + referred to by the + parameter. + + +

+ is + deprecated in .NET 2.0, but is still used here (even when this class is + compiled for .NET 2.0); + will + still resolve (non-.NET Framework) local assemblies when given only the + display name of an assembly (the behaviour for .NET Framework assemblies + and strongly named assemblies is documented in the docs for the + method). +

+
+ + The assembly and type to be loaded. + + + A , or . + + + + +
+ + + Uses + to load the attendant referred to by + the parameter. + + + The type to be loaded. + + + A , or . + + + + + Creates a new instance + from the given + + + + + Creates a new instance + from the given with the given inner + + + + + Resolves the supplied generic to a + instance. + + + The unresolved (possibly generic) name of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holds data about a and it's + attendant . + + + + + The string that separates a name + from the name of it's attendant + in an assembly qualified type name. + + + + + Creates a new instance of the TypeAssemblyHolder class. + + + The unresolved name of a . + + + + + The (unresolved) type name portion of the original type name. + + + + + The (unresolved, possibly partial) name of the attandant assembly. + + + + + Is the type name being resolved assembly qualified? + + + + + Provides access to a central registry of aliased s. + + +

+ Simplifies configuration by allowing aliases to be used instead of + fully qualified type names. +

+

+ Comes 'pre-loaded' with a number of convenience alias' for the more + common types; an example would be the 'int' (or 'Integer' + for Visual Basic.NET developers) alias for the + type. +

+
+ Aleksandar Seovic + +
+ + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + The alias around the 'int' type. + + + + + The alias around the 'Integer' type (Visual Basic.NET style). + + + + + The alias around the 'int[]' array type. + + + + + The alias around the 'Integer()' array type (Visual Basic.NET style). + + + + + The alias around the 'decimal' type. + + + + + The alias around the 'Decimal' type (Visual Basic.NET style). + + + + + The alias around the 'decimal[]' array type. + + + + + The alias around the 'Decimal()' array type (Visual Basic.NET style). + + + + + The alias around the 'char' type. + + + + + The alias around the 'Char' type (Visual Basic.NET style). + + + + + The alias around the 'char[]' array type. + + + + + The alias around the 'Char()' array type (Visual Basic.NET style). + + + + + The alias around the 'long' type. + + + + + The alias around the 'Long' type (Visual Basic.NET style). + + + + + The alias around the 'long[]' array type. + + + + + The alias around the 'Long()' array type (Visual Basic.NET style). + + + + + The alias around the 'short' type. + + + + + The alias around the 'Short' type (Visual Basic.NET style). + + + + + The alias around the 'short[]' array type. + + + + + The alias around the 'Short()' array type (Visual Basic.NET style). + + + + + The alias around the 'unsigned int' type. + + + + + The alias around the 'unsigned long' type. + + + + + The alias around the 'ulong[]' array type. + + + + + The alias around the 'uint[]' array type. + + + + + The alias around the 'unsigned short' type. + + + + + The alias around the 'ushort[]' array type. + + + + + The alias around the 'double' type. + + + + + The alias around the 'Double' type (Visual Basic.NET style). + + + + + The alias around the 'double[]' array type. + + + + + The alias around the 'Double()' array type (Visual Basic.NET style). + + + + + The alias around the 'float' type. + + + + + The alias around the 'Single' type (Visual Basic.NET style). + + + + + The alias around the 'float[]' array type. + + + + + The alias around the 'Single()' array type (Visual Basic.NET style). + + + + + The alias around the 'DateTime' type. + + + + + The alias around the 'DateTime' type (C# style). + + + + + The alias around the 'DateTime' type (Visual Basic.NET style). + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime()' array type (Visual Basic.NET style). + + + + + The alias around the 'bool' type. + + + + + The alias around the 'Boolean' type (Visual Basic.NET style). + + + + + The alias around the 'bool[]' array type. + + + + + The alias around the 'Boolean()' array type (Visual Basic.NET style). + + + + + The alias around the 'string' type. + + + + + The alias around the 'string' type (Visual Basic.NET style). + + + + + The alias around the 'string[]' array type. + + + + + The alias around the 'string[]' array type (Visual Basic.NET style). + + + + + The alias around the 'object' type. + + + + + The alias around the 'object' type (Visual Basic.NET style). + + + + + The alias around the 'object[]' array type. + + + + + The alias around the 'object[]' array type (Visual Basic.NET style). + + + + + The alias around the 'int?' type. + + + + + The alias around the 'int?[]' array type. + + + + + The alias around the 'decimal?' type. + + + + + The alias around the 'decimal?[]' array type. + + + + + The alias around the 'char?' type. + + + + + The alias around the 'char?[]' array type. + + + + + The alias around the 'long?' type. + + + + + The alias around the 'long?[]' array type. + + + + + The alias around the 'short?' type. + + + + + The alias around the 'short?[]' array type. + + + + + The alias around the 'unsigned int?' type. + + + + + The alias around the 'unsigned long?' type. + + + + + The alias around the 'ulong?[]' array type. + + + + + The alias around the 'uint?[]' array type. + + + + + The alias around the 'unsigned short?' type. + + + + + The alias around the 'ushort?[]' array type. + + + + + The alias around the 'double?' type. + + + + + The alias around the 'double?[]' array type. + + + + + The alias around the 'float?' type. + + + + + The alias around the 'float?[]' array type. + + + + + The alias around the 'bool?' type. + + + + + The alias around the 'bool?[]' array type. + + + + + Registers standard and user-configured type aliases. + + + + + Registers an alias for the specified . + + +

+ This overload does eager resolution of the + referred to by the parameter. It will throw a + if the referred + to by the parameter cannot be resolved. +

+
+ + A string that will be used as an alias for the specified + . + + + The (possibly partially assembly qualified) name of the + to register the alias for. + + + If either of the supplied parameters is or + contains only whitespace character(s). + + + If the referred to by the supplied + cannot be loaded. + +
+ + + Registers short type name as an alias for + the supplied . + + + The to register. + + + If the supplied is . + + + + + Registers an alias for the supplied . + + + The alias for the supplied . + + + The to register the supplied under. + + + If the supplied is ; or if + the supplied is or + contains only whitespace character(s). + + + + + Resolves the supplied to a . + + + The alias to resolve. + + + The the supplied was + associated with, or if no + was previously registered for the supplied . + + + If the supplied is or + contains only whitespace character(s). + + + + + Returns a flag specifying whether TypeRegistry contains + specified alias or not. + + + Alias to check. + + + true if the specified type alias is registered, + false otherwise. + + + + + Helper methods with regard to type resolution. + + +

+ Not intended to be used directly by applications. +

+
+ Bruno Baia +
+ + + Creates a new instance of the class. + + +

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

+
+
+ + + Resolves the supplied type name into a + instance. + + +

+ If you require special resolution, do + not use this method, but rather instantiate + your own . +

+
+ + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the type cannot be resolved. + +
+ + + Resolves a string array of interface names to + a array. + + + An array of valid interface names. Each name must include the full + interface and assembly name. + + An array of interface s. + + If any of the interfaces can't be loaded. + + + If any of the s specified is not an interface. + + + If (or any of its elements ) is + . + + + + + Match a method against the given pattern. + + the pattern to match against. + the method to match. + + if the method matches the given pattern; otherwise . + + + If the supplied is invalid. + + + + + Exception thrown when the ObjectFactory cannot load the specified type of a given object. + + Mark Pollack + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException 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 ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Initializes 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. + + + + + Initializes a new instance of the class. + + The resource description that the object definition came from. + Name of the object requested + Name of the object type. + The root cause. + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Gets he name of the object we are trying to load. + + The name of the object. + + + + Gets the name of the object type we are trying to load. + + The name of the object type. + + + + Gets the resource description that the object definition came from + + The resource description. + + + + A implementation that represents + a composed collection of instances. + + + + + The criteria for an arbitrary filter. + + Rick Evans + + + + Does the supplied satisfy the criteria + encapsulated by this instance? + + + The datum to be checked by this criteria instance. + + + if the supplied + satisfies the criteria encapsulated by this instance; + if not, or the supplied + is . + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A user-defined (child) criteria that will be composed into this instance. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The data to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Adds the supplied into the criteria + composed within this instance. + + + The to be added. + + + + + The list of composing this + instance. + + + + + Factory class to conceal any default implementation. + + Rod Johnson + Simon White (.NET) + + + + Creates a new instance of the + implementation provided by this factory. + + + A new instance of the + implementation provided by this factory. + + + + + Interface to be implemented by objects that can return information about + the current call stack. + + +

+ Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + The to look for. + + + if the caller is under the supplied . + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + + The to look for. + + The name of the method to look for. + + if the caller is under the supplied + and . + + + + + Does the current stack trace contain the supplied ? + + The token to match against. + + if the current stack trace contains the supplied + . + + + + + Creates a new instance of the + class. + + + + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + +

+ Matches the whole method name. +

+
+ +
+ + + Does the current stack trace contain the supplied ? + + +

+ This leaves it up to the caller to decide what matches, but is obviously less of + an abstraction because the caller must know the exact format of the underlying + stack trace. +

+
+ +
+ + + Provides methods to support various naming and other conventions used throughout the framework. + Mainly for internal use within the framework. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + Convert Strings in attribute name format (lowercase, hyphens separating words) + into property name format (camel-cased). For example, transaction-manager is + converted into transactionManager. + + + + + Convenience class that exposes a signature that matches the + delegate. + + +

+ Useful when filtering members via the + mechanism. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + + + Returns true if the supplied instance + satisfies the supplied (which must be an + implementation). + + + The instance that will be checked to see if + it matches the supplied . + + + The criteria against which to filter the supplied + instance. + + + True if the supplied instance + satisfies the supplied (which must be an + implementation); false if not or the + supplied is not an + implementation or is null. + + + + + Interface that can be implemented by exceptions etc that are error coded. + + +

+ The error code is a , rather than a number, so it can + be given user-readable values, such as "object.failureDescription". +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Return the error code associated with this failure. + + +

+ The GUI can render this anyway it pleases, allowing for I18n etc. +

+
+ + The error code associated with this failure, + or the empty string instance if not error-coded. + +
+ + + Thrown in response to referring to an invalid property (most often via reflection). + + Rick Evans + + + + 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. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + Creates a new instance of the + class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + + + Creates a new instance of the InvalidPropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The that is (or rather was) the source of the + offending property. + + + + + The name of the offending property. + + + + + Extension of the interface, expressing a 'priority' + ordering: Order values expressed by IPriorityOrdered objects always + apply before order values of 'plain' Ordered values. + + + This is primarily a special-purpose interface, used for objects + where it is particularly important to determine 'prioritized' + objects first, without even obtaining the remaining objects. + A typical example: Prioritized post-processors in a Spring + + + IPriorityOrdered post-processor objects are initialized in + a special phase, ahead of other post-processor objects. + + Juergen Hoeller + Mark Pollack (.NET) + + + + + + + Criteria that is satisfied if the of each of the + arguments matches each of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + +

+ This implementation respects the inheritance chain of any parameter + s... i.e. methods that have a base type (or + interface) that is assignable to the in the + same corresponding index of the parameter types will satisfy this + criteria instance. +

+
+ The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + +
+ + + Criteria that is satisfied if the number of generic arguments to a given + matches an arbitrary number. + + +

+ This class supports checking the generic arguments count of both + generic methods and constructors. +

+
+ Bruno Baia +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Thrown when a method (typically a property getter or setter invoked via reflection) + throws an exception, analogous to a . + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for exceptions related to a property access, such as a + mismatch or a target invocation exception. + + Rod Johnson + Mark Pollack (.NET) + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessException class. + + + + + Creates a new instance of the PropertyAccessException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Returns the PropertyChangeEventArgs that resulted in the problem. + + + + + The string error code used to classify the error. + + + + + Creates a new instance of the MethodInvocationException class. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Constructor to use when an exception results from a + . + + + The raised by the invoked property. + + + The that + resulted in an exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The error code string for this exception. + + + + + Criteria that is satisfied if the method Name of an + instance matches a + supplied string pattern. + + + + Supports the following simple pattern styles: + "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + + Bruno Baia + + + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to * (any method name). +

+
+
+ + + Creates a new instance of the + class. + + The pattern that names + must match against in order to satisfy this criteria. + + If the supplied is null or resolve to an empty string. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is null or resolve to an empty string. + + + + + Helper class that encapsulates the specification of a method parameter, i.e. + a MethodInfo or ConstructorInfo plus a parameter index. + Useful as a specification object to pass along. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + Initializes a new instance of the class for the given + MethodInfo. + + The MethodInfo to specify a parameter for. + Index of the parameter. + + + + Initializes a new instance of the class. + + The ConstructorInfo to specify a parameter for. + Index of the parameter. + + + + Create a new MethodParameter for the given method or donstructor. + This is a convenience constructor for scenarios where a + Method or Constructor reference is treated in a generic fashion. + + The method or constructor to specify a parameter for. + Index of the parameter. + the corresponding MethodParameter instance + + + + Parameters the name of the method/constructor parameter. + + the parameter name. + + + + Gets the type of the method/constructor parameter. + + The type of the parameter. (never null) + + + + Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The MethodInfo, or null if none. + + + + Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The ConstructorInfo, or null if none + + + + Return the annotations associated with the specific method/constructor parameter. + + + + + Return the annotations associated with the target method/constructor itself. + + + + + Criteria that is satisfied if the number of parameters to a given + matches an arbitrary number. + + +

+ This class supports checking the parameter count of both methods and + constructors. +

+

+ Default parameters, etc need to taken into account. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Criteria that is satisfied if the of each of the + parameters of a given matches each + of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the return of a given + matches a given . + + Rick Evans + + + + The return to match against if no + is provided explictly. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Thrown in response to a failed attempt to read a property. + + +

+ Typically thrown when attempting to read the value of a write-only + property via reflection. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + 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. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + 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. + + + + + Thrown in response to a failed attempt to write a property. + + Mark Pollack (.NET) + + + + Creates a new instance of the NotWritablePropertyException class. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class + summarizing what property was not writable. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + + + Creates new NotWritablePropertyException with a root cause. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + The root cause indicating why the property was not writable. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to encountering a value + when traversing a nested path expression. + + + + + 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 of the object where the property was not found. + + The name of the property not found. + + + + Creates a new instance of the + class. + + + The of the object where the property was not found. + + The name of the property not found. + A message about the exception. + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the offending property. + + + + + The of the class where the property was last looked for. + + + + + Comparator implementation for objects, sorting by + order value ascending (resp. by priority descending). + + +

+ Non- objects are treated as greatest order values, + thus ending up at the end of a list, in arbitrary order (just like same order values of + objects). +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Comparator implementation for objects, sorting by + order value ascending (resp. by priority descending). + + +

+ Non- objects are treated as greatest order values, + thus ending up at the end of a list, in arbitrary order (just like same order values of + objects). +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Compares two objects and returns a value indicating whether one is less than, + equal to or greater than the other. + + +

+ Uses direct evaluation instead of + to avoid unnecessary boxing. +

+
+ The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + +
+ + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + Provides additional data for the PropertyChanged event. + + +

+ Provides some additional properties over and above the name of the + property that has changed (which is inherited from the + base class). + This allows calling code to determine whether or not a property has + actually changed (i.e. a PropertyChanged event may have been + raised, but the value itself may be equivalent). +

+
+ +
+ + + Create a new instance of the + class. + + + The name of the property that was changed. + The old value of the property. + the new value of the property. + + + + Get the old value for the property. + + + + + + Get the new value of the property. + + + + + + A base class for all + implementations that are regular expression based. + + Rick Evans + + + + The default pattern... matches absolutely anything. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The regular expression pattern to be applied. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Convenience method that calls the + + on the supplied . + + The input to match against. + True if the matches. + + + + The regular expression pattern to be applied. + + + + + The regular expression options to be applied. + + + + + The regular expression to be applied. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default event name pattern... matches pretty much any event name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default method name pattern... matches pretty much any method name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Exception thrown on a mismatch when trying to set a property + or resolve an argument to a method invocation. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the TypeMismatchException class. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the TypeMismatchException class describing the + property and required type that could not used to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + + + + Creates a new instance of the TypeMismatchException class describing the + property, required type, and underlying exception that could not be used + to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + The underlying exception. + + + + Creates a new instance of the TypeMismatchException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The string error code used to classify the exception. + + + + + Abstract base class for implementations. + + Aleksandar Seovic + + + + An interface that defines the methods that have to be implemented by all data bindings. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + The name of the always filled error provider + + + + + Gets or sets a flag specifying whether this binding is valid. + + + true if this binding evaluated without errors; + false otherwise. + + + + + Marks this binding's state as invalid for this validationErrors collection. + Returns false if is null. + + + false, if validationErrors is null + + + + Initializes a new instance of the class. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets the unique ID of this binding instance. + + + + + Gets or sets the . + + The binding direction. + + + + Gets the error message. + + The error message. + + + + Gets the error providers. + + + + + Abstract base class for simple, one-to-one implementations. + + Aleksandar Seovic + + + + Initialize a new instance of without any + + + + + Initialize a new instance of with the + specified . + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation if source to target binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation of target to source binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets or sets the to use. + + The formatter to use. + + + + Base implementation of the . + + Aleksandar Seovic + + + + An interface that has to be implemented by all data binding containers. + + Aleksandar Seovic + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Gets a value indicating whether this data binding container + has bindings. + + + true if this data binding container has bindings; + false otherwise. + + + + + Creates a new instance of . + + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Implemented as a NOOP for containers. + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Gets a list of bindings for this container. + + + A list of bindings for this container. + + + + + Gets a value indicating whether this instance has bindings. + + + true if this instance has bindings; otherwise, false. + + + + + BaseBindingManager keeps track of all registered bindings and + represents an entry point for the binding and unbinding process. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Enumeration that defines possible values for data binding direction. + + Aleksandar Seovic + + + + Specifies that value from the control property should be bound to a data model. + + + + + Specifies that value from the data model should be bound to control property. + + + + + Specifies that binding is bidirectional. + + + + + Represents an ErrorMessage specific to a binding instance. + + Erich Eichinger + + + + Represents a single validation error message. + + Aleksandar Seovic + Goran Milosavljevic + + + + Default constructor. + + + + + Initializes a new instance of the class. + + Error message resource identifier. + Parameters that should be used for message resolution. + + + + Initializes a new instance of the class copying values from another instance. + + Another Error message instance to copy values from. + + + + This property is reserved, apply the + + to the class instead. + + + An + that describes the XML representation of the object that + is produced by the + + method and consumed by the + + method. + + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Resolves the message against specified . + + Message source to resolve this error message against. + Resolved error message. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets or sets the resource identifier for this message. + + The resource identifier for this message. + + + + Gets or sets the message parameters. + + The message parameters. + + + + Initializes a new instance of the class. + + the id of the binding this error message is associated with + the message id + optional parameters to this message + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Get the ID of the binding this message instance relates to. + + + + + Interface that should be implemented by data bound objects, such as + web pages, user controls, windows forms, etc. + + Aleksandar Seovic + + + + Gets the binding manager. + + The binding manager. + + + + implementation that allows + data binding between collections that implement + interface. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Simple, expression-based implementation of that + binds source to target one-to-one. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + The formatter to use. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the source expression. + + The source expression. + + + + Gets the target expression. + + The target expression. + + + + Minimal AST node interface used by ANTLR AST generation and tree-walker. + + + + + Add a (rightmost) child to this node + + + + + + Get the first child of this node; null if no children + + + + + Get the next sibling in line after this one + + + + + Get the token text for this node + + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Set the first child of a node. + + + + + + Set the next sibling after this one. + + + + + + Set the token text for this node + + + + + + Set the token type for this node + + + + + + Get the token type for this node + + + + + Event type. + + + + Used for creating Token instances. + + + Used for caching lookahead characters. + + + + This method is executed by ANTLR internally when it detected an illegal + state that cannot be recovered from. + The previous implementation of this method called + and writes directly to , which is usually not + appropriate when a translator is embedded into a larger application. + + Error message. + + + + A creator of Token object instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of Token objects. + + + Since Lexers in ANTLR use a single Token type, each TokenCreator can + create one class of Token objects (that's why it's not called TokenFactory). + + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + The fully qualified name of the Token type to create. + + + + + Type object used as a template for creating tokens by reflection. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + This type was created in VisualAge. + + + + Report exception errors caught in nextToken() + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + + Represents a stream of characters fed to the lexer from that can be rewound + via mark()/rewind() methods. + + + + A dynamic array is used to buffer up all the input characters. Normally, + "k" characters are stored in the buffer. More characters may be stored + during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. + Consumption of characters is deferred. In other words, reading the next + character is not done by conume(), but deferred until needed by LA or LT. + + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "CharConsumed" event. + + Event source object + Event data object + + + + Handle the "CharLA" event. + + Event source object + Event data object + + + + Handle the "Mark" event. + + Event source object + Event data object + + + + Handle the "Rewind" event. + + Event source object + Event data object + + + charBufferConsume method comment. + + + + charBufferLA method comment. + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Specify an object with support code (shared by Parser and TreeParser. + Normally, the programmer does not play with this, using + instead. + + + + + + Specify the type of node to create during tree building. + + Fully qualified AST Node type name. + + + + Specify the type of node to create during tree building. + use now to be consistent with + Token Object Type accessor. + + Fully qualified AST Node type name. + + + + + + + + Get another token object from the token stream + + + + Return the token type of the ith token of lookahead where i=1 + is the current token being examined by the parser (i.e., it + has not been matched yet). + + + + Make sure current lookahead symbol matches token type t. + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Make sure current lookahead symbol matches the given set + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Parser error-reporting function can be overridden in subclass + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + User can override to do their own debugging + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Specifies the behaviour required (i.e. parser modifications) + specifically to support parse tree debugging and derivation. + + + + Override the standard matching and rule entry/exit routines + to build parse trees. This class is useful for 2.7.3 where + you can specify a superclass like + + + class TinyCParser extends Parser(ParseTreeDebugParser); + + + + + + Each new rule invocation must have it's own subtree. Tokens are + added to the current root so we must have a stack of subtree roots. + + + + + Track most recently created parse subtree so that when parsing + is finished, we can get to the root. + + + + + For every rule replacement with a production, we bump up count. + + + + + Adds LT(1) to the current parse subtree. + + + + Note that the match() routines add the node before checking for + correct match. This means that, upon mismatched token, there + will a token node in the tree corresponding to where that token + was expected. For no viable alternative errors, no node will + be in the tree as nothing was matched() (the lookahead failed + to predict an alternative). + + + + + + Create a rule node, add to current tree, and make it current root + + + + + + Pop current root; back to adding to old root + + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + AST Support code shared by TreeParser and Parser. + + + + We use delegation to share code (and have only one + bit of code to maintain) rather than subclassing + or superclassing (forces AST support code to be + loaded even when you don't want to do AST stuff). + + + Typically, is used to specify the + homogeneous type of node to create, but you can override + to make heterogeneous nodes etc... + + + + + + Constructs an ASTFactory with the default AST node type of + . + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + Name of default AST node type for this factory. + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + MetaType of default AST node type for this factory. + + + + + Stores the Type of the default AST node class to be used during tree construction. + + + + + Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass + and ASTNodeCreator. + + + + + Stores the mapping between AST node typenames and their token ID. + + + + + Specify an "override" for the type created for + the specified Token type. + + + This method is useful for situations that ANTLR cannot oridinarily deal + with (i.e., when you create a token based upon a nonliteral token symbol + like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token + type (and hence the AST) statically. + + Token type to override. + + Fully qualified AST typename (or null to specify + the factory's default AST type). + + + + + Register an AST Node Type for a given Token type ID. + + The Token type ID. + The AST Node Type to register. + + + + Register an ASTNodeCreator for a given Token type ID. + + The Token type ID. + The creater to register. + + + + Register an ASTNodeCreator to be used for creating node by default. + + The ASTNodeCreator. + + + + Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings + to the specified size. + This is primarily a convenience method that can be used to prevent + unnecessary and costly re-org of the mappings list. + + Maximum Token Type ID. + + + + Add a child to the current AST + + The AST to add a child to + The child AST to be added + + + + Creates a new uninitialized AST node. Since a specific AST Node Type + wasn't indicated, the new AST node is created using the current default + AST Node type - + + An uninitialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. Once created, + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + Fully qualified name of the Type to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. + + Token instance to be used to initialize the new AST Node. + + Fully qualified name of the Type to be used for creating the new AST Node. + + A newly created and initialized AST node object. + + Once created, the new AST node is initialized with the specified Token + instance. The used for creating this new AST + node is determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + + + + Creates and initializes a new AST node using the specified AST Node instance. + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by aNode. + The AST Node type must have a default/parameterless constructor. + + AST Node instance to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token instance. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token instance to be used to create new AST Node. + An initialized AST node object. + + + + Returns a copy of the specified AST Node instance. The copy is obtained by + using the method Clone(). + + AST Node to copy. + An AST Node (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node and all of it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Make a tree from a list of nodes. The first element in the + array is the root. If the root is null, then the tree is + a simple list not a tree. Handles null children nodes correctly. + For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) + yields tree (nil a b). + + List of Nodes. + AST Node tree. + + + + Make a tree from a list of nodes, where the nodes are contained + in an ASTArray object. + + List of Nodes. + AST Node tree. + + + + Make an AST the root of current AST. + + + + + + + Sets the global default AST Node Type for this ASTFactory instance. + This method also attempts to load the instance + for the specified typename. + + Fully qualified AST Node Type name. + + + + To change where error messages go, can subclass/override this method + and then setASTFactory in Parser and TreeParser. This method removes + a prior dependency on class antlr.Tool. + + + + + + A creator of AST node instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of AST node objects. + + + Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever + they need to create an AST node objeect. What this class does is to support + performant extensibility of the basic ASTFactory. The ASTFactory can now be + extnded as run-time to support more new AST node types without using needing + to use reflection. + + + + + + Constructs an instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Summary description for ASTVisitor. + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Small buffer used to avoid reading individual chars + + + + + Small buffer used to avoid reading individual chars + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + A token is minimally a token type. Subclasses can add the text matched + for the token and line info. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Summary description for DumpASTVisitor. + + Simple class to dump the contents of an AST to the output + + + + Append a char to the msg buffer. If special, then show escaped version + + Message buffer + Char to append + + + + Walk parse tree and return requested number of derivation steps. + If steps less-than 0, return node text. If steps equals 1, return derivation + string at step. + + derivation steps + + + + + Get derivation and return how many you did (less than requested for + subtree roots. + + string buffer + derivation steps + + + + + Do a step-first walk, building up a buffer of tokens until + you've reached a particular step and print out any rule subroots + insteads of descending. + + derivation buffer + derivation steps + + + + + This token stream tracks the *entire* token stream coming from + a lexer, but does not pass on the whitespace (or whatever else + you want to discard) to the parser. + + + + This class can then be asked for the ith token in the input stream. + Useful for dumping out the input stream exactly after doing some + augmentation or other manipulations. Tokens are index from 0..n-1 + + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + string. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal string + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + For example: + + TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); + JavaRecognizer parser = new JavaRecognizer(rewriteEngine); + ... + rewriteEngine.insertAfter("pass1", t, "foobar");} + rewriteEngine.insertAfter("pass2", u, "start");} + System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); + System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); + + + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer. + + + If you don't use named rewrite streams, a "default" stream is used. + + + Terence Parr, parrt@cs.usfca.edu + University of San Francisco + February 2004 + + + + + + Track the incoming list of tokens + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps string (name) -> rewrite (List) + + + + + Map string (program name) -> Integer index + + + + + track index of tokens + + + + + Who do we suck tokens from? + + + + + Which (whitespace) token(s) to throw out + + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. + + + UNTESTED! + + + + + + + Reset the program so that no instructions exist + + + + + + If op.index > lastRewriteTokenIndexes, just add to the end. + Otherwise, do linear + + + + + + Execute the rewrite operation by possibly adding to the buffer. + + rewrite buffer + The index of the next token to operate on. + + + + This token tracks it's own index 0..n-1 relative to the beginning + of the stream. It is designed to work with + in TokenStreamRewriteEngine.cs + + + + + Index into token array indicating position in input stream + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Implementation of the average aggregator. + + Aleksandar Seovic + + + + Defines an interface that should be implemented + by all collection processors and aggregators. + + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Returns the average of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The average of the numeric values in the source collection. + + + + + Converts all elements in the input list to a given target type. + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the count aggregator. + + Aleksandar Seovic + + + + Returns the number of items in the source collection. + + + The source collection to process. + + + Ignored. + + + The number of items in the source collection, + or zero if the collection is empty or null. + + + + + Converts a string literal to a instance. + + Erich Eichinger + + + + + Erich Eichinger + + + + Implementation of the distinct processor. + + Aleksandar Seovic + + + + Returns distinct items from the collection. + + + The source collection to process. + + + 0: boolean flag specifying whether to include null + in the results or not. Default is false, which means that + null values will not be included in the results. + + + A collection containing distinct source collection elements. + + + If there is more than one argument, or if the single optional argument + is not Boolean. + + + + + Implementation of the maximum aggregator. + + Aleksandar Seovic + + + + Returns the largest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The largest item in the source collection. + + + + + Implementation of the minimum aggregator. + + Aleksandar Seovic + + + + Returns the smallest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The smallest item in the source collection. + + + + + Implementation of the non-null processor. + + Aleksandar Seovic + + + + Returns non-null items from the collection. + + + The source collection to process. + + + Ignored. + + + A collection containing non-null source collection elements. + + + + + Implementation of the 'order by' processor. + + Aleksandar Seovic + Erich Eichinger + + + + Sorts the source collection using custom sort criteria. + + + Please note that your compare function needs to take care about + proper conversion of types to be comparable! + + + The source collection to sort. + + + Sort criteria to use. + + + A sorted array containing collection elements. + + + + + Reverts order of elements in the list + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the sort processor. + + Aleksandar Seovic + + + + Sorts the source collection. + + + Please not that this processor requires that collection elements + are of a uniform type and that they implement + interface. +

+ If you want to perform custom sorting based on element properties + you should consider using instead. + + + The source collection to sort. + + + Ignored. + + + An array containing sorted collection elements. + + + If collection is not empty and it is + neither nor . + + + +

+ Implementation of the sum aggregator. + + Aleksandar Seovic +
+ + + Returns the sum of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The sum of the numeric values in the source collection. + + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Base type for nodes that accept arguments. + + Aleksandar Seovic + + + + Base type for all expression nodes. + + Aleksandar Seovic + + + + For internal purposes only. Use for expression node implementations. + + + This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST + unfortunately is not marked as [Serializable].
+
+ Note:Since SpringAST implements , deriving classes + have to explicitely override if they need to persist additional + data during serialization. +
+
+ + + The global SpringAST node factory + + + + + Create an instance + + + + + Create an instance from a token + + + + + initialize this instance from an AST + + + + + initialize this instance from an IToken + + + + + initialize this instance from a token type number and a text + + + + + sets the text of this node + + + + + gets the text of this node + + + + + Create a new instance from SerializationInfo + + + + + populate SerializationInfo from this instance + + + + + gets or sets the token type of this node + + + + + gets or sets the text of this node + + + + + Interface that all navigation expression nodes have to implement. + + Aleksandar Seovic + + + + Returns expression value. + + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Expression variables map. + Value of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + New value for the last node of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + Expression variables map. + New value for the last node of the expression. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value. + + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Expression variables map. + Node's value. + + + + Returns node's value for the given context. + + Node's value. + + + + Evaluates this node for the given context, switching local variables map to the ones specified in . + + + + + Sets node's value for the given context. + + Object to evaluate node against. + New value for this node. + + + + Sets node's value for the given context. + + Object to evaluate node against. + Expression variables map. + New value for this node. + + + + Sets node's value for the given context. + + +

+ This is a default implementation of Set method, which + simply throws . +

+

+ This was done in order to avoid redundant Set method implementations, + because most of the node types do not support value setting. +

+
+
+ + + Returns a string representation of this node instance. + + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Holds the state during evaluating an expression. + + + + + Gets/Sets the root context of the current evaluation + + + + + Gets/Sets the current context of the current evaluation + + + + + Gets/Sets global variables of the current evaluation + + + + + Gets/Sets local variables of the current evaluation + + + + + Initializes a new EvaluationContext instance. + + The root context for this evaluation + dictionary of global variables used during this evaluation + + + + Switches current ThisContext. + + + + + Switches current LocalVariables. + + + + + Gets the type of the + + + + + Create a new instance + + + + + Create a new instance + + + + + Append an argument node to the list of child nodes + + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + + + + Asserts the argument count. + + The required count. + + + + Resolves the arguments. + + Current expression evaluation context. + An array of argument values + + + + Resolves the named arguments. + + Current expression evaluation context. + A dictionary of argument name to value mappings. + + + + Resolves the argument. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the argument without ensuring was called. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the named argument. + + Argument name. + Current expression evaluation context. + Resolved named argument value. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed assignment node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed attribute node in the navigation expression. + + Aleksandar Seovic + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Determines the type of object that should be instantiated. + + + The type name to resolve. + + + The type of object that should be instantiated. + + + If the type cannot be resolved. + + + + + Initializes this node by caching necessary constructor and property info. + + + + + + + Sets the named arguments (properties). + + Instance to set property values on. + Argument (property) name to value mappings. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Tries to determine attribute type based on the specified + attribute type name. + + + Attribute type name to resolve. + + + Resolved attribute type. + + + If type cannot be resolved. + + + + + Base class for binary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance with the supplied operands + + + + + + + Create a new instance from SerializationInfo + + + + + Evaluate the left operand + + + + + Evaluate the left operand + + + + + Gets the left operand. + + The left operand. + + + + Gets the right operand. + + The right operand. + + + + Represents parsed boolean literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the boolean literal node. + + + This is the entrypoint into evaluating this expression. + + Node's value. + + + + Represents parsed default node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns left operand if it is not null, or the right operand if it is. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Container object for the parsed expression. + + +

+ Preparing this object once and reusing it many times for expression + evaluation can result in significant performance improvements, as + expression parsing and reflection lookups are only performed once. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of the class + by parsing specified expression string. + + Expression to parse. + + + + Registers lambda expression under the specified . + + Function name to register expression as. + Lambda expression to register. + Variables dictionary that the function will be registered in. + + + + Initializes a new instance of the class + by parsing specified primary expression string. + + Primary expression to parse. + + + + Initializes a new instance of the class + by parsing specified property expression string. + + Property expression to parse. + + + + Initializes a new instance of the class. + + + + + Create a new instance from SerializationInfo + + + + + Evaluates this expression for the specified root object and returns + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value of the last node. + + + + Evaluates this expression for the specified root object and sets + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value to set last node to. + If navigation expression is empty. + + + + Evaluates this expression for the specified root object and returns + of the last node, if possible. + + Context to evaluate expression against. + Expression variables map. + Value of the last node. + + + + Contains a list of reserved variable names. + You must not use any variable names with the reserved prefix! + + + + + Variable Names using this prefix are reserved for internal framework use + + + + + variable name of the currently processed object factory, if any + + + + + Converts string representation of expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Utility class that enables easy expression evaluation. + + +

+ This class allows users to get or set properties, execute methods, and evaluate + logical and arithmetic expressions. +

+

+ Methods in this class parse expression on every invocation. + If you plan to reuse the same expression many times, you should prepare + the expression once using the static method, + and then call to evaluate it. +

+

+ This can result in significant performance improvements as it avoids expression + parsing and node resolution every time it is called. +

+

+

+
+ Aleksandar Seovic +
+ + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Value of the last node in the expression. + + + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Expression variables map. + Value of the last node in the expression. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Value to set last node to. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Expression variables map. + Value to set last node to. + + + + Represents parsed expression list node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a result of the last expression in a list. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the last expression in a list + + + + Represents parsed function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed hexadecimal integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the hexadecimal integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed indexer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + + Context to resolve property against. + Expression variables map. + PropertyInfo for this node. + + + + Represents parsed integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents lambda expression. + + Aleksandar Seovic + + + + caches argumentNames of this instance + + + + + caches body expression of this lambda function + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Gets argument names for this lambda expression. + + + + + Represents parsed list initializer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the list defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents local function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Represents parsed map entry node. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map entry defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed map initializer node in the navigation expression. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Static constructor. Initializes a map of special collection processor methods. + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Gets the best method given the name, argument values, for a given type. + + The type on which to search for the method. + Name of the method. + The binding flags. + The arg values. + Best matching method or null if none found. + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed null literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the null literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic addition operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic addition operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents AND operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical BETWEEN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents arithmetic division operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic division operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical equality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical equality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical IN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical IS operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IS operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical "less than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "less than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents VB-style logical LIKE operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical LIKE operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents logical MATCHES operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical MATCHES operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents arithmetic modulus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic modulus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic multiplication operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic multiplication operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents NOT operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Base class for unary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Gets the operand. + + The operand. + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical NOT operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical inequality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical inequality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents OR operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical OR operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic exponent operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic exponent operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic subtraction operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic subtraction operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary minus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary plus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + + Erich Eichinger + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed projection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of projection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents node that navigates to object's property or public field. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + The parent. + + + + Attempts to resolve property or field. + + + Type to search for a property or a field. + + + Property or field name. + + + Binding flags to use. + + + Resolved property or field accessor, or null + if specified cannot be resolved. + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Retrieves property or field value. + + Context to evaluate expressions against. + Current expression evaluation context. + Property or field value. + + + + Sets property value, doing any type conversions that are necessary along the way. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Sets property or field value using either dynamic or standard reflection. + + Object to evaluate node against. + New value for this node, converted to appropriate type. + + + + In the case of read only collections or custom collections that are not assignable from + IList, try to add to the collection. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + true if was able add to IList, IDictionary, or ISet + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... + + Context to resolve property against. + PropertyInfo for this node. + + + + Gets a value indicating whether this node represents a property. + + + true if this node is a property; otherwise, false. + + + + + Gets a value indicating whether this node represents a field. + + + true if this node is a field; otherwise, false. + + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified identifier. + + + Fully qualified identifier as a string. + + + + + Represents parsed real literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the real literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents a reference to a Spring-managed object. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the first context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the last context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of selection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed string literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Exception thrown when detecting invalid SpEL syntax + + Erich Eichinger + + + + TODO + + + + + TODO + + + + + + + + + + + + + + + + + + + + Gets a message that provides details on the syntax error. + + + + + The expression that caused the error + + + + + Represents ternary expression node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed type node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified typename. + + + Fully qualified typename as a string. + + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Implementation of that can be used to + format and parse boolean values. + + Erich Eichinger + + + + Interface that should be implemented by all formatters. + + + + Formatters assume that source value is a string, and make no assumptions + about the target value's type, which means that Parse method can return + object of any type. + + + Aleksandar Seovic + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Initializes a new instance of the class + using default values + + + + + Initializes a new instance of the class + + + + + Formats the specified boolean value. + + The value to format. + Formatted boolean value. + If is null. + If is not of type . + + + + Parses the specified boolean value according to settings of and + + The boolean value to parse. + Parsed boolean value as a . + If does not match or . + + + + Set/Get value to control casesensitivity of + + + Defaults to true + + + + + Set/Get value to recognize as boolean "true" value + + + Defaults to + + + + + Set/Get value to recognize as boolean "false" value + + + Defaults to + + + + + Implementation of that can be used to + format and parse currency values. + + + + CurrencyFormatter uses currency related properties of the + to format and parse currency values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of CurrencyFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the CurrencyFormatter in order + to override some of the default currency formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + currency values are formatted. + + + + + Formats the specified currency value. + + The value to format. + Formatted currency . + If is null. + If is not a number. + + + + Parses the specified currency value. + + The currency value to parse. + Parsed currency value as a . + + + + Gets or sets the currency decimal digits. + + The currency decimal digits. + + + + + Gets or sets the currency decimal separator. + + The currency decimal separator. + + + + + Gets or sets the currency group sizes. + + The currency group sizes. + + + + + Gets or sets the currency group separator. + + The currency group separator. + + + + + Gets or sets the currency symbol. + + The currency symbol. + + + + + Gets or sets the currency negative pattern. + + The currency negative pattern. + + + + + Gets or sets the currency positive pattern. + + The currency positive pattern. + + + + + Implementation of that can be used to + format and parse values. + + + + DateTimeFormatter uses properties of the + to format and parse values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of DateTimeFormatter, default DateTimeFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the DateTimeFormatter in order + to override some of the default formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + Date/time format string. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture. + + + + Formats the specified value. + + The value to format. + Formatted value. + If is null. + If is not an instance of . + + + + Parses the specified value. + + The string to parse. + Parsed value. + + + + Provides base functionality for filtering values before they actually get parsed/formatted. + + Erich Eichinger + + + + Creates a new instance of this FilteringFormatter. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Allows to rewrite a value before it gets parsed by the underlying formatter + + + + + Allows to change a value before it gets formatted by the underlying formatter + + + + + Implementation of that can be used to + format and parse floating point numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign, decimal point, exponent). + + + Aleksandar Seovic + + + + Default format string. + + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and current thread's culture. + + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and specified culture. + + The culture. + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + The culture name. + + + + Initializes a new instance of the class, + using specified format string and culture. + + The format string. + The culture. + + + + Formats the specified float value. + + The value to format. + Formatted floating point number. + If is null. + If is not a number. + + + + Parses the specified float value. + + The float value to parse. + Parsed float value as a . + + + + Replaces input strings with a given default value, + if they are null or contain whitespaces only, + + Erich Eichinger + + + + Creates a new instance of this HasTextFilteringFormatter using null as default value. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Creates a new instance of this HasTextFilteringFormatter. + + the default value to be returned, if input text doesn't contain text + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + If value contains no text, it will be replaced by a defaultValue. + + + + + Implementation of that can be used to + format and parse integer numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign). + + + Aleksandar Seovic + + + + Initializes a new instance of the class, + using default format string of '{0:D}'. + + + + + Initializes a new instance of the class, + using specified format string. + + + + + Formats the specified integer value. + + The value to format. + Formatted integer number. + If is null. + If is not an integer number. + + + + Parses the specified integer value. + + The integer value to parse. + Parsed number value as a . + + + + Implementation of that simply calls . + + + This formatter is a no-operation implementation. + + Erich Eichinger + + + + Initializes a new instance of the class. + + + + + Converts the passed value to a string by calling . + + The value to convert. + to string converted value. + + + + Returns the passed string "as is". + + The value to return. + The value passed into this method. + + + + Implementation of that can be used to + format and parse numbers. + + + + NumberFormatter uses number-related properties of the + to format and parse numbers. + + + This formatter works with both integer and decimal numbers and allows + you to format and parse numbers that conform to + number style (leading and trailing white space and/or sign, thousands separator, + decimal point) + + + If you use one of the constructors that accept culture as a parameter + to create an instance of NumberFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the NumberFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified number value. + + The value to format. + Formatted number . + If is null. + If is not a number. + + + + Parses the specified number value. + + The number value to parse. + Parsed number value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the number group sizes. + + The number group sizes. + + + + + Gets or sets the number group separator. + + The number group separator. + + + + + Gets or sets the negative pattern. + + The number negative pattern. + + + + + Implementation of that can be used to + format and parse numbers. + + + + PercentFormatter uses percent-related properties of the + to format and parse percentages. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of PercentFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the PercentFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified percentage value. + + The value to format. + Formatted percentage. + If is null. + If is not a number. + + + + Parses the specified percentage value. + + The percentage value to parse. + Parsed percentage value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the percent group sizes. + + The percent group sizes. + + + + + Gets or sets the percent group separator. + + The percent group separator. + + + + + Gets or sets the negative pattern. + + The percent negative pattern. + + + + + Gets or sets the positive pattern. + + The percent positive pattern. + + + + + Gets or sets the percent symbol. + + The percent symbol. + + + + + Gets or sets the per mille symbol. + + The per mille symbol. + + + + + Loads a list of resources that should be applied from the .NET . + + +

+ This implementation will iterate over all resource managers + within the message source and return a list of all the resources whose name starts with '$this'. +

+

+ All other resources will be ignored, but you can retrieve them by calling one of + GetMessage methods on the message source directly. +

+
+ Aleksandar Seovic +
+ + + Abstract base class that all localizers should extend + + +

+ This class contains the bulk of the localizer logic, including implementation + of the ApplyResources methods that are defined in + interface. +

+

+ All specific localizers need to do is inherit this class and implement + GetResources method that will return a list of + objects that should be applied to a specified target. +

+

+ Custom implementations can use whatever type of resource storage they want, + such as standard .NET resource sets, custom XML files, database, etc. +

+
+ Aleksandar Seovic +
+ + + Defines an interface that localizers have to implement. + + +

+ Localizers are used to automatically apply resources to object's members + using reflection. +

+
+ Aleksandar Seovic +
+ + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's culture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's uiCulture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Returns a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + implementation + that simply returns the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . + + Aleksandar Seovic + + + + Strategy interface for + resolution. + + Aleksandar Seovic + + + + Resolves the + from some context. + + +

+ The 'context' is determined by the appropriate implementation class. + An example of such a context might be a thread local bound + , or a + sourced from an HTTP + session. +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + +

+ This is an optional operation and does not need to be implemented + such that it actually does anything useful (i.e. it can be a no-op). +

+
+ + The new or + to clear the current . + +
+ + + Returns the default . + + +

+ It tries to get the + from the value of the + + property and falls back to the of the + current thread if the + + is . +

+
+ + The default + +
+ + + Resolves the + from some context. + + +

+ The 'context' in this implementation is the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + + The new or + to clear the current . + + + + + + + The default . + + + The default . + + + + + Abstract base class that all resource cache implementations should extend. + + Aleksandar Seovic + + + + Defines an interface that resource cache adapters have to implement. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Gets the list of resources from the cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Crates resource cache key for the specified target object and culture. + + Target object to apply resources to. + Resource culture to use for resource lookup. + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Resource cache implementation that doesn't cache resources. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + Always returns null. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + + + + Holds mapping between control property and it's value + as read from the resource file. + + Aleksandar Seovic + + + + Creates instance of resource mapper. + + Target property. + Resource value. + + + + Gets parsed target property expression. See + for more information on object navigation expressions. + + + + + Value of the resource that target property should be set to. + + + + + Utility class to aid in the manipulation of events and delegates. + + Griffin Caprio + + + + Returns a new instance of the requested . + + +

+ Often used to wire subscribers to event publishers. +

+
+ + The of delegate to create. + + + The target subscriber object that contains the delegate implementation. + + + referencing the delegate method on the subscriber. + + + A delegate handler that can be added to an events list of handlers, or called directly. + +
+ + + Queries the input type for a signature matching the input + signature. + + + Typically used to query a potential subscriber to see if they implement an event handler. + + to match against + to query + + matching input + signature, or if there is no match. + + + + + Creates a new instance of the EventManipulationUtilities class. + + +

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

+
+
+ + + Default implementation of the + interface. + + Griffin Caprio + + + + Creates a new instance of the EventRegistry class. + + + + + Adds the input object to the list of publishers. + + + This publishes all events of the source object to any object + wishing to subscribe + + The source object to publish. + + + + Subscribes to all events published, if the subscriber implements + compatible handler methods. + + The subscriber to use. + + + + Subscribes to published events of all objects of a given type, if the + subscriber implements compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + The target to unsubscribe from + + + + The list of event publishers. + + The list of event publishers. + + + + To be implemented by any object that wishes to receive a reference to + an . + + +

+ This interface only applies to objects that have been instantiated + within the context of an + . This interface does + not typically need to be implemented by application code, but is rather + used by classes internal to Spring.NET. +

+
+ Mark Pollack + Rick Evans +
+ + + Set the + associated with the + that created this + object. + + +

+ This property will be set by the relevant + after all of this + object's dependencies have been resolved. This object can use the + supplied + immediately to publish or subscribe to one or more events. +

+
+
+ + + Marks a constructor, field, propery or config method as to be + autowired by Spring's dependency injection facilities. + + Only one constructor (at max) of any given bean class may carry this + annotation, indicating the constructor to autowire when used as a Spring + bean. Such a constructor does not have to be public. + + Fields are injected right after construction of a object, before any + config methods are invoked. Such a config field does not have to be public. + + Config methods may have an arbitrary name and any number of arguments; + each of those arguments will be autowired with a matching bean in the + Spring container. Object property setter methods are effectively just + a special case of such a general config method. Such config methods + do not have to be public. + + In the case of multiple argument methods, the 'required' parameter is + applicable for all arguments. + + In case of a {@link java.util.Collection} or {@link java.util.Map} + dependency type, the container will autowire all beans matching the + declared value type. In case of a Map, the keys must be declared as + type String and will be resolved to the corresponding bean names. + + Note that actual injection is performed through a + {@link org.springframework.beans.factory.config.BeanPostProcessor + BeanPostProcessor} which in turn means that you cannot + use {@code @Autowired} to inject references into + {@link org.springframework.beans.factory.config.BeanPostProcessor + BeanPostProcessor} or + {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor BeanFactoryPostProcessor} + types. Please consult the javadoc for the {@link AutowiredAnnotationBeanPostProcessor} + class (which, by default, checks for the presence of this annotation). + + + + + Defines it Autowired PostProcessor should fail if object is not set + + + + + implementation + that autowires annotated fields, properties and arbitrary config methods. + Such members to be injected are detected through an attribute: by default, + Spring's . + + Only one constructor (at max) of any given bean class may carry this + annotation with the 'required' parameter set to true, + indicating the constructor to autowire when used as a Spring bean. + If multiple non-required constructors carry the annotation, they + will be considered as candidates for autowiring. The constructor with + the greatest number of dependencies that can be satisfied by matching + beans in the Spring container will be chosen. If none of the candidates + can be satisfied, then a default constructor (if present) will be used. + An annotated constructor does not have to be public. + + Fields are injected right after construction of a bean, before any + config methods are invoked. Such a config field does not have to be public. + + Config methods may have an arbitrary name and any number of arguments; each of + those arguments will be autowired with a matching bean in the Spring container. + Bean property setter methods are effectively just a special case of such a + general config method. Config methods do not have to be public. + + Note: A default AutowiredAttributeObjectPostProcessor will be registered + by the "context:annotation-config" and "context:component-scan" XML tags. + Remove or turn off the default annotation configuration there if you intend + to specify a custom AutowiredAnnotationBeanPostProcessor bean definition. + NOTE: Annotation injection will be performed before XML injection; + thus the latter configuration will override the former for properties wired through + both approaches. + + + + + Adapter that implements all methods on + as no-ops, which will not change normal processing of each object instantiated + by the container. Subclasses may override merely those methods that they are + actually interested in. + + + Note that this base class is only recommendable if you actually require + functionality. If all you need + is plain functionality, prefer a straight + implementation of that (simpler) interface. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Extension of the interface, + adding a callback for predicting the eventual type of a processed object. + + This interface is a special purpose interface, mainly for + internal use within the framework. In general, application-provided + post-processors should simply implement the plain + interface or derive from the + class. New methods might be added to this interface even in point releases. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Subinterface of + + that adds a before-instantiation callback and a callback after instantiation but before + explicit properties are set or autowiring occurs. + + + + Typically used to suppress default instantiation for specific target objects, + for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, + lazily initializing targets, etc), or to implement additional injection strategies such as field + injection. + + + This interface is a special purpose interface, mainly for internal use within the framework. + It is recommended to implement the plain interface as far as + possible, or to derive from in order to be shielded + from extension to this interface. + + + Juergen Hoeller + Rick Evans (.NET) + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Predicts the type of the object to be eventually returned from this + processors callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Predicts the type of the object to be eventually returned from this + processors PostProcessBeforeInstantiation callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + 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. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + 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. + +
+ + + Interface to be implemented by objects that wish to be aware of their owning + . + + +

+ For example, objects can look up collaborating objects via the factory. +

+

+ Note that most objects will choose to receive references to collaborating + objects via respective properties and / or an appropriate constructor. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + 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. + +
+ + + Add a Autowired Attribute Type + + + + + Create a new instance of an Autowire Post Processor + with standard attributes of + and + + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Finds autowire candidates and verifies them + + + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + + + + + Injects autoried annotated properties, fields, methods into objectInstance + + + + + Name of the object. + The actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Register the specified bean as dependent on the autowired beans. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ + The order value. + +
+ + + 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. + +
+ + + Class representing injection information about an annotated field. + + + + + Represents an element that needs to be injected + + + + + Internal class for managing injection metadata. + Not intended for direct use in applications. + + + + + + + + + + + + + + + + Inject values for members into object instance + + + + + + + + Represents an element that needs to be injected + + + + + The Property, field, method or constructor info + + + + + Instantiates a new inject element + + + + + + Ececuted to inject value to associated memeber info + + + + + + + + Class representing injection information about an annotated field. + + + + + Class representing injection information about an annotated method. + + + + + implementation + that invokes attributed init and destroy methods. Allows for an attributation + alternative to Spring's and + callback interfaces. + + Invoke and destroy annotations may be applied to methods of any visibility: + public, protected, or private. Multiple such methods + may be annotated, but it is recommended to only annotate one single + init method and destroy method, respectively. + + + + + Subinterface of + that adds + a before-destruction callback. + + + The typical usage will be to invoke custom destruction callbacks on + specific object types, matching corresponding initialization callbacks. + + Juergen Hoeller + Simon White (.NET) + + + + Apply this + to the + given new object instance before its destruction. Can invoke custom + destruction callbacks. + + The new object instance. + The name of the object. + + In case of errors. + + + + + Creates InitDestroy Post Processor with default attribute types of + + + + + + Applies PostConstruct init method initialisation if instance is attributed + + 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. + + + + + No special post processing after initialization + + + + + Executed PreDestroy methods in given order for provided instance + + The new object instance.The name of the object.In case of errors. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ + The order value. + +
+ + + Specify the init attribute to check for, indicating initialization + methods to call after configuration of an object. + + + + + Specify the destroy attribute to check for, indicating disposal + methods to call before object is destroyed + + + + + + + + + + Defines a method that will be called during the intantiation of an instance + + + + + Initializes a new instance of the PostConstruct class with order = 1 + + + + + Initializes a new instance of the PostConstruct class with defined order + + Order in which the PostContruct method is called + + + + Defined the order in which the PostContruct methods are called + + + + + Defines a method that will be called prior to the destruction of the object instance + + + + + Initializes a new instance of the PreDestroy attribute with order = 1 + + + + + Initializes a new instance of the PreDestroy attribute with defined order + + Order in which the PostContruct method is called + + + + Defined the order in which the PreDestroy methods are called + + + + + implementation that matches bean definition qualifier + against on the field or parameter to be autowired. + Also supports suggested expression values through a attribute. + + + + + Strategy interface for determining whether a specific object definition + qualifies as an autowire candidate for a specific dependency. + + Mark Fisher + Juergen hoeller + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Determine whether a default value is suggested for the given dependency. + + The descriptor for the target method parameter or field + The value suggested (typically an expression String), + or null if none found + + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for Spring's standard attribute. + + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for the given qualifier attribute type. + + the qualifier attribute to look for + + + + Create a new QualifierAnnotationAutowireCandidateResolver + for the given qualifier attribute types. + + the qualifier annotations to look for + + + + Register the given type to be used as a qualifier when autowiring. +

This identifies qualifier annotations for direct use (on fields, + method parameters and constructor parameters) as well as meta + annotations that in turn identify actual qualifier annotations.

+

This implementation only supports annotations as qualifier types. + The default is Spring's attribute which serves + as a qualifier for direct use and also as a meta attribute.

+
+ the attribute type to register +
+ + + Determine whether the provided object definition is an autowire candidate. +

To be considered a candidate the object's autowire-candidate + attribute must not have been set to 'false'. Also, if an attribute on + the field or parameter to be autowired is recognized by this bean factory + as a qualifier, the object must 'match' against the attribute as + well as any attributes it may contain. The bean definition must contain + the same qualifier or match by meta attributes. A "value" attribute will + fallback to match against the bean name or an alias if a qualifier or + attribute does not match.

+
+
+ + + Match the given qualifier annotations against the candidate bean definition. + + + + + Checks whether the given attribute type is a recognized qualifier type. + + + + + Match the given qualifier attribute against the candidate bean definition. + + + + + Determine whether the given dependency carries a value attribute. + + + + + Determine a suggested value from any of the given candidate annotations. + + + + + This annotation may be used on a field or parameter as a qualifier for + candidate beans when autowiring. It may also be used to annotate other + custom annotations that can then in turn be used as qualifiers. + + + + + Instantiate a new qualifier with an empty name + + + + + Instantiate a new qualifier with a givin name + + name to use as qualifier + + + + Checks weather the attribute is the same + + + + + + + Gets the name associated with this qualifier + + + + + Marks a property as being 'required': that is, the setter property + must be configured to be dependency-injected with a value. + + Consult the SDK documentation for , + which, by default, checks for the presence of this annotation. + + Rob Harrop + Mark Pollack + + + + A implementation that enforces required properties to have been configured. + Required properties are detected through an attribute, by default, Spring's + attribute. + + + The motivation for the existence of this IObjectPostProcessor is to allow + developers to annotate the setter properties of their own classes with an + arbitrary attribute to indicate that the container must check + for the configuration of a dependency injected value. This neatly pushes + responsibility for such checking onto the container (where it arguably belongs), + and obviates the need (in part) for a developer to code a method that + simply checks that all required properties have actually been set. + + Please note that an 'init' method may still need to implemented (and may + still be desirable), because all that this class does is enforce that a + 'required' property has actually been configured with a value. It does + not check anything else... In particular, it does not check that a + configured value is not null. + + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Cache for validated object names, skipping re-validation for the same object + + + + + Post-process the given property values before the factory applies them + to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. + + The property values that the factory is about to apply (never null). + The 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 actual property values to apply to the given object (can be the + passed-in PropertyValues instances or null to skip property population. + + If a required property value has not been specified + in the configuration metadata. + + + + Determines whether the supplied property is required to have a value, that is to be dependency injected. + + + This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that + the property has a setter method. + + The target PropertyInfo + + true if the supplied property has been marked as being required;; otherwise, false if + not or if the supplied property does not have a setter method + + + + + Builds an exception message for the given list of invalid properties. + + The list of names of invalid properties. + Name of the object. + The exception message + + + + Sets the type of the required attribute, to be used on a property setter + + + The default required attribute type is the Spring-provided attribute. + This setter property exists so that developers can provide their own + (non-Spring-specific) annotation type to indicate that a property value is required. + + The type of the required attribute. + + + + Base class that provides common functionality needed for several IObjectFactoryPostProcessor + implementations + + Mark Pollack + + + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Resolves the supplied into a + instance. + + The object that is to be resolved into a + instance. + The error context source. + The error context string. + A resolved . + +

+ This (default) implementation supports resolving + s and s. + Only override this method if you want to key your type alias + on something other than s + and s. +

+
+ + If the supplied is , + or the supplied cannot be resolved. + +
+ + + Return the order value of this object, with a higher value meaning + greater in terms of sorting. + + The order value. + + + + + Simple template superclass for + implementations that allows for the creation of a singleton or a prototype + instance (depending on a flag). + + + If the value of the + + property is (this is the default), this class + will create a single instance of it's object upon initialization and + subsequently return the singleton instance; else, this class will + create a new instance each time (prototype mode). Subclasses must + implement the + + template method to actually create objects. + + Juergen Hoeller + Keith Donald + Simon White (.NET) + + + + Interface to be implemented by objects used within an + that are themselves + factories. + + +

+ If an object implements this interface, it is used as a factory, + not directly as an object. s + can support singletons and prototypes + ()... + please note that an + itself can only ever be a singleton. It is a logic error to configure an + itself to be a prototype. +

+ + An object that implements this interface cannot be used as a normal object. + +
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + + If this method is being called in the context of an enclosing IoC container and + returns , the IoC container will consider this factory + object as not being fully initialized and throw a corresponding (and most + probably fatal) exception. + + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + 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? + + + + + Invoked by an + after it has injected all of an object's dependencies. + + + In the event of misconfiguration (such as the failure to set a + required property) or if initialization fails. + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + Template method that subclasses must override to construct + the object returned by this factory. + + + Invoked once immediately after the initialization of this + in the case of + a singleton; else, on each call to the + + method. + + + If an exception occured during object creation. + + + A distinct instance of the object created by this factory. + + + + + Performs cleanup on any cached singleton object. + + +

+ Only makes sense in the context of a singleton object. +

+
+ + +
+ + + Is the object managed by this factory a singleton or a prototype? + + +

+ Please note that changing the value of this property after + this factory object instance has been created by an enclosing + Spring.NET IoC container really is a programming error. This + property should really only be set once, prior to the invocation + of the + + callback method. +

+
+ +
+ + + Return the of object that this + creates, or + if not known in advance. + + + + + + The various autowiring modes. + + Rick Evans + + + + Do not autowire. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Implementation of that + resolves variable name against command line arguments. + + Aleksandar Seovic + + + + Defines contract that different variable sources have to implement. + + +

+ The "variable sources" are objects containing name-value pairs + that allow a variable value to be retrieved for the given name.

+

+ Out of the box, Spring.NET supports a number of variable sources, + that allow users to obtain variable values from .NET config files, + Java-style property files, environment, registry, etc.

+

+ Users can always write their own variable sources implementations, + that will allow them to load variable values from the database or + other proprietary data source.

+
+ + + + + + + Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Default constructor. + Initializes command line arguments from the environment. + + + + + Constructor that allows arguments to be passed externally. + Useful for testing. + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes command line arguments dictionary. + + + + + Gets or sets a prefix that should be used to + identify arguments to extract values from. + + + A prefix that should be used to identify arguments + to extract values from. Defaults to slash ("/"). + + + + + Gets or sets a character that should be used to + separate argument name from its value. + + + A character that should be used to separate argument + name from its value. Defaults to colon (":"). + + + + + Implementation of that + resolves variable name against name-value sections in + the standard .NET configuration file. + + Aleksandar Seovic + + + + Initializes a new instance of + + + + + Initializes a new instance of from the given + + + + + Initializes a new instance of from the given + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets a list of section names variables should be loaded from. + + + All sections specified need to be handled by the + in order to be processed successfully. + + + A list of section names variables should be loaded from. + + + + + Convinience property. Gets or sets a single section + to read properties from. + + + The section specified needs to be handled by the + in order to be processed successfully. + + + A section to read properties from. + + + + + Implementation of that + resolves variable name against provided variables. + + + Variable name resolution is case insensitive. + + Bruno Baia + + + + Initializes a new instance of . + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Gets or sets variables. + + + + + Various utility methods for .NET style .config files. + + +

+ Currently supports reading custom configuration sections and returning them as + objects. +

+
+ Simon White + Mark Pollack +
+ + + Initializes the type members + + + + + Reads the specified configuration section into a + . + + The resource to read. + The section name. + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + The populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Read from the specified configuration from the supplied XML + into a + . + + + + Does not support section grouping. The supplied XML + must already be loaded. + + + + The to read from. + + + The configuration section name to read. + + + A newly populated + . + + + If any errors are encountered while reading (this only applies to + v1.1 and greater of the .NET Framework). + + + If any errors are encountered while reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Returns the section from the specified resource with the given section name + + + + + Returns the section from the specified resource with the given section name. Use + in case no section handler is specified. + + + + + Returns the typed section from the specified resource with the given section name + + + + + Returns the section from the specified resource with the given section name. Use + in case no section handler is specified. + + + + + Returns the typed result of evaluating the specified . + + if the result's type does not match the expected type + + + + Reads the specified configuration section from the given + + + + + + + + Reads the specified configuration section from the given + + + + + + + + + Determine the configuration section handler type + + + + + Populates the supplied with values from + a .NET application configuration file. + + + The + to add any key-value pairs to. + + + The configuration section name in the a .NET application configuration + file. + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + if the supplied + was found. + + + + + Creates a new instance of the ConfigurationReader class. + + +

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

+
+
+ + + Implementation of that + resolves variable name connection strings defined in + the standard .NET configuration file. + + +

+ When the <connectionStrings> configuration section is processed by this class, + two variables are defined for each connection string: one for connection string and + the second one for the provider name.

+

+ Variable names are generated by appending '.connectionString' and '.providerName' + literals to the value of the name attribute of the connection string element. + For example:

+
+            
+               
+            
+            
+

+ will result in two variables being created: myConn.connectionString and myConn.providerName. + You can reference these variables within your object definitions, just like any other variable.

+
+ Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Holder for constructor argument values for an object. + + +

+ Supports values for a specific index or parameter name (case + insensitive) in the constructor argument list, and generic matches by + . +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Can be used as an argument filler for the + + overload when one is not looking for an argument by index. + + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Add argument value for the given index in the constructor argument list. + + + The index in the constructor argument list. + + + The argument value. + + + + + Add argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + The argument value. + + The of the argument + . + + + + + Add argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + The argument value. + + If the supplied is + or is composed wholly of whitespace. + + + + + Get argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + + The required of the argument. + + + The + + for the argument, or if none set. + + + + + Get argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + + The + + for the argument, or if none set. + + + + + Does this set of constructor arguments contain a named argument matching the + supplied name? + + + + The comparison is performed in a case-insensitive fashion. + + + The named argument to look up. + + if this set of constructor arguments + contains a named argument matching the supplied + name. + + + + + Add generic argument value to be matched by type. + + + The argument value. + + + + + Add generic argument value to be matched by type. + + The argument value. + + The of the argument + . + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + The + + for the argument, or if none set. + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list, or to the named argument, or + generically matches by . + + + The index of the argument in the constructor argument list. May be + negative, to denote the fact that we are not looking for an + argument by index (see + . + + + The name of the argument in the constructor argument list. May be + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Return the map of indexed argument values. + + + An with + indices as keys and + s + as values. + + + + + Return the map of named argument values. + + + An with + named arguments as keys and + s + as values. + + + + + Return the set of generic argument values. + + + A of + s. + + + + + Return the number of arguments held in this instance. + + + + + Returns true if this holder does not contain any argument values, + neither indexed ones nor generic ones. + + + + + Holder for a constructor argument value, with an optional + attribute indicating the target + of the actual constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + The of the argument + . Can also be one of the common + aliases (int, bool, + float, etc). + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Gets and sets the value for the constructor argument. + + +

+ Only necessary for manipulating a registered value, for example in + s. +

+
+
+ + + Return the of the constructor + argument. + + + + + + implementation that allows for convenient registration of custom + s. + + + + The use of this class is typically not required; the .NET + mechanism of associating a + with a + via the use of the + is the + recommended (and standard) way. This class primarily exists to cover + those cases where third party classes to which one does not have the + source need to be exposed to the type conversion mechanism. + +

+ Because the + + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever type conversion is required. If + one is using a + + object definition within the scope of an + , no such automatic + pickup of the + + is performed (custom converters will have to be added manually using the + + method). For most application scenarios, one will get better + mileage using the + abstraction. +

+
+ +

+ The following examples all assume XML based configuration, and use + inner object definitions to define the custom + objects (nominally to + avoid polluting the object name space, but also because the + configuration simply reads better that way). +

+ + + + + + + + + + + + + + + + +

+ The following example illustrates a complete (albeit naieve) use case + for this class, including a custom + implementation, said + converters domain class, and the XML configuration that hooks the + converter in place and makes it available to a Spring.NET container for + use during object resolution. +

+

+ The domain class is a simple data-only object that contains the data + required to send an email message (such as the host and user account + name). A developer would prefer to use a string of the form + UserName=administrator,Password=r1l0k1l3y,Host=localhost to + configure the mail settings and just let the container take care of the + conversion. +

+ + namespace ExampleNamespace + { + public sealed class MailSettings + { + private string _userName; + private string _password; + private string _host; + + public string Host + { + get { return _host; } + set { _host = value; } + } + + public string UserName + { + get { return _userName; } + set { _userName = value; } + } + + public string Password + { + get { return _password; } + set { _password = value; } + } + } + + public sealed class MailSettingsConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (typeof (string) == sourceType) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + string text = value as string; + if(text != null) + { + MailSettings mailSettings = new MailSettings(); + string[] tokens = text.Split(','); + for (int i = 0; i < tokens.Length; ++i) + { + string token = tokens[i]; + string[] settings = token.Split('='); + typeof(MailSettings).GetProperty(settings[0]) + .SetValue(mailSettings, settings[1], null); + } + return mailSettings; + } + return base.ConvertFrom(context, culture, value); + } + } + + // a very naieve class that uses the MailSettings class... + public sealed class ExceptionLogger + { + private MailSettings _mailSettings; + + public MailSettings MailSettings { + { + set { _mailSettings = value; } + } + + public void Log(object value) + { + Exception ex = value as Exception; + if(ex != null) + { + // use _mailSettings instance... + } + } + } + } + +

+ The attendant XML configuration for the above classes would be... +

+ + + + + + + + + + + + + + + + Juergen Hoeller + Simon White (.NET) + + + + + + + Registers any custom converters with the supplied + . + + + The object factory to register the converters with. + + + In case of errors. + + + + + Resolves the supplied into a + instance. + + + The object that is to be resolved into a + instance. + + + A resolved instance. + + + If the supplied is , + or the supplied cannot be resolved. + + + + + The custom converters to register. + + +

+ The uses the type name + of the class that requires conversion as the key, and an + instance of the + that will effect + the conversion. Alternatively, the actual + of the class that requires conversion + can be used as the key. +

+
+ +

+ + IDictionary converters = new Hashtable(); + converters.Add( "System.Date", new MyCustomDateConverter() ); + // a System.Type instance can also be used as the key... + converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); + +

+
+
+ + + implementation that + creates delegates. + + +

+ Supports the creation of s for both + instance and methods. +

+
+ Rick Evans +
+ + + Callback method called once all factory properties have been set. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Creates the delegate. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + The of + created by this factory. + + +

+ Returns the + if accessed prior to the method + being called. +

+
+
+ + + The of the + created by this factory. + + + + + The name of the method that is to be invoked by the created + delegate. + + + + + The target if the + refers to a method. + + + + + The target object if the + refers to an instance method. + + + + + A generic implementation of an , that delegates post processing to a passed delegate + + + This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. + + + The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on + the context instance: + + IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); + ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => + { + of.RegisterSingleton("someObject", someObject); + })); + + + Erich Eichinger + + + + Get or Set the handler to delegate configuration to + + + + + Descriptor for a specific dependency that is about to be injected. + Wraps a constructor parameter, a method parameter or a field, + allowing unified access to their metadata. + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for a method or constructor parameter. + Considers the dependency as 'eager' + + The MethodParameter to wrap. + if set to true if the dependency is required. + + + + Initializes a new instance of the class for a method or a constructor parameter. + + The MethodParameter to wrap. + if set to true the dependency is required. + if set to true the dependency is 'eager' in the sense of + eagerly resolving potential target objects for type matching. + + + + Create a new descriptor for a property. + Considers the dependency as 'eager'. + property to wrap + required whether the dependency is required + + + + + Create a new descriptor for a property. + property to wrap + whether the dependency is required + whether this dependency is 'eager' in the sense of + eagerly resolving potential target beans for type matching + + + + + Create a new descriptor for a field. + Considers the dependency as 'eager'. + field to wrap + whether the dependency is required + + + + + Create a new descriptor for a field. + field to wrap + whether the dependency is required + whether this dependency is 'eager' in the sense of + eagerly resolving potential target beans for type matching + + + + + Gets a value indicating whether this dependency is required. + + true if required; otherwise, false. + + + + Determine the declared (non-generic) type of the wrapped parameter/field. + + The type of the dependency (never null + + + + Gets a value indicating whether this is eager in the sense of + eagerly resolving potential target beans for type matching. + + true if eager; otherwise, false. + + + + Gets the wrapped MethodParameter, if any. + + The method parameter. + + + + Gets the Attributes assigned to Field, Property or Paramater + + + + + Gets the name of the member info + + + + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+ + If the value is . + + + If the value is an . + + + If the value is an interface. + +
+ + + The of objects created by this factory. + + + Always returns the . + + + + + A very simple, hashtable-based implementation of + + Erich Eichinger + + + + Creates a new, empty variable source + + + + + Creates a new, empty and case-insensitive variable source + + + + + Create a new variable source from a list of paired string values. + + + + The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: + + new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) + + + + the argument list containing pairs, or null + + + + Initializes a new instance of the DictionaryVariableSource class. + + + + + Creates a new variable source, reading values from another dictionary + and converting them to strings if necessary + + + + + Adds a key/value pair + + this dictionary. allows for fluent config + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Performs a variable name lookup + + + + + Specifies how instances of the + + class must apply environment variables when replacing values. + + Mark Pollack + + + + Never replace environment variables. + + + + + If properties are not specified via a resource, + then resolve using environment variables. + + + + + Apply environment variables first before applying properties from a + resource. + + + + + Implementation of that + resolves variable name against environment variables. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Holder for event handler values for an object. + + Rick Evans (.NET) + + + + The empty array of s. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Adds the supplied handler to the collection of event handlers. + + The handler to be added. + + + + The mapping of event names to an + of + s. + + + + + Gets the of events + that have handlers associated with them. + + + + + Gets the of + s for the supplied + event name. + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to a Spring that should be evaluated at runtime. + + Aleksandar Seovic + + + + Creates a new instance of the + + class. + + The expression to resolve. + + + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Gets or sets the expression string. Setting the expression string will cause + the expression to be parsed. + + The expression string. + + + + Return the expression. + + + + + Properties for this expression node. + + + + + implementation that + retrieves a static or non-static public field value. + + +

+ Typically used for retrieving public constants. +

+
+ +

+ The following example retrieves the field value... +

+ + + + + + +

+ The previous example could also have been written using the convenience + + property, like so... +

+ + + + + +

+ This class also implements the + interface + (). + If the id (or name) of one's + + object definition is set to the + of the field to be retrieved, then the id (or + name) of one's object definition will be used for the name of the + field lookup. See below for an example of this + concise style of definition. +

+ + + + + + + +

+ The usage for retrieving instance fields is similar. No example is shown + because public instance fields are generally bad practice; but if + you have some legacy code that exposes public instance fields, or if you + just really like coding public instance fields, then you can use this + implementation to + retrieve such field values. +

+ + Juergen Hoeller + Rick Evans (.NET) + + + + Interface to be implemented by objects that wish to be aware of their object + name in an . + + +

+ Note that most objects will choose to receive references to collaborating + objects via respective properties. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + 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. +

+
+
+ + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + +

+ This method allows the object instance to perform initialization only + possible when all object properties have been set and to throw an + exception in the event of misconfiguration. +

+
+ + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The of the + field to be retrieved. + + + + + Set the name of the object in the object factory that created this object. + + + The name of the object in the factory. + + +

+ In the context of the + + class, the + + value will be interepreted as the value of the + + property if no value has been explicitly assigned to the + + property. This allows for concise object definitions with just an id or name; + see the class documentation for + + for an example of this style of usage. +

+
+
+ + + The name of the field the value of which is to be retrieved. + + +

+ If the + + has been set (and is not ), then the value of this property + refers to an instance field name; it otherwise refers to a + field name. +

+
+
+ + + The object instance on which the field is defined. + + + + + The on which the field is defined. + + + + + The of object that this + creates, or + if not known in advance. + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + Extension of the + interface to be implemented by object factories that are capable of + autowiring and expose this functionality for existing object instances. + + Juergen Hoeller + Rick Evans (.NET) + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + the resolved object, or null if none found + if dependency resolution failed + + + + Extension of the interface + that injects dependencies into the object managed by the factory. + + Bruno Baia + + + + Gets the template object definition that should be used + to configure the instance of the object managed by this factory. + + + + + SPI interface to be implemented by most if not all listable object factories. + + +

+ Allows for framework-internal plug'n'play, e.g. in + . +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Configuration interface to be implemented by most if not all object + factories. + + +

+ Provides the means to configure an object factory in addition to the + object factory client methods in the + interface. +

+

+ Allows for framework-internal plug'n'play even when needing access to object + factory configuration methods. +

+

+ When disposed, it will destroy all cached singletons in this factory. Call + when you want to shutdown + the factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Interface that defines a registry for shared object instances. + + + Can be implemented by + implementations in order to expose their singleton management facility + in a uniform manner. + + The interface extends this interface. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Registers the given existing object as singleton in the object registry, + under the given object name. + + + + The given instance is supposed to be fully initialized; the registry + will not perform any initialization callbacks (in particular, it won't + call IInitializingObject's AfterPropertiesSet method). + The given instance will not receive any destruction callbacks + (like IDisposable's Dispose method) either. + + + If running within a full IObjectFactory: Register an object definition + instead of an existing instance if your object is supposed to receive + initialization and/or destruction callbacks. + + + Typically invoked during registry configuration, but can also be used + for runtime registration of singletons. As a consequence, a registry + implementation should synchronize singleton access; it will have to do + this anyway if it supports a BeanFactory's lazy initialization of singletons. + + + Name of the object. + The singleton object. + + + + + + Return the (raw) singleton object registered under the given name. + + + + Only checks already instantiated singletons; does not return an Object + for singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to access manually registered singletons + . Can also be used to access a singleton + defined by an object definition that already been created, in a raw fashion. + + + Name of the object to look for. + the registered singleton object, or null if none found + + + + + Check if this registry contains a singleton instance with the given name. + + + + Only checks already instantiated singletons; does not return true + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check whether a + singleton defined by an object definition has already been created. + + + To check whether an object factory contains an object definition with a given name, + use ListableBeanFactory's ContainsObjectDefinition. Calling both + ContainsObjectDefinition and ContainsSingleton answers + whether a specific object factory contains an own object with the given name. + + + Use IObjectFactory's ContainsObject for general checks whether the + factory knows about an object with a given name (whether manually registered singleton + instance or created by bean definition), also checking ancestor factories. + + + Name of the object to look for. + + true if this bean factory contains a singleton instance with the given name; otherwise, false. + + + + + + + + Gets the names of singleton objects registered in this registry. + + + + Only checks already instantiated singletons; does not return names + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + The list of names as String array (never null). + + + + + + + Gets the number of singleton beans registered in this registry. + + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + The number of singleton objects. + + + + + + + Ignore the given dependency type for autowiring. + + +

+ To be invoked during factory configuration. +

+

+ This will typically be used for dependencies that are resolved + in other ways, like + through . +

+
+ + The to be ignored. + +
+ + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a new + that will get applied to objects created by this factory. + + +

+ To be invoked during factory configuration. +

+
+ + The + to register. + +
+ + + Given an object name, create an alias. + + +

+ This is typically used to support names that are illegal within + XML ids (which are used for object names). +

+

+ Typically invoked during factory configuration, but can also be + used for runtime registration of aliases. Therefore, a factory + implementation should synchronize alias access. +

+
+ The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + +
+ + + Register the given custom + for all properties of the given . + + +

+ To be invoked during factory configuration. +

+
+ + The required of the property. + + + The to register. + +
+ + + Add a String resolver for embedded values such as annotation attributes. + + the String resolver to apply to embedded values + + + + Resolve the given embedded value, e.g. an annotation attribute. + + the value to resolve + the resolved value (may be the original value as-is) + + + + Set the parent of this object factory. + + +

+ Note that the parent shouldn't be changed: it should only be set outside + a constructor if it isn't available when an object of this class is + created. +

+
+
+ + + Returns the current number of registered + s. + + + The current number of registered + s. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + +

+ Typically invoked at the end of factory setup, if desired. +

+

+ As this is a startup method, it should destroy already created singletons if + it fails, to avoid dangling resources. In other words, after invocation + of that method, either all or no singletons at all should be + instantiated. +

+
+ + If one of the singleton objects could not be created. + +
+ + + Register a special dependency type with corresponding autowired value. + + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the BeanFactory interface itself. + + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + May be used to store custom value references in object definition properties. + + + Erich Eichinger + + + + + + the object factory holding the given object definition + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Denotes a special placeholder collection that may contain + s or + other placeholder objects that will need to be resolved. + + +

+ 'A special placeholder collection' means that the elements of this + collection can be placeholders for objects that will be resolved later by + a Spring.NET IoC container, i.e. the elements themselves will be + resolved at runtime by the enclosing IoC container. +

+

+ The core Spring.NET library already provides three implementations of this interface + straight out of the box; they are... +

+ + + + . + + + + + . + + + + + . + + + +

+ If you have a custom collection class (i.e. a class that either implements the + directly or derives from a class that does) + that you would like to expose as a special placeholder collection (i.e. one that can + have s as elements + that will be resolved at runtime by an appropriate Spring.NET IoC container, just + implement this interface. +

+
+ +

+ Lets say one has a Bag class (i.e. a collection that supports bag style semantics). +

+ + using System; + + using Spring.Objects.Factory.Support; + + namespace MyNamespace + { + public sealed class Bag : ICollection + { + // ICollection implementation elided for clarity... + + public void Add(object o) + { + // implementation elided for clarity... + } + } + + public class ManagedBag : Bag, IManagedCollection + { + public ICollection Resolve( + string objectName, RootObjectDefinition definition, + string propertyName, ManagedCollectionElementResolver resolver) + { + Bag newBag = new Bag(); + string elementName = propertyName + "[bag-element]"; + foreach(object element in this) + { + object resolvedElement = resolver(objectName, definition, elementName, element); + newBag.Add(resolvedElement); + } + return newBag; + } + } + } + +
+ Rick Evans +
+ + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Resolves a single element value of a managed collection. + + +

+ If the does not need to be resolved or + converted to an appropriate , the + will be returned as-is. +

+
+ + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + That element of a managed collection that may need to be resolved + to a concrete value. + + A fully resolved element. +
+ + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + implementation that + creates instances of the class. + + +

+ Typically used for retrieving shared + instances for common topics (such as the 'DAL', 'BLL', etc). The + + property determines the name of the + Common.Logging logger. +

+
+ Rick Evans + +
+ + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The name of the instance served up by + this factory. + + + If the supplied is + or contains only whitespace character(s). + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object + managed by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The name of the instance served up by + this factory. + + + The name of the instance served up by + this factory. + + + If the supplied to the setter is + or contains only whitespace character(s). + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Tag subclass used to hold a dictionary of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Interface representing an object whose value set can be merged with that of a parent object. + + Rob Harrop + Mark Pollack (.NET) + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. + + + + + Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. + + The approximate number of elements that the object can initially contain. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the keys of this managed dictionary. + + The unresolved name for the type of the keys of this managed dictionary. + + + + Gets or sets the unresolved name for the + of the values of this managed dictionary. + + The unresolved name for the type of the values of this managed dictionary. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a list of managed elements. + + Rod Johnson + Rick Evans (.NET) + + + + Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. + + + + + Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. + + The number of elements that the new list can initially store. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed list. + + The unresolved name for the type of the elements of this managed list. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag class which represent a Spring-managed instance that + supports merging of parent/child definitions. + + + + + Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + + + + Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + The initial number of entries that the can contain. is less than zero. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a set of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed set. + + The unresolved name for the type of the elements of this managed set. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + An that returns a value + that is the result of a or instance method invocation. + + +

+ Note that this class generally is expected to be used for accessing factory methods, + and as such defaults to operating in singleton mode. The first request to + + by the owning object factory will cause a method invocation, the return + value of which will be cached for all subsequent requests. The + property may be set to + , to cause this factory to invoke the target method each + time it is asked for an object. +

+

+ A target method may be specified by setting the + property to a string representing + the method name, with specifying + the that the method is defined on. + Alternatively, a target instance method may be specified, by setting the + property as the target object, and + the property as the name of the + method to call on that target object. Arguments for the method invocation may be + specified by setting the property. +

+

+ Another (esoteric) use case for this factory object is when one needs to call a method + that doesn't return any value (for example, a class method to + force some sort of initialization to happen)... this use case is not supported by + factory-methods, since a return value is needed to become the object. +

+

+ + This class depends on the + + method being called after all properties have been set, as per the + contract. If you are + using this class outside of a Spring.NET IoC container, you must call one of either + or + yourself to ready the object's internal + state, or you will get a nasty . + +

+
+ +

+ The following example uses an instance of this class to call a + factory method... +

+ + + + + + + + 1st + 2nd + and 3rd arguments + + + + +

+ The following example is similar to the preceding example; the only pertinent difference is the fact that + a number of different objects are passed as arguments, demonstrating that not only simple value types + are valid as elements of the argument list... +

+ + + + + + + + + + + 1st + + + + + + + http://www.springframework.net/ + + + + + +

+ Named parameters are also supported... this next example yields the same results as + the preceding example (that did not use named arguments). +

+ + + + + + + + + + 1st + and 3rd arguments + 2nd + + + + +

+ Similarly, the following example uses an instance of this class to call an instance method... +

+ + + + + + + + + +

+ The above example could also have been written using an anonymous inner object definition... if the + object on which the method is to be invoked is not going to be used outside of the factory object + definition, then this is the preferred idiom because it limits the scope of the object on which the + method is to be invoked to the surrounding factory object. +

+ + + + + + + + + + Colin Sampaleanu + Juergen Hoeller + Rick Evans (.NET) + Simon White (.NET) + + + + + + Specialisation of the class that tries + to convert the given arguments for the actual target method via an + appropriate implementation. + + Juergen Hoeller + Rick Evans + + + + + Helper class allowing one to declaratively specify a method call for later invocation. + + +

+ Typically not used directly but via its subclasses such as + . +

+

+ Usage: specify either the and + or the + and + properties respectively, and + (optionally) any arguments to the method. Then call the + method to prepare the invoker. + Once prepared, the invoker can be invoked any number of times. +

+
+ +

+ The following example uses the class to invoke the + ToString() method on the Foo class using a mixture of both named and unnamed + arguments. +

+ + public class Foo + { + public string ToString(string name, int age, string address) + { + return string.Format("{0}, {1} years old, {2}", name, age, address); + } + + public static void Main() + { + Foo foo = new Foo(); + MethodInvoker invoker = new MethodInvoker(); + invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; + invoker.AddNamedArgument("age", 29); + invoker.Prepare(); + // at this point, the arguments that will be passed to the method invocation + // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} + string details = (string) invoker.Invoke(); + Console.WriteLine (details); + // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' + } + } + +
+ Colin Sampaleanu + Juergen Hoeller + Simon White (.NET) +
+ + + The used to search for + the method to be invoked. + + + + + The value returned from the invocation of a method that returns void. + + + + + The method that will be invoked. + + + + + Creates a new instance of the class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set, or a matching argument could not be found + for a named argument (typically down to a typo). + + + If the specified method could not be found. + +
+ + + Searches for and returns the method that is to be invoked. + + + The return value of this method call will subsequently be returned from the + . + + The method that is to be invoked. + + If no method could be found. + + + If more than one method was found. + + + + + Adds the named argument to this instances mapping of argument names to argument values. + + + The name of an argument on the method that is to be invoked. + + + The value of the named argument on the method that is to be invoked. + + + + + Returns the prepared object that + will be invoked. + + +

+ A possible use case is to determine the return of the method. +

+
+ + The prepared object that + will be invoked. + +
+ + + Invoke the specified method. + + +

+ The invoker needs to have been prepared beforehand (via a call to the + method). +

+
+ + The object returned by the method invocation, or + if the method returns void. + + + If at least one of the arguments passed to this + was incompatible with the signature of the invoked method. + +
+ + + The target on which to call the target method. + + +

+ Only necessary when the target method is ; + else, a target object needs to be specified. +

+
+
+ + + The target object on which to call the target method. + + +

+ Only necessary when the target method is not ; + else, a target class is sufficient. +

+
+
+ + + The name of the method to be invoked. + + +

+ Refers to either a method + or a non- method, depending on + whether or not a target object has been set. +

+
+ +
+ + + Arguments for the method invocation. + + +

+ Ordering is significant... the order of the arguments in this + property must match the ordering of the various parameters on the target + method. There does however exist a small possibility for confusion when + the arguments in this property are supplied in addition to one or more named + arguments. In this case, each named argument is slotted into the index position + corresponding to the named argument... once once all named arguments have been + resolved, the arguments in this property are slotted into any remaining (empty) + slots in the method parameter list (see the example in the overview of the + class if this is not clear). +

+

+ If this property is not set, or the value passed to the setter invocation + is or a zero-length array, a method with no (un-named) arguments is assumed. +

+
+ +
+ + + The resolved arguments for the method invocation. + + + + This property is not set until the target method has been resolved via a call to the + method). It is a combination of the + named and plain vanilla arguments properties, and it is this object array that + will actually be passed to the invocation of the target method. + +

+ Setting the value of this property to results in basically clearing out any + previously prepared arguments... another call to the + method will then be required to prepare the arguments again (or the prepared arguments + can be set explicitly if so desired). +

+
+ + +
+ + + Named arguments for the method invocation. + + +

+ The keys of this dictionary are the () names of the + method arguments, and the () values are the actual + argument values themselves. +

+

+ If this property is not set, or the value passed to the setter invocation + is a reference, a method with no named arguments is assumed. +

+
+ +
+ + + Creates a new instance of the + class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set. + + + If the specified method could not be found. + +
+ + + Register the given custom + for all properties of the given . + + + The of property. + + + The to register. + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + +

+ Returns the return value of the method that is to be invoked. +

+

+ Will return the same value each time if the + + property value is . +

+
+ + An instance (possibly shared or independent) of the object managed by + this factory. + + +
+ + + Prepares this method invoker. + + + If all required properties are not set. + + + If the specified method could not be found. + + + + + + If a singleton should be created, or a new object on each request. + Defaults to . + + + + + Return the return value of the method + that this factory invokes, or if not + known in advance. + + +

+ If the return value of the method that this factory is to invoke is + , then the + will be returned (in accordance with the + contract that + treats a value as a configuration error). +

+
+ +
+ + + Holder for an with + name and aliases. + + +

+ Recognized by + + for inner object definitions. Registered by + , + which also uses it as general holder for a parsed object definition. +

+

+ Can also be used for programmatic registration of inner object + definitions. If you don't care about the functionality offered by the + interface and the like, + registering + or is good enough. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + + The name of the object definition. + + + + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + The name of the object. + + Any aliases for the supplied + + + + + Checks wether a givin candidate name has a defined object or alias + + name to check if exists + + + + + The held by this + instance. + + + + + The name of the object definition. + + + + + Any aliases for the object definition. + + +

+ Guaranteed to never return ; if the associated + + does not have any aliases associated with it, then an empty + array will be returned. +

+
+
+ + + Visitor class for traversing objects, in particular + the property values and constructor arguments contained in them resolving + object metadata values. + + + Used by and + to parse all string values contained in a ObjectDefinition, resolving any placeholders found. + + Mark Pollack + + + + Initializes a new instance of the class. + + The handler to be called for resolving variables contained in a string. + + + + Initializes a new instance of the class + for subclassing + + Subclasses should override the ResolveStringValue method + + + + Traverse the given ObjectDefinition object and the MutablePropertyValues + and ConstructorArgumentValues contained in them. + + The object definition to traverse. + + + + Visits the ObjectDefinition property ObjectTypeName, replacing string values using + the specified IVariableSource. + + The object definition. + + + + Visits the property values of the ObjectDefinition, replacing string values + using the specified IVariableSource. + + The object definition. + + + + Visits the indexed constructor argument values, replacing string values using the + specified IVariableSource. + + The indexed argument values. + + + + Visits the named constructor argument values, replacing string values using the + specified IVariableSource. + + The named argument values. + + + + Visits the generic constructor argument values, replacing string values using + the specified IVariableSource. + + The genreic argument values. + + + + Configures the constructor argument ValueHolder. + + The vconstructor alue holder. + + + + Resolves the given value taken from an object definition according to its type + + the value to resolve + the resolved value + + + + Visits the ManagedList property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet properties KeyTypeName and ValueTypeName and + calls for dictionary's value element. + + + + + Visits the elements of a NameValueCollection and calls + for value of each element. + + + + + calls the to resolve any variables contained in the raw string. + + the raw string value containing variable placeholders to be resolved + If no has been configured. + the resolved string, having variables being replaced, if any + + + + Returns a value that is an + that + returns an object from an + . + + +

+ The primary motivation of this class is to avoid having a client object + directly calling the + + method to get a prototype object out of an + , which would be a + violation of the inversion of control principle. With the use of this + class, the client object can be fed an + as a property + that directly returns one target prototype object. +

+

+ The object referred to by the value of the + + property does not have to be a prototype object, but there is little + to no point in using this class in conjunction with a singleton object. +

+
+ +

+ The following XML configuration snippet illustrates the use of this + class... +

+ + + + + + + + + + + + + + + + Colin Sampaleanu + Simon White (.NET) + + + + Returns an instance of the object factory. + + The object factory. + + + + Invoked by an + after it has set all supplied object properties. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Sets the name of the target object. + + + + + 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 of object created by this factory. + + + + + Interface defining a factory which can return an object instance + (possibly shared or independent) when invoked. + + + This interface is typically used to encapsulate a generic factory + which returns a new instance (prototype) on each invocation. + It is similar to the , but + implementations of the aforementioned interface are normally meant to be defined + as instances by the user in an , + while implementations of this class are normally meant to be fed as a property to + other objects; as such, the + method + has different exception handling behavior. + + Colin Sampaleanu + Simon White (.NET) + + + + Return an instance (possibly shared or independent) + of the object managed by this factory. + + + An instance of the object (should never be ). + + + + + Creates a new instance of the GenericObjectFactory class. + + + The enclosing + . + + + + + Returns the object created by the enclosed object factory. + + The created object. + + + + An implementation + that exposes an arbitrary target object under a different name. + + +

+ Usually, the target object will reside in a different object + definition file, using this + to link it in + and expose it under a different name. Effectively, this corresponds + to an alias for the target object. +

+ + For XML based object definition files, a <alias> + tag is available that effectively achieves the same. + +
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Initialize a new default instance + + + + + Initialize this instance with the predefined and . + + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The name of the target object. + + +

+ The target object may potentially be defined in a different object + definition file. +

+
+ The name of the target object. +
+ + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Callback that supplies the owning factory to an object instance. + + + The owning + (may not be ). The object can immediately + call methods on the factory. + + + In case of initialization errors. + + + + + + + Erich Eichinger + + + + Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object. + + + + + Role hint indicating that a is a supporting + part of some larger configuration, typically an outer ComponentDefinition + SUPPORT objects are considered important enough to be aware + of when looking more closely at a particular ComponentDefinition, + but not when looking at the overall configuration of an application. + + + + + Role hint indicating that a is providing an + entirely background role and has no relevance to the end-user. This hint is + used when registering objects that are completely part of the internal workings + of a ComponentDefinition. + + + + + Implementation of that + resolves variable name against Java-style property file. + + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets the locations of the property files + to read properties from. + + + The locations of the property files + to read properties from. + + + + + Convinience property. Gets or sets a single location + to read properties from. + + + A location to read properties from. + + + + + Sets a value indicating whether to ignore resource locations that do not exist. This will call + the Exists property. + + + true if one should ignore missing resources; otherwise, false. + + + + + Overrides default values in one or more object definitions. + + +

+ Instances of this class override already existing values, and is + thus best suited to replacing defaults. If you need to replace + placeholder values, consider using the + + class instead. +

+

+ In contrast to the + + class, the original object definition can have default + values or no values at all for such object properties. If an overriding + configuration file does not have an entry for a certain object property, + the default object value is left as is. Also note that it is not + immediately obvious to discern which object definitions will be mutated by + one or more + s + simply by looking at the object configuration. +

+

+ Each line in a referenced configuration file is expected to take the + following form... +

+ + + +

+ The name.property key refers to the object name and the + property that is to be overridden; and the value is the overridding + value that will be inserted into the appropriate object definition's + named property. +

+

+ Please note that in the case of multiple + s + that define different values for the same object definition value, the + last overridden value will win (due to the fact that the values + supplied by previous + s + will be overridden). +

+
+ +

+ The following XML context definition defines an object that has a number + of properties, all of which have default values... +

+ + + + + + + + +

+ What follows is a .NET config file snippet for the above example (assuming + the need to override one of the default values)... +

+ + + + + + +
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + Allows for the configuration of individual object property values from + a .NET .config file. + + +

+ Useful for custom .NET .config files targetted at system administrators + that override object properties configured in the application context. +

+

+ Two concrete implementations are provided in the Spring.NET core library: + + + + + for <add key="placeholderKey" value="..."/> style + overriding (pushing values from a .NET .config file into object + definitions). + + + + + + for replacing "${...}" placeholders (pulling values from a .NET .config + file into object definitions). + + + +

+

+ Please refer to the API documentation for the concrete implementations + listed above for example usage. +

+
+ Juergen Hoeller + Simon White (.NET) + + +
+ + + The default configuration section name to use if none is explictly supplied. + + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Modify the application context's internal object factory after its + standard initialization. + + + The object factory used by the application context. + + + In case of errors. + + + + + + Loads properties from the configuration sections + specified in into . + + The instance to be filled with properties. + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Validates the supplied . + + +

+ Basically, if external locations are specified, ensure that either + one or a like number of config sections are also specified. +

+
+ + The to be validated. + +
+ + + Simply initializes the supplied + collection with this instances default + (if any). + + + The collection to be so initialized. + + + + + The policy for resolving conflicting property overrides from + several resources. + + +

+ When merging conflicting property overrides from several resources, + should append an override with the same key be appended to the + current value, or should the property override from the last resource + processed override previous values? +

+

+ The default value is ; i.e. a property + override from the last resource to be processed overrides previous + values. +

+
+ + if the property override from the last resource + processed overrides previous values. + +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + The default properties to be applied. + + +

+ These are to be considered defaults, to be overridden by values + loaded from other resources. +

+
+
+ + + The location of the .NET .config file that contains the property + overrides that are to be applied. + + + + + The locations of the .NET .config files containing the property + overrides that are to be applied. + + + + + The configuration sections to look for within the .config files. + + + + + + + Should a failure to find a .config file be ignored? + + +

+ is only appropriate if the .config file is + completely optional. The default is . +

+
+ + if a failure to find a .config file is to be + ignored. + +
+ + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Process the given key as 'name.property' entry. + + + The object factory containing the object definitions that are to be + processed. + + The key. + The value. + + If an error occurs. + + + If the property was not well formed (i.e. not in the format "name.property"). + + + + + implementation that + evaluates a property path on a given target object. + + +

+ The target object can be specified directly or via an object name (see + example below). +

+

+ Please note that the + is an implementation, and as such has + to comply with the contract of the + interface; more specifically, this means that the end result of the property lookup path + evaluation cannot be ( + implementations are not permitted to return ). If the resut of a + property lookup path evaluates to , an exception will be thrown. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + Juergen Hoeller + Rick Evans (.NET) + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The target object that the property path lookup is to be applied to. + + +

+ This would most likely be an inner object, but can of course be + any object reference. +

+
+ + The target object that the property path lookup is to be applied to. + + +
+ + + The (object) name of the target object that the property path lookup + is to be applied to. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this name prior to resolution. The implication of this is that + one cannot use the + class in conjunction with object names that start or end with whitespace. +

+
+ + The (object) name of the target object that the property path lookup + is to be applied to. + + +
+ + + The property (lookup) path to be applied to the target object. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this path prior to resolution. Whitespace is not a valid + identifier for property names (in part or whole) in CLS-based languages, + so this is a not unreasonable action. Please also note that whitespace + that is embedded within the property path will be left as-is (which may + or may not result in an error being thrown, depending on the context of + the whitespace). +

+
+ +

+ Examples of such property lookup paths can be seen below; note that + property lookup paths can be nested to an arbitrary level. +

+ + name.length + accountManager.account['the key'].name + accounts[0].name + +
+ + The property (lookup) path to be applied to the target object. + +
+ + + The 'expected' of the result from evaluating the + property path. + + +

+ This is not necessary for directly specified target objects, or + singleton target objects, where the can + be determined via reflection. Just specify this in case of a + prototype target, provided that you need matching by type (for + example, for autowiring). +

+

+ It is permissable to set the value of this property to + (which in any case is the default value). +

+
+ + The 'expected' of the result from evaluating the + property path. + +
+ + + 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? + + + + + + Set the name of the object in the object factory that created this object. + + +

+ The object name of this + + will be interpreted as "objectName.property" pattern, if neither the + + + have been supplied (set). +

+

+ This allows for concise object definitions with just an id or name. +

+
+ + The name of the object in the factory. + +
+ + + 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. + + + + + Resolves placeholder values in one or more object definitions. + + +

+ The default placeholder syntax follows the NAnt style: ${...}. + Instances of this class can be configured in the same way as any other + object in a Spring.NET container, and so custom placeholder prefix + and suffix values can be set via the + and properties. +

+ +

+ The following example XML context definition defines an object that has + a number of placeholders. The placeholders can easily be distinguished + by the presence of the ${} characters. +

+ + + + + + + + +

+ The associated XML configuration file for the above example containing the + values for the placeholders would contain a snippet such as .. +

+ + + + + + + + +

+ The preceding XML snippet listing the various property keys and their + associated values needs to be inserted into the .NET config file of + your application (or Web.config file for your ASP.NET web application, + as the case may be), like so... +

+ + + + + + + + +
+

+ + checks simple property values, lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. +

+ + + + + + + + +

+ In contrast to the + + class, this configurer only permits the replacement of explicit + placeholders in object definitions. Therefore, the original definition + cannot specify any default values for its object properties, and the + placeholder configuration file is expected to contain an entry for each + defined placeholder. That is, if an object definition contains a + placeholder ${foo}, there should be an associated + <add key="foo" value="..."/> entry in the + referenced placeholder configuration file. Default property values + can be defined via the inherited + + collection to overcome any perceived limitation of this feature. +

+

+ If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. If you want to resolve properties from multiple configuration + resources, simply specify multiple resources via the + + property. Finally, please note that you can also define multiple + + instances, each with their own custom placeholder syntax. +

+
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Initializes the new instance + + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Parse values recursively to be able to resolve cross-references between + placeholder values. + + + The map of constructor arguments / property values. + + The string to be resolved. + The placeholders that have already been visited + during the current resolution attempt (used to detect circular references + between placeholders). Only non-null if we're parsing a nested placeholder. + + If an error occurs. + + The resolved string. + + + + Resolve the given placeholder using the given name value collection, + performing an environment variables check according to the given mode. + + +

+ The default implementation delegates to + + before/afer the environment variable check. Subclasses can override + this for custom resolution strategies, including customized points + for the environment properties check. +

+
+ The placeholder to resolve + + The merged name value collection of this configurer. + + The environment variable mode. + + The resolved value or if none. + + +
+ + + Resolve the given placeholder using the given name value collection. + + +

+ This (the default) implementation simply looks up the value of the + supplied key. +

+

+ Subclasses can override this for customized placeholder-to-key + mappings or custom resolution strategies, possibly just using the + given name value collection as fallback. +

+
+ The placeholder to resolve. + + The merged name value collection of this configurer. + + The resolved value. +
+ + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Controls how environment variables will be used to + replace property placeholders. + + +

+ See the overview of the + + enumeration for the available options. +

+
+
+ + + Simple strategy interface for resolving a String value. + + + + + Resolve the given String value, for example parsing placeholders. + + the original String value + the resolved String value + + + + implementation that + retrieves a or non-static public property value. + + +

+ Typically used for retrieving public property values. +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + Template method that subclasses must override to construct the object + returned by this factory. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + The of the static property + to be retrieved. + + + + + Arguments for the property invocation. + + +

+ If this property is not set, or the value passed to the setter invocation + is a null or zero-length array, a property with no arguments is assumed. +

+
+
+ + + The name of the property the value of which is to be retrieved. + + +

+ Refers to either a property or a non-static property, + depending on a target object being set. +

+
+
+ + + The object instance on which the property is defined. + + + + + The on which the property is defined. + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + Implementation of that + resolves variable name against registry key. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, + strings are concatenated to a comma-separated list following + + + The variable value if able to resolve, null otherwise. + + + + + Gets or sets the registry key to obtain variable values from. + + + The registry key to obtain variable values from. + + + + + + implementation that allows for convenient registration of custom + IResource implementations. + + +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of IResources is required. +

+
+ Mark Pollack + + +
+ + + Registers custom IResource implementations. The supplied + is not used since IResourse implementations + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The IResource implementations, i.e. resource handlers, to register. + + +

+ The has the + contains the resource protocol name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + The value can be the fully qualified name of the IResource + implementation, a string, or + an actual of the IResource class + +

+
+
+ + + A convenience class to create a + given the resource base + name and assembly name. + + +

+ This is currently the preferred way of injecting resources into view + tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). + A GUI component (typically a Windows Form) is injected with + an instance, and can + then proceed to use the various GetXxx() methods on the + to retrieve images, + strings, custom resources, etc. +

+
+ Mark Pollack + + + +
+ + + Creates a . + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The root name of the resources. + + +

+ For example, the root name for the resource file named + "MyResource.en-US.resources" is "MyResource". +

+ + The namespace is also prefixed before the resource file name. + +
+
+ + + The string representation of the assembly that contains the resource. + + + + + The . + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to another object in this factory to be resolved at runtime. + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + +

+ This does not mark this object as being a reference to + another object in any parent factory. +

+
+ The name of the target object. +
+ + + Creates a new instance of the + + class. + + +

+ This variant constructor allows a client to specifiy whether or not + this object is a reference to another object in a parent factory. +

+
+ The name of the target object. + + Whether this object is an explicit reference to an object in a + parent factory. + +
+ + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Determines whether the specified RuntimeObjectReference is equal to the current RuntimeObjectReference. + + true if the specified RuntimeObjectReference is equal to the current RuntimeObjectReference; otherwise, false. + + + + Determines whether the specified System.Object is equal to the current RuntimeObjectReference. + + true if the specified RuntimeObjectReference is equal to the current RuntimeObjectReference; otherwise, false. + + + + Serves as a hash function for RuntimeObjectReference. + + A hash code for the currentRuntimeObjectReference. + + + + Return the target object name. + + + + + Is this is an explicit reference to an object in the parent + factory? + + + if this is an explicit reference to an + object in the parent factory. + + + + + Simple factory object for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target set. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + Configure all ISharedStateAware objects, delegating concrete handling to the list of . + + + + + Creates a new empty instance. + + + + + Creates a new preconfigured instance. + + + priority value affecting order of invocation of this processor. See interface. + + + + Iterates over configured list of s until + the first provider is found that
+ a) true == provider.CanProvideState( instance, name )
+ b) null != provider.GetSharedState( instance, name )
+
+
+ + + A NoOp for this processor + + + The new object instance. + + + The name of the object. + + + the original . + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Get/Set the (already ordererd!) list of instances. + + + If this list is not set, the containing object factory will automatically + be scanned for instances. + + + + + Implementation of that + resolves variable name against special folders (as defined by + enumeration). + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves specified special folder to its full path. + + + The name of the special folder to resolve. Should be one of the values + defined by the enumeration. + + + The folder path if able to resolve, null otherwise. + + + + + + implementation that allows for convenient registration of custom + type aliases. + + + Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of type aliases is required. +

+
+ Mark Pollack + + +
+ + + Registers any type aliases. The supplied + is not used since type aliases + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The type aliases to register. + + +

+ The has the + contains the alias name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + the value can be the fully qualified name of the type as a string or + an actual of the class that + being aliased. +

+
+
+ + + Holder for a typed value. + + +

+ Can be added to object definitions to explicitly specify + a target type for a value, + for example for collection + elements. +

+

+ This holder just stores the value and the target + . The actual conversion will be performed by + the surrounding object factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Bruno Baia (.NET) +
+ + + Creates a new instance of the + + class. + + + + + Initializes a new instance of the class. + + The value. + + + + Creates a new instance of the + + class. + + + The value that is to be converted. + + + The to convert to. + + + If the supplied is + . + + + + + Creates a new instance of the + + class. + + + The value that is to be converted. + + + The unresolved type to convert to. + + + If the supplied is a + or an empty string. + + + + + Determine the type to convert to, resolving it from a specified type name if necessary. + + The resolved type to convert to. + + + + The value that is to be converted. + + +

+ Obviously if the + + is the , no conversion + will actually be performed. +

+
+
+ + + The to convert to. + + + If the setter is supplied with a value. + + + + + The unresolved type to convert to. + + + If the setter is supplied with a value or an empty string. + + + + + Gets a value indicating whether this instance has target type. + + + true if this instance has target type; otherwise, false. + + + + + Provides methods for type-safe accessing s. + + Erich Eichinger + + + + Initialize a new instance of an + + The underlying to read values from. + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns an of 's type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + An of 's type that contains the value of the specified variable + or , if returns null. + + + + + Returns an of 's type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + An of 's type that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns or . + + A that contains the value of the specified variable + or , if returns null. + + + + + Resolves placeholder values in one or more object definitions + + + The placeholder syntax follows the NAnt style: ${...}. + Placeholders values are resolved against a list of + s. In case of multiple definitions + for the same property placeholder name, the first one in the + list is used. + Variable substitution is performed on simple property values, + lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. + + + + + + + + + + If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. + + Mark Pollack + + + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Create a new instance without any variable sources + + + + + Create a new instance and initialize with the given variable source + + + + + + Create a new instance and initialize with the given list of variable sources + + + + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Apply the property replacement using the specified s for all + object in the supplied + . + + + The + used by the application context. + + + If an error occured. + + + + + Sets the list of s that will be used to resolve placeholder names. + + A list of s. + + + + Sets that will be used to resolve placeholder names. + + A instance. + + + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + Initializes a new instance of the Location class. + + + + + + + Initializes a new instance of the Location class. + + + + + + Thrown when an + encounters an internal error, and its definitions are invalid. + + +

+ An example of a situation when this exception would be thrown is + in the case of an XML document containing object definitions being + malformed. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectDefinitionStoreException class. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Initializes a new instance of the class. + + + The description of the resource that the object definition came from + + The detail message (used as exception message as-is) + The root cause. (may be null + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The description of the resource associated with the object + + + + + The name of the object that trigger the exception. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Initializes a new instance of the ObjectDefinitionParsingException class. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The description of the resource that the object definition came from + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Initializes a new instance of the class. + + + The description of the resource that the object definition came from + + The detail message (used as exception message as-is) + The root cause. (may be null + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + The description of the resource that the object definition came from + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionParsingException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Context that gets passed along an object definition reading process, + encapsulating all relevant configuraiton as well as state. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The resource. + + + + Gets the resource. + + The resource. + + + + Abstract superclass + that implements default object creation. + + +

+ Provides object creation, initialization and wiring, supporting + autowiring and constructor resolution. Handles runtime object + references, managed collections, and object destruction. +

+

+ The main template method to be implemented by subclasses is + , + used for autowiring by type. Note that this class does not implement object + definition registry capabilities + ( + does). +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Abstract superclass for + implementations. + + +

+ This class provides singleton / prototype determination, singleton caching, + object definition aliasing, + handling, and object definition merging for child object definitions. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Marker object to be temporarily registered in the singleton cache, + while instantiating an object (in order to be able to detect circular references). + + + + + Used as value in hashtable that keeps track of singleton names currently in the + process of being created. Would not be necessary if we created a case insensitive implementation of + ISet. + + + + + The instance for this class. + + + + + Cache of singleton objects created by s: FactoryObject name -> product + + + + + Disposable object instances: object name --> disposable instance + + + + + root object definitons: object name --> Root Object Definition + + + + + Whether to cache object metadata or rather reobtain it for every access + + + + + Names of object that have already been created at least once + + + + + Creates a new instance of the + class. + + +

+ This constructor implicitly creates an + + that treats the names of objects in this factory in a case-sensitive fashion. +

+

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

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + +
+ + + Creates a new instance of the + class. + + +

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

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + + + Any parent object factory; may be . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + In case of errors. + +
+ + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + In case of errors. + +
+ + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Create instance only - suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself, + nor throw an exception. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Does this object factory contain an object definition with the + supplied ? + + +

+ Does not consider any hierarchy this factory may participate in. + Invoked by + + when no cached singleton instance is found. +

+
+ + The name of the object to look for. + + + if this object factory contains an object + definition with the supplied . + +
+ + + Adds the supplied (object) to this factory's + singleton cache. + + +

+ To be called for eager registration of singletons, e.g. to be able to + resolve circular references. +

+ + If a singleton has already been registered under the same name as + the supplied , then the old singleton will + be replaced. + +
+ The name of the object. + The singleton object. + + If the argument is + or consists wholly of whitespace characters; or if the + is . + +
+ + + Return the object name, stripping out the factory dereference prefix if + necessary, and resolving aliases to canonical names. + + + The transformed name of the object. + + + + + Ensures, that the given name is prefixed with + if it incidentially already starts with this prefix. This avoids troubles when dereferencing + the object name during + + + + + Determines whether the specified name is defined as an alias as opposed + to the name of an actual object definition. + + The object name to check. + + true if the specified name is alias; otherwise, false. + + + + + Return a , + even by traversing parent if the parameter is a child definition. + + + The name of the object. + + + Are ancestors to be included in the merge? + + +

+ Will ask the parent object factory if not found in this instance. +

+
+ + A merged + with overridden properties. + +
+ + + Return a , + even by traversing parent if the parameter is a child definition. + + The name. + The od. + + A merged + with overridden properties. + + + + + Return a , + even by traversing parent if the parameter is a child definition. + + + A merged + with overridden properties. + + + + + Gets the merged local object definition. + + Name of the object. + + Merged RootBeanDefinition, traversing the parent bean definition + if the specified bean corresponds to a child bean definition. + + + + + Determines whether the metadata for the specified object name is eligible for caching. + + Name of the bean. + + true if [is object eligible for metadata caching] [the specified bean name]; otherwise, false. + + + + + Creates the root object definition. + + The template definition to base root definition on. + Root object definition. + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Gets the type for the given FactoryObject. + + The factory object instance to check. + the FactoryObject's object type + + + + Gets the object type for the given FactoryObject definition, as far as possible. + Only called if there is no singleton instance registered for the target object already. + + + The default implementation creates the FactoryObject via GetObject + to call its ObjectType property. Subclasses are encouraged to optimize + this, typically by just instantiating the FactoryObject but not populating it yet, + trying whether its ObjectType property already returns a type. + If no type found, a full FactoryObject creation as performed by this implementation + should be used as fallback. + + Name of the object. + The merged object definition for the object. + The type for the object if determinable, or null otherwise + + + + Predict the eventual object type (of the processed object instance) for the + specified object. + + + Does not need to handle FactoryObjects specifically, since it is only + supposed to operate on the raw object type. + This implementation is simplistic in that it is not able to + handle factory methods and InstantiationAwareBeanPostProcessors. + It only predicts the object type correctly for a standard object. + To be overridden in subclasses, applying more sophisticated type detection. + + Name of the object. + The merged object definition to determine the type for. May be null + The type of the object, or null if not predictable + + + + Get the object for the given object instance, either the object + instance itself or its created object in case of an + . + + The object instance. + + The name that may include the factory dereference prefix (=the requested name). + + + The canonical object name + + the merged object definition + + The singleton instance of the object. + + + + + Obtain an object to expose from the given IFactoryObject. + + The IFactoryObject instance. + Name of the object. + The merged object definition. + The object obtained from the IFactoryObject + If IFactoryObject object creation failed. + + + + Post-process the given object that has been obtained from the FactoryObject. + The resulting object will be exposed for object references. + + The default implementation simply returns the given object + as-is. Subclasses may override this, for example, to apply + post-processors. + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Convenience method to pull an + from this factory. + + + The name of the factory object to be retrieved. If this name is not a valid + name, it will be converted + into one. + + + The associated with the + supplied . + + + + + Is the supplied a factory object dereference? + + + + + Determines whether the type of the given object definition matches the + specified target type. + + Allows for lazy load of the actual object type, provided that the + type match can be determined otherwise. + The default implementation simply delegates to the standard + ResolveObjectType method. Subclasses may override this to use + a differnt strategy. + + Name of the object (for error handling purposes). + The merged object definition to determine the type for. + Type to match against (never null). + + true if object definition matches tye specified target type; otherwise, false. + + if we failed to load the type." + + + + Resolves the type of the object for the specified object definition resolving + an object type name to a Type (if necessary) and storing the resolved Type + in the object definition for further use. + + The merged object definition to dertermine the type for. + Name of the object (for error handling purposes). + + + + + Is the object (definition) with the supplied an + ? + + The name of the object to be checked. + + the object (definition) with the supplied + an ? + + + + + Remove the object identified by the supplied + from this factory's singleton cache. + + + The name of the object that is to be removed from the singleton + cache. + + + If the argument is or + consists wholly of whitespace characters. + + + + + Return the names of objects in the singleton cache that match the given + object type (including subclasses). + + + The class or interface to match, or for all object names. + + +

+ Will not consider s + as the type of their created objects is not known before instantiation. +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of objects in the singleton cache that match the given + object type (including subclasses), or an empty array if none. + +
+ + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical instance name. + Will ask the parent factory if the instance cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical instance name. + Will ask the parent factory if the instance cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines the of the object with the + supplied . + + +

+ More specifically, checks the of object that + would return. + For an , returns the + of object that the + creates. +

+

+ Please note that (prototype) objects created via a factory method or + objects are handled + slightly differently, in that we don't want to needlessly create + instances of such objects just to determine the + of object that they create. +

+
+ The name of the object to query. + + The of the object or + if not determinable. + +
+ + + Determines the of the object defined + by the supplied object . + + +

+ This, the default, implementation returns + to indicate that the type cannot be determined. Subclasses are + encouraged to try to determine the actual return + here, matching their strategy of resolving + factory methods in the + Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject + implementation. +

+
+ + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + +
+ + + Returns the names of the objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The names of the objects in the singleton cache. +
+ + + Returns the number of objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The number of objects in the singleton cache. +
+ + + Destroys the named singleton object. + + +

+ Delegates to + + if a corresponding singleton instance is found. +

+
+ + The name of the singleton object that is to be destroyed. + + +
+ + + Check the supplied merged object definition for any possible + validation errors. + + + The object definition to be checked for validation errors. + + + The name of the object associated with the supplied object definition. + + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + + In the case of object validation errors. + + + + + Parent object factory, for object inheritance support + + + + + Dependency types to ignore on dependency check and autowire, as Set of + Type objects: for example, string. Default is none. + + + + + ObjectPostProcessors to apply in CreateObject + + + + + String Resolver applied to Autowired value injections + + + + + Indicates whether any IInstantiationAwareBeanPostProcessors have been registered + + + + + Indicates whether any IDestructionAwareBeanPostProcessors have been registered + + + + + Set of registered singletons, containing the instance names in registration order + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + Determines whether the local object factory contains a instance of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Is this object a singleton? + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Does this object factory or one of its parent factories contain an object with the given name? + + + This method scans the object factory hierarchy starting with the current factory instance upwards. + Use if you want to explicitely check just this object factory instance. + + . + + + + Return the aliases for the given object name, if defined. + + . + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name, + optionally injecting dependencies. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + whether to inject dependencies or not. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + + Requireses the destruction. + + The instance to check. + The corresponding instance definition. + + Boolean indicating whether destruction is required. + + + + + Checks, if the passed instance is of the required type. + + the name of the object + the actual instance + the type contract the given instance must adhere. + the object instance passed in via (for more fluent usage) + + if is null or not assignable to . + + + + + Creates a singleton instance for the specified object name and definition. + + + The object name (will be used as the key in the singleton cache key). + + The object definition. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The created object instance. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + + + + Destroy all cached singletons in this factory. + + + + + Ignore the given dependency type for autowiring + + . + + + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a String resolver for embedded values such as annotation attributes. + + the String resolver to apply to embedded values + + + + Resolve the given embedded value, e.g. an annotation attribute. + + the value to resolve + the resolved value (may be the original value as-is) + + + + Add a new + that will get applied to objects created by this factory. + + + The + to register. + + . + + + + Given an object name, create an alias. + + . + + + + Register the given custom + for all properties of the given . + + . + + + + Register the given existing object as singleton in the object factory, + under the given object name. + + . + + + + Does this object factory contains a singleton instance with the + supplied ? + + + + + + Tries to find a cached object for the specified name. + + Teh object name to look for. + The cached object if found, otherwise. + + + + Registers the disposable object. + + Name of the instance. + The instance. + Add the given instance to the list of disposable beans in this registry. + Disposable beans usually correspond to registered singletons, + matching the instance name but potentially being a different instance + (for example, a DisposableBean adapter for a singleton that does not + naturally implement ). + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + Name of the object to check. + + true if is object name in use; otherwise, false. + + + + + Gets the singleton lock for a given object name. + + Name of the object. + lock object + + + + Returns, whether this factory treats object names case sensitive or not. + + + + + Gets the of + s + that will be applied to objects created by this factory. + + + + + Gets the set of classes that will be ignored for autowiring. + + +

+ The elements of this are + s. +

+
+
+ + + Returns, whether this object factory instance contains objects. + + + + + Returns, whether this object factory instance contains objects. + + + + + Gets the temporary object that is placed + into the singleton cache during object resolution. + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + The parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Returns the current number of registered + s. + + + The current number of registered + s. + + . + + + + Gets the names of singleton objects registered in this registry. + + The list of names as String array (never null). + + + Only checks already instantiated singletons; does not return names + for singleton instance definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + + + + + + + Gets the number of singleton beans registered in this registry. + + The number of singleton objects. + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + + + + + + + Makes a distinction between sort order and object identity. + This is important when used with , since most + implementations assume Order == Identity + + + + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + The used during the invocation and + searching for of methods. + + + + + The instance for this class. + + + + + Creates a new instance of the + + class. + + +

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

+
+ Flag specifying whether to make this object factory case sensitive or not. +
+ + + Creates a new instance of the + + class. + + +

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

+
+ Flag specifying whether to make this object factory case sensitive or not. + The parent object factory, or if none. +
+ + + Predict the eventual object type (of the processed object instance) for the + specified object. + + Name of the object. + The merged object definition to determine the type for. May be null + + The type of the object, or null if not predictable + + + + + Determines the of the object defined + by the supplied object . + + + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + + + Apply any + s. + + +

+ The returned instance may be a wrapper around the original. +

+
+ + The of the object that is to be + instantiated. + + + The name of the object that is to be instantiated. + + + An instance to use in place of the original instance. + + + In case of errors. + +
+ + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + + + + Apply the given property values, resolving any runtime references + to other objects in this object factory. + + + The object name passed for better exception information. + + + The definition of the named object. + + + The wrapping the target object. + + + The new property values. + + +

+ Must use deep copy, so that we don't permanently modify this property. +

+
+
+ + + Create the value resolver strategy to use for resolving raw property values + + + + + Return an array of object-type property names that are unsatisfied. + + +

+ These are probably unsatisfied references to other objects in the + factory. Does not include simple properties like primitives or + s. +

+
+ + An array of object-type property names that are unsatisfied. + + + The definition of the named object. + + + The wrapping the target object. + +
+ + + Destroy all cached singletons in this factory. + + +

+ To be called on shutdown of a factory. +

+
+
+ + + Populate the object instance in the given + with the property values from the + object definition. + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Wires up any exposed events in the object instance in the given + with any event handler + values from the . + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Fills in any missing property values with references to + other objects in this factory if autowire is set to + . + + + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + + + + + Defines "autowire by type" (object properties by type) behavior. + + +

+ This is like PicoContainer default, in which there must be exactly one object + of the property type in the object factory. This makes object factories simple + to configure for small namespaces, but doesn't work as well as standard Spring + behavior for bigger applications. +

+
+ + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + +
+ + + Ignore the given dependency type for autowiring + + + This will typically be used by application contexts to register + dependencies that are resolved in other ways, like IOjbectFactory through + IObjectFactoryAware or IApplicationContext through IApplicationContextAware. + By default, IObjectFactoryAware and IObjectName interfaces are ignored. + For further types to ignore, invoke this method for each type. + + . + + + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Add the created, but yet unpopulated singleton to the singleton cache + to be able to resolve circular references + + the name of the object to add to the cache. + the definition used to create and populated the object. + the raw object instance. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Remove the specified singleton from the singleton cache that has + been added before by a call to + + the name of the object to remove from the cache. + the definition used to create and populated the object. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Creates an instance from the passed in + using constructor + + The name of the object to create - used for error messages. + The describing the object to be created. + optional arguments to pass to the constructor + An wrapping the already instantiated object + + + + Instantiates the given object using its default constructor + + Name of the object. + The definition. + IObjectWrapper for the new instance + + + + Determines candidate constructors to use for the given object, checking all registered + + + Raw type of the object. + Name of the object. + the candidate constructors, or null if none specified + In case of errors + + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + "autowire constructor" (with constructor arguments by type) behaviour. + + The name of the object to autowire by type. + The object definition to update through autowiring. + The chosen candidate constructors. + The argument values passed in programmatically via the GetObject method, + or null if none (-> use constructor argument values from object definition) + + An for the new instance. + + + + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: in this mode, a Spring.NET + object factory is able to host components that expect constructor-based + dependency resolution. + + + + + + Perform a dependency check that all properties exposed have been set, if desired. + + +

+ Dependency checks can be objects (collaborating objects), simple (primitives + and ), or all (both). +

+
+ + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + The property values to be checked. + + + If all of the checked dependencies were not satisfied. + +
+ + + Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding + ignored dependency types. + + The object wrapper the object was created with. + The filtered PropertyInfos + + + + Determine whether the given bean property is excluded from dependency checks. + This implementation excludes properties whose type matches an ignored dependency type + or which are defined by an ignored dependency interface. + + + + the of the object property + whether the object property is excluded + + + + Give an object a chance to react now all its properties are set, + and a chance to know about its owning object factory (this object). + + +

+ This means checking whether the object implements + and / or + , and invoking the + necessary callback(s) if it does. +

+

+ Custom init methods are resolved in a case-insensitive manner. +

+
+ + The new object instance we may need to initialise. + + + The name the object has in the factory. Used for logging output. + + + The definition of the target object instance. + +
+ + + Invoke the specified custom destroy method on the given object. + + +

+ This implementation invokes a no-arg method if found, else checking + for a method with a single boolean argument (passing in "true", + assuming a "force" parameter), else logging an error. +

+

+ Can be overridden in subclasses for custom resolution of destroy + methods with arguments. +

+

+ Custom destroy methods are resolved in a case-insensitive manner. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself. + Should not throw any exceptions. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Destroys all of the objects registered as dependant on the + object (definition) identified by the supplied . + + + The name of the root object (definition) that is itself being destroyed. + + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + Find object instances that match the required . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The of the objects to look up. + + + An of object names and object + instances that match the required , or + if none are found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + Called by DestroyObject, to be able to destroy depending objects first. + + + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Configures object instance by injecting dependencies, satisfying Spring lifecycle + interfaces and applying object post-processors. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + A wrapped object instance that is to be so configured. + + + + + + Applies the PostProcessAfterInitialization callback of all + registered IObjectPostProcessors, giving them a chance to post-process + the object obtained from IFactoryObjects (for example, to auto-proxy them) + + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + If the supplied is not one of the + or + + values. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Cache of filtered PropertyInfos: object Type -> PropertyInfo array + + + + + Dependency interfaces to ignore on dependency check and autowire, as Set of + Class objects. By default, only the IObjectFactoryAware and IObjectNameAware + interfaces are ignored. + + + + + The + implementation to be used to instantiate managed objects. + + + + + An + implementation that provides some convenience support for + derived classes. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Permits the (re)implementation of an arbitrary method on a Spring.NET + IoC container managed object. + + +

+ Encapsulates the notion of the Method-Injection form of Dependency + Injection. +

+

+ Methods that are dependency injected with implementations of this + interface may be (but need not be) , in which + case the container will create a concrete subclass of the + class prior to instantiation. +

+

+ Do not use this mechanism as a means of AOP. See the reference + manual for examples of appropriate usages of this interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Reimplement the supplied . + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the (re)implementation of the method call. + + + + + Creates a new instance of the + + class. + + +

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

+
+ + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + +
+ + + Is ; derived classes must supply an implementation. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + The result of the object lookup. + + + + Helper method for subclasses to retrieve the appropriate + for the + supplied . + + + The to use to retrieve + the appropriate + . + + + The appropriate + . + + + + + Helper method for subclasses to lookup an object from an enclosing + IoC container. + + + The name of the object that is to be looked up. + + + The named object. + + + + + Abstract base class for object definition readers. + + +

+ Provides common properties like the object registry to work on. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Simple interface for object definition readers. + + Juergen Hoeller + Rick Evans + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The against which any class names + will be resolved into instances. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + Gets the resource loader to use for resource locations. + + There is also a method + available for loading object definitions from a resource location. This is + a convenience to avoid explicit ResourceLoader handling. + The resource loader. + + + + The instance for this class (and derived classes). + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + +

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

+
+
+ + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + The against which any class names + will be resolved into instances. + + +

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

+
+
+ + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + + The against which any class names + will be resolved into instances. + + + + + Gets or sets the resource loader to use for resource locations. + + The resource loader. + + + + Qualifier for resolving autowire candidates. A bean definition that + includes one or more such qualifiers enables fine-grained matching + against annotations on a field or parameter to be autowired. + + + + + Construct a qualifier to match against an annotation of the + given type. + + type the annotation type + + + + Construct a qualifier to match against an annotation of the + given type name. +

The type name may match the fully-qualified class name of + the annotation or the short class name (without the package).

+
+ the name of the annotation type +
+ + + Construct a qualifier to match against an annotation of the + given type whose value attribute also matches + the specified value. + + the annotation type + the annotation value to match + + + + Construct a qualifier to match against an annotation of the + given type name whose value attribute also matches + the specified value. +

The type name may match the fully-qualified class name of + the annotation or the short class name (without the package).

+
+ the name of the annotation type + the annotation value to match +
+ + + Retrieve the type name. This value will be the same as the + type name provided to the constructor or the fully-qualified + class name if a Class instance was provided to the constructor. + + + + + Utility class that contains various methods useful for the implementation of + autowire-capable object factories. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the AutowireUtils class. + + +

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

+
+
+ + + Gets those s + that are applicable for autowiring the supplied . + + + The + (definition) that is being autowired by constructor. + + + The absolute minimum number of arguments that any returned constructor + must have. If this parameter is equal to zero (0), then all constructors + are valid (regardless of their argument count), including any default + constructor. + + + Those s + that are applicable for autowiring the supplied . + + + + + Determine a weight that represents the class hierarchy difference between types and + arguments. + + +

+ A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase + the result - all direct matches means weight zero (0). A match between the argument type + and a MyInteger instance argument would increase the weight by + 1, due to the superclass () being one (1) steps up in the + class hierarchy being the last one that still matches the required type. +

+

+ Therefore, with an argument of type , a + constructor taking a argument would be + preferred to a constructor taking an argument + which would be preferred to a constructor taking an + argument which would in turn be preferred + to a constructor taking an argument. +

+

+ All argument weights get accumulated. +

+
+ + The argument s to match. + + The arguments to match. + The accumulated weight for all arguments. +
+ + + Algorithm that judges the match between the declared parameter types of a candidate method + and a specific list of arguments that this method is supposed to be invoked with. + + + Determines a weight that represents the class hierarchy difference between types and + arguments. The following a an example based on the Java class hierarchy for Integer. + A direct match, i.e. type Integer -> arg of class Integer, does not increase + the result - all direct matches means weight 0. A match between type Object and arg of + class Integer would increase the weight by 2, due to the superclass 2 steps up in the + hierarchy (i.e. Object) being the last one that still matches the required type Object. + Type Number and class Integer would increase the weight by 1 accordingly, due to the + superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. + Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a + constructor (Number) which would in turn be preferred to a constructor (Object). + All argument weights get accumulated. + + The param types. + The args. + + + + + Determines whether the given object property is excluded from dependency checks. + + The PropertyInfo of the object property. + + true if is excluded from dependency check; otherwise, false. + + + + + Sorts the supplied , preferring + public constructors and "greedy" ones (that have lots of arguments). + + +

+ The result will contain public constructors first, with a decreasing number + of arguments, then non-public constructors, again with a decreasing number + of arguments. +

+
+ + The array to be sorted. + +
+ + + Determines whether the setter property is defined in any of the given interfaces. + + The PropertyInfo of the object property + The ISet of interfaces. + + true if setter property is defined in interface; otherwise, false. + + + + + Creates the autowire candidate resolver. + + A SimpleAutowireCandidateResolver + + + + Returns the list of that are not satisfied by . + + the filtered list. Is never null + + + + Object definition for definitions that inherit settings from their + parent (object definition). + + +

+ Will use the + of the parent object definition if none is specified, but can also + override it. In the latter case, the child's + + must be compatible with the parent, i.e. accept the parent's property values + and constructor argument values (if any). +

+

+ A will + inherit all of the , + , and + from it's parent + object definition, with the option to add new values. If the + , + , + and / or + + properties are specified, they will override the corresponding parent settings. +

+

+ The remaining settings will always be taken from the child definition: + , + , + , + , + and + +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + + class. + + + The name of the parent object. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The class of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The of the object to + instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Validate this object definition. + + +

+ A common cause of validation failures is a missing value for the + + property; by + their very nature require that the + + be set. +

+
+ + In the case of a validation failure. + +
+ + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Helper class for resolving constructors and factory methods. + Performs constructor resolution through argument matching. + + + Operates on a and an . + Used by . + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for the given factory + and instantiation strategy. + + The object factory to work with. + The object factory as IAutowireCapableObjectFactory. + The instantiation strategy for creating objects. + the resolver to resolve property value placeholders if any + + + + "autowire constructor" (with constructor arguments by type) behavior. + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: In this mode, a Spring + object factory is able to host components that expect constructor-based + dependency resolution. + + Name of the object. + The merged object definition for the object. + The chosen chosen candidate constructors (or null if none). + The explicit argument values passed in programmatically via the getBean method, + or null if none (-> use constructor argument values from object definition) + An IObjectWrapper for the new instance + + + + Gets the constructor instantiation info given the object definition. + + Name of the object. + The RootObjectDefinition + The explicitly chosen ctors. + The explicit chose ctor args. + A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or + one based on type matching. + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + Create an array of arguments to invoke a constructor or static factory method, + given the resolved constructor arguments values. + + When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain + information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using + exceptions for flow control as in the original implementation. + + + + Resolves the + of the supplied . + + The name of the object that is being resolved by this factory. + The rod. + The wrapper. + The cargs. + Where the resolved constructor arguments will be placed. + + The minimum number of arguments that any constructor for the supplied + must have. + + +

+ 'Resolve' can be taken to mean that all of the s + constructor arguments is resolved into a concrete object that can be plugged + into one of the s constructors. Runtime object + references to other objects in this (or a parent) factory are resolved, + type conversion is performed, etc. +

+

+ These resolved values are plugged into the supplied + object, because we wouldn't want to touch + the s constructor arguments in case it (or any of + its constructor arguments) is a prototype object definition. +

+

+ This method is also used for handling invocations of static factory methods. +

+
+
+ + + Returns an array of all of those + methods exposed on the + that match the supplied criteria. + + + Methods that have this name (can be in the form of a regular expression). + + + Methods that have exactly this many arguments. + + + Methods that are static / instance. + + + The on which the methods (if any) are to be found. + + + An array of all of those + methods exposed on the + that match the supplied criteria. + + + + + Concrete implementation of the + and + + interfaces. + + +

+ This class is a full-fledged object factory based on object definitions + that is usable straight out of the box. +

+

+ Can be used as an object factory in and of itself, or as a superclass + for custom object factory implementations. Note that readers for + specific object definition formats are typically implemented separately + rather than as object factory subclasses. +

+

+ For an alternative implementation of the + interface, + have a look at the + + class, which manages existing object instances rather than creating new + ones based on object definitions. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + + + + Creates a new instance of the + class. + + The parent object factory. + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory. + + + + Find object instances that match the . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The type of the objects to look up. + + + An of object names and object + instances that match the , or + if none is found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + + +

+ Called by the + + so that dependant objects are able to be disposed of first. +

+
+ + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + +
+ + + Check whether the specified object matches the supplied . + + The name of the object to check. + + The to check for. + + + if the object matches the supplied , + or if the supplied is . + + + + + The instance for this class. + + + + + The mapping of object definition objects, keyed by object name. + + + + + List of object definition names, in registration order. + + + + + Resolver to use for checking if an object definition is an autowire candidate + + + + + IDictionary from dependency type to corresponding autowired value + + + + + Check if this registry contains a object definition with the given + name. + + + The name of the object to look for. + + + if this object factory contains an object + definition with the given name. + + + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + + If one of the singleton objects could not be created. + + + + + + Register a special dependency type with corresponding autowired value. + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the IObjectFactory interface itself. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. Respects any Parent-Child hierarchy the factory is participating in. + + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Check whether the specified bean would need to be eagerly initialized + in order to determine its type. + + a factory-bean reference that the bean definition defines a factory method for + whether eager initialization is necessary + + + + Check whether the given bean is defined as a . + + the name of the object + the corresponding object definition + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Determine the primary autowire candidate in the given set of beans. + + a Map of candidate names and candidate instances + that match the required type + the target dependency to match against + the name of the primary candidate, or null if none found + + + + Return whether the object definition for the given object name has been + marked as a primary object. + + the name of the bean + the corresponding bean instance + whether the given bean qualifies as primary + + + + Determine whether the given candidate name matches the bean name or the aliases + stored in this bean definition. + + + + + Raises the no such object definition exception for an unresolvable dependency + + The type. + The dependency description. + The descriptor. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + Determine whether the specified object definition qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + + Name of the object definition to check. + The merged object definiton to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + + + + Should object definitions registered under the same name as an + existing object definition be allowed? + + +

+ If , then the new object definition will + replace (override) the existing object definition. If + , an exception will be thrown when + an attempt is made to register an object definition under the same + name as an already existing object definition. +

+

+ The default is . +

+
+ + is the registration of an object definition + under the same name as an existing object definition is allowed. + +
+ + + Get or set custom autowire candidate resolver for this IObjectFactory to use + when deciding whether a bean definition should be considered as a + candidate for autowiring. Never null + + + + + Return the number of objects defined in this registry. + + + The number of objects defined in this registry. + + + + + + Default implementation of the + + interface. + + +

+ Does not support per + loading. +

+
+ Aleksandar Seovic +
+ + + Central interface for factories that can create + + instances. + + +

+ Allows for replaceable object definition factories using the Strategy + pattern. +

+
+ Aleksandar Seovic +
+ + + Factory style method for getting concrete + + instances. + + + The FullName of the of the defined object. + + The name of the parent object definition (if any). + + The against which any class names + will be resolved into instances. It can be null to register the + object class just by name. + + + An + + instance. + + + + + Factory style method for getting concrete + + instances. + + /// If no parent is specified, a RootObjectDefinition is created, otherwise a + ChildObjectDefinition. + The of the defined object. + The name of the parent object definition (if any). + The against which any class names + will be resolved into instances. + + An + + instance. + + + + + Default implementation of the interface, deleagting to + 's GenerateObjectName. + + Note that this implementation is only able to handle + subclasses such as + and + + Juergen Hoeller + Mark Pollack (.NET) + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + Convenience implementation of the interface that + delegates to an arbitrary object + method to perform the object construction. + + + + Because this implementation requires a delegate + passed to its ctor, its only possible to configure this object and register + it with the via code rather than via XML. + + + + + + + Initializes a new instance of the class. + + The builder delegate. + if set to true [is singleton]. + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + If this method is being called in the context of an enclosing IoC container and + returns , the IoC container will consider this factory + object as not being fully initialized and throw a corresponding (and most + probably fatal) exception. + + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + 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? + + + + + An + implementation that delegates to an + that is + obtained as the result of a lookup in an associated IoC container. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by delegating to + another + looked up in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the delegated call to the looked up + . + + + + + The various modes of dependency checking. + + Rick Evans (.NET) + + + + DO not do any dependency checking. + + + + + Check object references. + + + + + Just check primitive (string, int, etc) values. + + + + + Check everything. + + + + + Create a new DisposableBeanAdapter for the given bean. + + The bean instance (never null). + Name of the bean. + The merged bean definition. + the List of BeanPostProcessors (potentially IDestructionAwareBeanPostProcessor), if any. + + + + Search for all s in the List. + + The List to search. + the filtered List of IDestructionAwareObjectPostProcessors. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Invokes the custom destroy method. + + The custom destroy method. + Invoke the specified custom destroy method on the given bean. + This implementation invokes a no-arg method if found, else checking + for a method with a single boolean argument (passing in "true", + assuming a "force" parameter), else logging an error. + + + + Responsible for creating instances corresponding to a + . + + Rod Johnson + Rick Evans (.NET) + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Represents an override of a method that looks up an object in the same IoC context. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Represents the override of a method on a managed object by the IoC container. + + +

+ Note that the override mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + +

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

+
+ + The name of the method that is to be overridden. + + + If the supplied is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + +

+ By 'match' one means does this particular + + instance apply to the supplied ? +

+

+ This allows for argument list checking as well as method name checking. +

+
+ The method to be checked. + + if this override matches the supplied + . + +
+ + + The name of the method that is to be overridden. + + + + + Is the method that is ot be injected + () + to be considered as overloaded? + + +

+ If (the default), then argument type matching + will be performed (because one would not want to override the wrong + method). +

+

+ Setting the value of this property to can be used + to optimize runtime performance (ever so slightly). +

+
+
+ + + Creates a new instance of the + class. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ + The name of the method that is to be overridden. + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + If either of the supplied arguments is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + + + An + implementation that simply returns the result of a lookup in an + associated IoC container. + + +

+ This class is Spring.NET's implementation of Dependency Lookup via + Method Injection. +

+

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by returning the + result of an object lookup in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the object lookup. + + + + + An + implementation that supports method injection. + + +

+ Classes that want to take advantage of method injection must meet some + stringent criteria. Every method that is to be method injected + must be defined as either or + . An + will be thrown if these criteria are not met. +

+
+ Rick Evans +
+ + + Simple object instantiation strategy for use in + implementations. + + +

+ Does not support method injection, although it provides hooks for subclasses + to override to add method injection support, for example by overriding methods. +

+
+ Rod Johnson + Rick Evans (.NET) + +
+ + + The shared instance for this class (and derived classes). + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type does not have a zero-arg constructor. + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use a no-arg constructor. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be a + or zero length string if we're autowiring an object that + doesn't belong to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + +
+ + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use the supplied + and attendant . +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + +
+ + + The name of the dynamic assembly that holds dynamically created code + + + + + A cache of generated instances, keyed on + the object name for which the was generated. + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ This method dynamically generates a subclass that supports method + injection for the supplied . It then + instantiates an new instance of said type using the constructor + identified by the supplied , + passing the supplied to said + constructor. It then manually injects (generic) method replacement + and method lookup instances (of + ) into + the new instance: those methods that are 'method-injected' will + then delegate to the approriate + + instance to effect the actual method injection. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The parameter s to use to find the + appropriate constructor to invoke. + + + The aguments that are to be passed to the appropriate constructor + when the object is being instantiated. + + + A new instance of the defined by the + supplied . + +
+ + + A factory that generates subclasses of those + classes that have been configured for the Method-Injection form of + Dependency Injection. + + +

+ This class is designed as for one-shot usage; i.e. it must + be used to generate exactly one method injected subclass and + then discarded (it maintains state in instance fields). +

+
+
+ + + The name of the generated + property (for method replacement). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + The name of the generated + property (for method lookup). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + Creates a new instance of the + class. + + + The in which + the generated is to be defined. + + + The object definition that is the target of the method injection. + + + If either of the supplied arguments is . + + + + + Builds a suitable for Method-Injection. + + + A suitable for Method-Injection. + + + + + Defines overrides for those methods that are configured with an appropriate + . + + + The overarching that is defining + the generated . + + + + + Override the supplied with the logic + encapsulated by the + + defined by the supplied . + + + The builder for the subclass that is being generated. + + + The method on the superclass that is to be overridden. + + + The field defining the + + that the overridden method will delegate to to do the 'actual' + method injection logic. + + + + + Generates the MSIL for actually returning a return value if the + supplied is not + . + + + The definition of the return value; if , it + means that no return value is to required (a void + return type). + + + The to emit + the MSIL to. + + + + + Generates the MSIL for a return value if the supplied + returns a value. + + + The method to be checked. + + + The to emit + the MSIL to. + + + The return value, or if the method does not + return a value (has a void return type). + + + + + Pushes (sets up) the arguments for a call to the + + method of an appropriate + . + + + The parameters to the original method (will be bundled + up into a generic object[] and passed as the third + argument to the + + invocation. + + + The to emit + the MSIL to. + + + + + Simply generates the IL for a write only property for the + . + + + The in which the property is defined. + + + The name of the (to be) generated property. + + + The (instance) field that the property is to 'set'. + + + + + A collection (with set semantics) of method overrides, determining which, if any, + methods on a managed object the Spring.NET IoC container will override at runtime. + + Rod Johnson + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ Deep copy constructoe. +

+
+ + The instance supplying initial overrides for this new instance. + +
+ + + Copy all given method overrides into this object. + + + The overrides to be copied into this object. + + + + + Adds the supplied to the overrides contained + within this instance. + + + The to be + added. + + + + + Adds the supplied to the overloaded method names + contained within this instance. + + + The overloaded method name to be added. + + + + + Returns true if the supplied is present within + the overloaded method names contained within this instance. + + + The overloaded method name to be checked. + + + True if the supplied is present within + the overloaded method names contained within this instance. + + + + + Return the override for the given method, if any. + + + The method to check for overrides for. + + + the override for the given method, if any. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + The collection of method overrides. + + + + + Returns true if this instance contains no overrides. + + + + + Programmatic means of constructing a using the builder pattern. Intended primarily + for use when implementing custom namespace parsers. + + Set methods are used instead of properties, so that chaining of methods can be used to create + 'one-liner'definitions that set multiple properties at one. + Rod Johnson + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class, private + to force use of factory methods. + + + + + Creates a new used to construct a . + + + + + Creates a new used to construct a . + + the of the object that the definition is being created for + + + + Creates a new used to construct a . + + the name of the of the object that the definition is being created for + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + The type name of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Name of the object type. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a child object definition.. + + The object definition factory. + Name of the parent object. + + + + + Adds the property value under the given name. + + The name. + The value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the specified object name under the property specified. + + The name. + Name of the object. + The current ObjectDefinitionBuilder. + + + + Adds an index constructor arg value. The current index is tracked internally and all addtions are + at the present point + + The constructor arg value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the named object as a constructor argument. + + Name of the object. + + + + + Sets the name of the factory method to use for this definition. + + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the factory object to use for this definition. + + The factory object. + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets whether or not this definition describes a singleton object. + + if set to true [singleton]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects or not this definition is abstract. + + if set to true [flag]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects for this definition should be lazily initialized or not. + + if set to true [lazy]. + The current ObjectDefinitionBuilder. + + + + Sets the autowire mode for this definition. + + The autowire mode. + The current ObjectDefinitionBuilder. + + + + Sets the autowire candidate value for this definition. + + The autowire candidate value + + + + + Sets the primary value for this definition. + + If object is primary + + + + + Sets the dependency check mode for this definition. + + The dependency check. + The current ObjectDefinitionBuilder. + + + + Sets the name of the destroy method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the init method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the resource description for this definition. + + The resource description. + The current ObjectDefinitionBuilder. + + + + Adds the specified object name to the list of objects that this definition depends on. + + Name of the object. + The current ObjectDefinitionBuilder. + + + + Gets the current object definition in its raw (unvalidated) form. + + The raw object definition. + + + + Validate and gets the object definition. + + The object definition. + + + + Utility methods that are useful for + + implementations. + + Juergen Hoeller + Rick Evans (.NET) + + + + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Registers the supplied with the + supplied . + + +

+ This is a convenience method that registers the + + of the supplied under the + + property value of said . If the + supplied has any + , + then those aliases will also be registered with the supplied + . +

+
+ + The object definition holder containing the + that + is to be registered. + + + The registry that the supplied + is to be registered with. + + + If either of the supplied arguments is . + + + If the could not be registered + with the . + +
+ + + Generates an object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied . + + The + that requires a generated name. + The + + that the supplied is to be + registered with (needed so that the uniqueness of any generated + name can be guaranteed). + if set to true if the given object + definition will be registed as an inner object or as a top level objener objects + verses top level objects. + + An object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied and + never . + + + If either of the or + arguments is . + + + If a unique name cannot be generated. + + + + + Generates the name of the object for a top-level object definition unique within the given object factory. + + The object definition to generate an object name for. + The registry to check for existing names. + The generated object name + if no unique name can be generated for the given + object definition + + + + Factory method for getting concrete + instances. + + + The name of the event handler method. This may be straight text, a regular + expression, , or empty. + + + The name of the event being wired. This too may be straight text, a regular + expression, , or empty. + + + A concrete + instance. + + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Thrown when the validation of an object definition failed. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + The detail message. + + + + Creates a new instance of the + + class. + + + The detail message. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Helper class for use in object factory implementations, + resolving values contained in object definition objects + into the actual values applied to the target object instance. + + + Used by . + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The object factory. + + + + Given a property value, return a value, resolving any references to other + objects in the factory if necessary. + + +

+ The value could be : + + +

+ An , + which leads to the creation of a corresponding new object instance. + Singleton flags and names of such "inner objects" are always ignored: inner objects + are anonymous prototypes. +

+ + +

+ A , which must + be resolved. +

+
+ +

+ An . This is a + special placeholder collection that may contain + s or + collections that will need to be resolved. +

+
+ +

+ An ordinary object or , in which case it's left alone. +

+
+ +

+
+ + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + +
+ + + TODO + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Resolve the target type of the passed . + + The who's target type is to be resolved + The resolved target type, if any. otherwise. + + + + Resolves an inner object definition. + + + The name of the object that surrounds this inner object definition. + + + The name of the inner object definition... note: this is a synthetic + name assigned by the factory (since it makes no sense for inner object + definitions to have names). + + + The name of the property the value of which is being resolved. + + + The definition of the inner object that is to be resolved. + + + if the owner of the property is a singleton. + + + The resolved object as defined by the inner object definition. + + + + + Checks the given bean name whether it is unique. If not already unique, + a counter is added, increasing the counter until the name is unique. + + Original Name of the inner object. + The Adapted name for the inner object + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + The possible object scope values. + + Aleksandar Seovic + + + + + + + + + Application scope. + + + + + Session scope. + + + + + Request scope. + + + + + + + + + + Default scope (currently + ). + + + + + + Object definition reader for a simple properties format. + + + Provides object definition registration methods for + and + instances. Typically applied to a + . + + Rod Johnson + Juergen Hoeller + Simon White (.NET) + + + + Value of a T/F attribute that represents true. + Anything else represents false. Case seNsItive. + + + + + Separator between object name and property name. + + + + + Prefix for the class property of a root object definition. + + + + + Special string added to distinguish if the object will be + a singleton. + + +

+ Default is true. +

+
+ +

+ owner.(singleton)=true +

+
+
+ + + Special string added to distinguish if the object will be + lazily initialised. + + +

+ Default is false. +

+
+ +

+ owner.(lazy-init)=true +

+
+
+ + + Reserved "property" to indicate the parent of a child object definition. + + + + + Property suffix for references to other objects in the current + : e.g. + owner.dog(ref)=fido. + + +

+ Whether this is a reference to a singleton or a prototype + will depend on the definition of the target object. +

+
+
+ + + Prefix before values referencing other objects. + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the specified properties file. + + + The resource descriptor for the properties file. + + + The match or filter for object definition names, e.g. 'objects.' + + in case of loading or parsing errors + the number of object definitions found + + + + Register object definitions contained in a + , using all property keys (i.e. + not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Similar syntax as for an . + This method is useful to enable standard .NET internationalization support. +

+
+ + The containing object definitions. + + + The match or filter for object definition names, e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions registered. +
+ + + Register object definitions contained in an + , using all property keys + (i.e. not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Registers object definitions contained in an + using all property keys ( i.e. not filtering by prefix ) + + The containing + object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Get all property values, given a prefix (which will be stripped) + and add the object they define to the factory with the given name + + The name of the object to define. + + The containing string pairs. + + The prefix of each entry, which will be stripped. + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + + + + Name of default parent object + + + + + Gets or sets object definition factory to use. + + + + + A implementation to use that checks + the object definitions only (no attributes) + + Mark Fisher + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Determine whether a default value is suggested for the given dependency. + + The descriptor for the target method parameter or field + The value suggested (typically an expression String), + or null if none found + + + + + Static factory that permits the registration of existing singleton instances. + + +

+ Does not have support for prototype objects, aliases, and post startup object + configuration. +

+

+ Serves as a simple example implementation of the + interface, that manages existing object instances as opposed to creating new ones + based on object definitions. +

+

+ The + method is not supported by this class; this class deals exclusively with + existing singleton instances, thus the methods mentioned previously make little sense in this context. +

+
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Map from object name to object instance. + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + This method is not supported by . + + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + is not currently supported. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object is not of the required type. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + True if an object with the given name is defined. + + + + Is this object a singleton? + + +

+ That is, will + or + always return the same object? +

+
+ The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Determine the type of the object with the given name. + + +

+ More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. +

+
+ The name of the object to query. + + The of the object or if + not determinable. + +
+ + + Determines whether the object with the given name matches the specified type. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Not supported. + + The name of the object. + + The registered + . + + + Always, as object definitions are not supported by this + implementation. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of all objects defined in this factory, if includeAncestors is true + includes all parent factories. + + to include parent factories in result + + The names of all objects defined in this factory, if includeAncestors is true includes all + objects defined in parent factories, or an empty array if none are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Will not consider s, + as the type of their created objects is not known before instantiation. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Since this implementation of the + + interface does not support the notion of ptototype objects, the + parameter is ignored. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). Ignored. + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Tests whether this object factory contains an object definition for the + specified object name. + + The object name to query. + + True if an object defintion is contained within this object factory. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The type of the object to return. + The instance of the object. + + If there's no such object definition. + + + If there is more than a single object of the requested type defined in the factory. + + + If the object could not be created. + + + + + Add a new singleton object. + + + The name to be associated with the object name. + + The singleton object. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + This feature is not currently supported. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Defines a method to release allocated unmanaged resources. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + + + + Abstract implementation providing + a number of convenience methods and a + template method + that subclasses must override to provide the actual parsing logic. + + + Use this implementation when you want + to parse some arbitrarily complex XML into one or more + ObjectDefinitions. If you just want to parse some + XML into a single IObjectDefinition, you may wish to consider + the simpler convenience extensions of this class, namely + and + + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Constant for the ID 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. +

+
+
+ + + Resolves the ID for the supplied . + + + When using generation, a name is generated automatically. + Otherwise, the ID is extracted from the "id" attribute, potentially with a + fallback to a generated id. + + The element that the object definition has been built from. + The object definition to be registered. + The the object encapsulating the current state of the parsing process; + provides access to a + the resolved id + + if no unique name could be generated for the given object definition + + + + + Registers the supplied with the supplied + . + + Subclasses can override this method to control whether or not the supplied + is actually even registered, or to + register even more objects. + + The default implementation registers the supplied + with the supplied only if the IsNested + parameter is false, because one typically does not want inner objects + to be registered as top level objects. + + + + The object definition to be registered. + The registry that the bean is to be registered with. + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + Gets a value indicating whether an ID should be generated instead of read + from the passed in XmlElement. + + Note that this flag is about always generating an ID; the parser + won't even check for an "id" attribute in this case. + + true if should generate id; otherwise, false. + + + + Gets a value indicating whether an ID should be generated instead if the + passed in XmlElement does not specify an "id" attribute explicitly. + + Disabled by default; subclasses can override this to enable ID generation + as fallback: The parser will first check for an "id" attribute in this case, + only falling back to a generated ID if no value was specified. + + true if should generate id if no value was specified; otherwise, false. + + + + + Convenient base class for when there exists a one-to-one mapping + between attribute names on the element that is to be parsed and + the property names on the Type being configured. + + + + + Mark Pollack + + + + Base Type for those implementations that + need to parse and define just a single IObjectDefinition. + + + Extend this parser Type when you want to create a single object definition + from an arbitrarily complex XML element. You may wish to consider extending + the when you want to create a + single Object definition from a relatively simple custom XML element. + The resulting ObjectDefinition will be automatically registered + with the ObjectDefinitionRegistry. Your job simply is to parse the + custom XML element into a single ObjectDefinition + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + + Determine the name for the parent of the currently parsed object, + in case of the current object being defined as a child object. + The default implementation returns null + indicating a root object definition. + + + the name of the parent object for the currently parsed object. + + + + Gets the type of the object corresponding to the supplied XmlElement. + + Note that, for application classes, it is generally preferable to override + GetObjectTypeName instad, in order to avoid a direct + dependence on the object implementation class. The ObjectDefinitionParser + and its IXmlObjectDefinitionParser (namespace parser) can be used within an + IDE add-in then, even if the application classses are not available in the add-ins + AppDomain. + + The element. + The Type of the class that is being defined via parsing the supplied + Element. + + + + Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. + + The element. + The type name of the object that is being defined via parsing the supplied + XmlElement. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation delegates to the DoParse version without + ParameterContext argument. + The element. + The parser context. + The builder used to define the IObjectDefinition. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation does nothing. + The element. + The builder used to define the IObjectDefinition. + + + + Default implementation of the interface. + Resolves namespace URIs to implementation types based on mappings. + + Erich Eichinger + + + + + + Used by to locate + implementations for a particular namespace URI. + + TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now + Erich Eichinger + + + + + + + Lookup a for the given namespace URI. + + the namespace URI + the located namespace handler or null + + + + Resolve the namespace URI and return the corresponding + implementation. + + the namespace URI to get the matching parser for. + the matching parser or null + + + + XML resource reader. + + +

+ Navigates through an XML resource and invokes parsers registered + with the . +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + SPI for parsing an XML document that contains Spring object definitions. + Used by for actually parsing a DOM + document. + + Instantiated per document to parse: Implementations can hold state in + instance variables during the execution of the RegisterObjectDefinitions + method, for example global settings that are defined for all object definitions + in the document. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the DefaultObjectDefinitionDocumentReader class. + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + Parses object definitions starting at the given + using the passed . + + The root element to start parsing from. + The instance to use. + + in case an error happens during parsing and registering object definitions + + + + + Process an alias element. + + + + + Process the object element + + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + + If the resource could not be imported. + + + + + Parses the given alias element, registering the alias with the registry. + + The alias element. + The registry. + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The helper. + + + + + + Allow the XML to be extensible by processing any custom element types last, + after we finished processing the objct definitions. This method is a natural + extension point for any other custom post-processing of the XML. + + The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. + + + The root. + + + + Allow the XML to be extensible by processing any custom element types first, + before we start to process the object definitions. + + This method is a natural + extension point for any other custom pre-processing of the XML. +

The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. +

+
+ The root element of the XML document. +
+ + + Creates an instance for the given and element. + + the to create the + the root to start reading from + a new instance + + + + Gets the reader context. + + The reader context. + + + + Simple class that holds the defaults specified at the <objects> + level in a standard Spring XML object definition document: + default-lazy-init, default-autowire, etc. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Gets or sets the autowire setting for the document that's currently parsed. + + The autowire. + + + + Gets or sets the dependency-check setting for the document that's currently parsed + + The dependency check. + + + + Gets or sets the lazy-init flag for the document that's currently parsed. + + The lazy init. + + + + Gets or sets the merge setting for the document that's currently parsed. + + The merge. + + + + Get or sets the init method for the document that's currently parsed. + + The init method + + + + Gets or sets the destroy method for the document that's currently parsed. + + The destroy methood + + + + Gets or sets autowire candidates for the document that's currently parsed + + The Autowire Candidates + + + + Attribute that should be used to specify the default namespace + and schema location for a custom namespace parser. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Gets or sets the default namespace for the configuration parser. + + + The default namespace for the configuration parser. + + + + + Gets or sets the default schema location for the configuration parser. + + + The default schema location for the configuration parser. + + + If the property is set, the will always resolve to an assembly-resource + and the set will be interpreted relative to this assembly. + + + + + Gets or sets a type from the assembly containing the schema + + + If this property is set, the will always resolve to an assembly-resource + and the will be interpreted relative to this assembly. + + + + + Provides a resolution mechanism for configuration parsers. + + +

+ The uses this registry + class to find the parser handling a specific namespace. +

+
+ Aleksandar Seovic +
+ + + Name of the .Net config section that contains definitions + for custom config parsers. + + + + + Creates a new instance of the NamespaceParserRegistry class. + + + + + Reset the list of registered parsers to "factory"-setting + + use for unit tests only + + + + Registers the type for wellknown namespaces + + true if the parser could be registered, false otherwise + + + + Constructs a "assembly://..." qualified schemaLocation url using the given type + to obtain the assembly name. + + + + + Returns a parser for the given namespace. + + + The namespace for which to lookup the parser implementation. + + + A parser for a given , or + if no parser was found. + + + + + Returns a schema collection containing validation schemas for all registered parsers. + + + A schema collection containing validation schemas for all registered parsers. + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The of the parser that will be activated + when an element in its default namespace is encountered. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The of the parser that will be activated + when the attendant is + encountered. + + + The namespace with which to associate instance of the parser. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If the is not a + that implements the + interface. + + + If is . + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The parser instance. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The namespace with which to associate instance of the parser. + + + The parser instance. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If is , or if + is not specified and parser class + does not have default value defined using . + + + + + Register a schema as well-known + + + + + + + Returns default values for the parser namespace and schema location as + defined by the . + + + A type of the parser. + + + A instance containing + default values for the parser namsepace and schema location + + + + + Resolves xml entities by using the infrastructure. + + + + + Adapts the interface to . + Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 + + + + + Constants defining the structure and values associated with the + Spring.NET XML object definition format. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Value of a boolean attribute that represents + . + + +

+ Anything else represents . +

+
+
+ + + Value of a boolean attribute that represents + . + + + + + Signifies that a default value is to be applied. + + + + + Defines an external XML object definition resource. + + + + + Specifies the relative path to an external XML object definition + resource. + + + + + Defines an alias for an object definition. + + + + + Specifies the alias of an object definition. + + + + + Specifies the default lazy initialization mode. + + + + + Specifies the default dependency checking mode. + + + + + Specifies the default autowire mode. + + + + + Specifies the default autowire candidates. + + + + + Specifies the default collection merge mode. + + + + + Specifies the default init method. + + + + + Specifies the default destroy method. + + + + + Defines a single named object. + + + + + Element containing informative text describing the purpose of the + enclosing element. + + +

+ Always optional. +

+

+ Used primarily for user documentation of XML object definition + documents. +

+
+
+ + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but it is recommended + that the names of one's objects are + specified explicitly. +

+
+
+ + + The name or alias of the parent object definition that a child + object definition inherits from. + + + + + Objects can be identified by an id, to enable reference checking. + + +

+ There are constraints on a valid XML id: if you want to reference + your object in .NET code using a name that's illegal as an XML id, + use the optional "name" attribute + (). + If neither given, the objects name is + used as id. +

+
+
+ + + Can be used to create one or more aliases illegal in an id. + + +

+ Multiple aliases can be separated by any number of spaces, + semicolons, or commas + (). +

+

+ Always optional. +

+
+
+ + + Is this object a "singleton" (one shared instance, which will + be returned by all calls to + with the id), or a + "prototype" (independent instance resulting from each call to + ). + + +

+ Singletons are most commonly used, and are ideal for multi-threaded + service objects. +

+
+ +
+ + + Controls object scope. Only applicable to ASP.NET web applications. + + +

+ Scope can be defined as either application, session or request. It + defines when "singleton" instances are initialized, but has no + effect on prototype definitions. +

+
+
+ + + The names of the objects that this object depends on being + initialized. + + +

+ The object factory will guarantee that these objects + get initialized before this object definition. +

+ + Dependencies are normally expressed through object properties or + constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Optional attribute for the name of the custom initialization method + to invoke after setting object properties. + + +

+ The method must have no arguments. +

+
+
+ + + Optional attribute for the name of the custom destroy method to + invoke on object factory shutdown. + + +

+ Valid destroy methods have either of the following signatures... + + void MethodName() + void MethodName(bool force) + +

+ + Only invoked on singleton objects! + +
+
+ + + A constructor argument : the constructor-arg tag can have an + optional type attribute, to specify the exact type of the + constructor argument + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 single + argument constructors that can both be converted from a + . +

+
+
+ + + The constructor-arg tag can have an optional index attribute, + to specify the exact index in the constructor argument list. + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 arguments of + the same type. +

+
+
+ + + The constructor-arg tag can have an optional named parameter + attribute, to specify a named parameter in the constructor + argument list. + + + + + Is this object "abstract", i.e. not meant to be instantiated itself + but rather just serving as parent for concrete child object + definitions? + + +

+ Default is . Specify + to tell the object factory to not try to instantiate that + particular object in any case. +

+
+
+ + + A property definition : object definitions can have zero or more + properties. + + +

+ Spring.NET supports primitives, references to other objects in the + same or related factories, lists, dictionaries, and name value + collections. +

+
+
+ + + A qualifier definition used for fine grained autowiring + + + + + A reference to another managed object or static + . + + + + + ID refs must specify a name of the target object. + + + + + A reference to the name of another managed object in the same + context. + + + + + A reference to the name of another managed object in the same + context. + + +

+ Local references, using the "local" attribute, have to use object + ids; they can be checked by a parser, thus should be preferred for + references within the same object factory XML file. +

+
+
+ + + Alternative to type attribute for factory-method usage. + + +

+ If this is specified, no type attribute should be used. This should + be set to the name of an object in the current or ancestor + factories that contains the relevant factory method. This allows + the factory itself to be configured using Dependency Injection, and + an instance (rather than static) method to be used. +

+
+
+ + + Optional attribute specifying the name of a factory method to use + to create this object. + + +

+ Use constructor-arg elements to specify arguments to the factory + method, if it takes arguments. Autowiring does not apply to + factory methods. +

+

+ If the "type" attribute is present, the factory method will be a + static method on the type specified by the "type" attribute on + this object definition. Often this will be the same type as that + of the constructed object - for example, when the factory method + is used as an alternative to a constructor. However, it may be on + a different type. In that case, the created object will *not* be + of the type specified in the "type" attribute. This is analogous + to behaviour. +

+

+ If the "factory-object" attribute is present, the "type" attribute + is not used, and the factory method will be an instance method on + the object returned from a + + call with the specified object name. The factory object may be + defined as a singleton or a prototype. +

+

+ The factory method can have any number of arguments. Use indexed + constructor-arg elements in conjunction with the factory-method + attribute. +

+

+ Setter Injection can be used in conjunction with a factory method. + Method Injection cannot, as the factory method returns an instance, + which will be used when the container creates the object. +

+
+
+ + + A list can contain multiple inner object, ref, collection, or + value elements. + + +

+ Lists are untyped, pending generics support, although references + will be strongly typed. +

+

+ A list can also map to an array type. The necessary conversion is + automatically performed by the + . +

+
+
+ + + A set can contain multiple inner object, ref, collection, or value + elements. + + +

+ Sets are untyped, pending generics support, although references + will be strongly typed. +

+
+
+ + + A Spring.NET map is a mapping from a string key to object (a .NET + ). + + +

+ Dictionaries may be empty. +

+
+
+ + + A lookup key (for a dictionary or name / value collection). + + + + + A lookup key (for a dictionary or name / value collection). + + + + + Contains a string representation of a value. + + +

+ This is used by name-value, ctor argument, and property elements. +

+
+
+ + + Contains delimiters that should be used to split delimited string values. + + +

+ This is used by name-value element. +

+
+
+ + + A reference to another objects. + + +

+ Used as a convenience shortcut on property and constructor-arg + elements to refer to other objects. +

+
+
+ + + Contains a string representation of an expression. + + +

+ This is used by ctor argument and property elements. +

+
+
+ + + A map entry can be an inner object, ref, collection, or value. + + +

+ The name of the property is given by the "key" attribute. +

+
+
+ + + Contains a string representation of a property value. + + +

+ The property may be a string, or may be converted to the + required using the + + machinery. This makes it possible for application developers to + write custom + implementations that can convert strings to objects. +

+ + This is recommended for simple objects only. Configure more complex + objects by setting properties to references to other objects. + +
+
+ + + Contains a string representation of an expression. + + + + + Denotes value. + + +

+ Necessary because an empty "value" tag will resolve to an empty + , which will not be resolved to + value unless a special + does so. +

+
+
+ + + 'name-values' elements differ from dictionary elements in that + values must be strings. + + +

+ May be empty. +

+
+
+ + + Element content is the string value of the property. + + +

+ The "key" attribute is the name of the property. +

+
+
+ + + The lazy initialization mode for an individual object definition. + + + + + The dependency checking mode for an individual object definition. + + + + + Defines a subscription to one or more events published by one or + more event sources. + + + + + The name of an event handling method. + + +

+ Defaults to On${event}. + Note : this default will probably change before the first 1.0 + release. +

+
+
+ + + The name of an event. + + + + + The autowiring mode for an individual object definition. + + + + + The autowiring mode for an individual object definition. + + + + + Attribute element to farther deifne the qualifier of an object + + + + + The primary object for autwired injection + + + + + Shortcut alternative to specifying a key element in a + dictionary entry element with <ref object="..."/>. + + + + + Shortcut alternative to specifying a value element in a + dictionary entry element with <ref object="..."/>. + + + + + Specify if the collection values should be merged with the parent. + + + + + Defined meta attributes to be used for Autowire objects + + + + + The string of characters that delimit object names. + + + + + A lookup method causes the IoC container to override a given method and return + the object with the name given in the attendant object attribute. + + +

+ This is a form of Method Injection. +

+

+ It's particularly useful as an alternative to implementing the + interface, + in order to be able to make + + calls for non-singleton instances at runtime. In this case, Method Injection + is a less invasive alternative. +

+
+
+ + + The name of a lookup method. This method must take no arguments. + + + + + The name of the object in the IoC container that the lookup method + must resolve to. + + +

+ Often this object will be a prototype, in which case the lookup method + will return a distinct instance on every invocation. This is useful + for single-threaded objects. +

+
+
+ + + A replaced method causes the IoC container to override a given method + with an (arbitrary) implementation at runtime. + + +

+ This (again) is a form of Method Injection. +

+
+
+ + + Name of the method whose implementation should be replaced by the + IoC container. + + +

+ If this method is not overloaded, there's no need to use arg-type + subelements. +

+

+ If this method is overloaded, arg-type subelements must be + used for all override definitions for the method. +

+
+
+ + + The object name of an implementation of the + interface. + + +

+ This may be a singleton or prototype. If it's a prototype, a new + instance will be used for each method replacement. Singleton usage + is the norm. +

+
+
+ + + Subelement of replaced-method identifying an argument for a + replaced method in the event of method overloading. + + + + + + Specification of the of an overloaded method + argument as a . + + +

+ For convenience, this may be a substring of the FQN. E.g. all the following would match + : +

+

+ + + System.String + + + string + + + str + + +

+
+ +
+ + + Check everything. + + + + + Just check primitive (string, int, etc) values. + + + + + Check object references. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Creates a new instance of the + + class. + + +

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

+
+
+ + + Stateful class used to parse XML object definitions. + + Not all parsing code has been refactored into this class. See + BeanDefinitionParserDelegate in Java for how this class should evolve. + Rob Harrop + Juergen Hoeller + Rod Johnson + Mark Pollack (.NET) + + + + The shared instance for this class (and derived classes). + + + + + Initializes a new instance of the class. + + The reader context. + + + + Initializes a new instance of the class. + + The reader context. + The root element of the definition document to parse + + + + Initialize the default lazy-init, dependency check, and autowire settings. + + The root element + + + + Determines whether the Spring object namespace is equal to the the specified namespace URI. + + The namespace URI. + + true if is the default Spring namespace; otherwise, false. + + + + + Decorates the object definition if required. + + The element. + The holder. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The containing object definition if is a nested element. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Create an instance from the given and . + + + This method may be used as a last resort to post-process an object definition before it gets added to the registry. + + + + + Allows deriving classes to post process the name and aliases for the current element. By default + does nothing and returns the unmodified . + + + The list passed in may be modified by an implementation of this method to reflect special needs. + + the object name obtained by the default algorithm from 'id' and 'name' attributes so far. + the object aliases obtained by the default algorithm from 'name' attribute so far. + the currently processed element. + the containing object definition, may be null + the new object name to be used. + + + + Validate that the specified object name and aliases have not been used already. + + + + + Parses an element in a custom namespace. + + + the parsed object definition or null if not supported by the corresponding parser. + + + + Parses an element in a custom namespace. + + + if a nested element, the containing object definition + the parsed object definition or null if not supported by the corresponding parser. + + + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Determines whether the string represents a 'true' boolean value. + + The value. + + true if is 'true' string value; otherwise, false. + + + + + Convenience method to create a builder for a root object definition. + + Name of the object type. + A builder for a root object definition. + + + + Convenience method to create a builder for a root object definition. + + Type of the object. + a builder for a root object definition + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Report a parser error. + + + + + Gets the defaults definition object, or null if the + default have not yet been initialized. + + The defaults. + + + + Gets the reader context. + + The reader context. + + + + Creates an instance + populated with the object definitions supplied in the configuration + section. + + +

+ Applications will typically want to use an + , and instantiate it + via the use of the + class (which is similar in functionality to this class). This class is + provided for those times when only an + is required. +

+ Creates an instance of the class XmlObjectFactory +
+ +

+ +

+
+ Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a + instance populated with the object definitions supplied in the + configuration section. + + + The configuration settings in a corresponding parent configuration + section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + A instance + populated with the object definitions supplied in the configuration + section. + + + + + Default implementation of the + interface. + + +

+ Parses object definitions according to the standard Spring.NET schema. +

+

+ This schema is typically located at + http://www.springframework.net/xsd/spring-objects.xsd. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The namespace URI for the standard Spring.NET object definition schema. + + + + + The shared instance for this class (and derived classes). + + + + + Invoked by after construction but before any + elements have been parsed. + + This is a NoOp + + + + 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. +

+
+
+ + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + The parser context. + + If the resource could not be imported. + + + + Parses an event listener definition. + + The name associated with the object that the event handler is being defined on. + + The events being populated. + + The element containing the event listener definition. + + + The namespace-aware parser. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The parser context. + if set to true if we are processing an inner + object definition. + + The object (definition) wrapped within an + + instance. + + +

+ Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. +

+

+ If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. +

+
+
+ + + Calculates an id for an object definition. + + +

+ Called when an object definition has not been explicitly defined + with an id. +

+
+ + The element containing the object definition. + + + The list of names defined for the object; may be + or even empty. + + + A calculated object definition id. + +
+ + + Parse a standard object definition. + + The element containing the object definition. + The id of the object definition. + parsing state holder + The object (definition). + + + + Parse method override argument subelements of the given object element. + + + + + Parse element and add parsed element to + + + + + Parse element and add parsed element to + + + + + Parse constructor argument subelements of the given object element. + + + + + Parse event handler subelements of the given object element. + + + + + Parse the meta upplied meta attributes if the given object element + + + + + Parse qualifier sub-elements of the given bean element. + + + + + Parse a qualifier element. + + + + + Parse property value subelements of the given object element. + + + The name of the object (definition) associated with the property element (s) + + + The element containing the top level object definition. + + + The namespace-aware parser. + + + The property (s) associated with the object (definition). + + + + + Parse a constructor-arg element. + + + The name of the object (definition) associated with the ctor arg. + + + The list of constructor args associated with the object (definition). + + + The name of the element containing the ctor arg definition. + + + The namespace-aware parser. + + + + + Parse a property element. + + + The name of the object (definition) associated with the property. + + + The list of properties associated with the object (definition). + + + The name of the element containing the property definition. + + + The namespace-aware parser. + + + + + Get the value of a property element (may be a list). + +

+ Please note that even though this method is named GetPropertyValue, + it is called by both the property and constructor argument element + handlers. +

+
+ The property element. + + The name of the object associated with the property. + + + The namespace-aware parser. + +
+ + + Parse a value, ref or collection subelement of a property element. + + + Subelement of property element; we don't know which yet. + + + The name of the object (definition) associated with the top level property. + + + The namespace-aware parser. + + + + + Gets a list definition. + + + The element describing the list definition. + + + The name of the object (definition) associated with the list definition. + + + The namespace-aware parser. + + The list definition. + + + + Gets a set definition. + + + The element describing the set definition. + + + The name of the object (definition) associated with the set definition. + + + The namespace-aware parser. + + The set definition. + + + + Gets a dictionary definition. + + The element describing the dictionary definition. + The name of the object (definition) associated with the dictionary definition. + The namespace-aware parser. + The dictionary definition. + + + + Selects sub-elements with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child nodes to look for. + + + The child s of the supplied + with the supplied + . + +
+ + + Selects a single sub-element with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child node to look for. + + + The first child of the supplied + with the supplied + . + +
+ + + Gets a name value collection mapping definition. + + + The element describing the name value collection mapping definition. + + + The name of the object (definition) associated with the + name value collection mapping definition. + + the context carrying parsing state information + The name value collection definition. + + + + Returns the text of the supplied , + or the empty string value if said is empty. + + +

+ If the supplied is , + then the empty string value will be returned. +

+
+
+ + + Strips the dependency check value out of the supplied string. + + +

+ If the supplied is an invalid dependency + checking mode, the invalid value will be logged and this method will + return the value. + No exception will be raised. +

+
+ + The string containing the dependency check value. + + The dependency check value. + +
+ + + Strips the autowiring mode out of the supplied string. + + +

+ If the supplied is an invalid autowiring mode, + the invalid value will be logged and this method will return the + value. No exception will be raised. +

+
+ + The string containing the autowiring mode definition. + + The autowiring mode. + +
+ + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Context that gets passed along an object definition parsing process, encapsulating + all relevant configuraiton as well as state. + + + + + Initializes a new instance of the class. + + The parser helper. + + + + Initializes a new instance of the class. + + The parser helper. + The containing object definition. + + + + Gets the reader context. + + The reader context. + + + + Gets the registry. + + The registry. + + + + Gets the parser helper. + + The parser helper. + + + + Gets the containing object definition. + + The containing object definition. + + + + Gets a value indicating whether this instance is nested. + + true if this instance is nested; otherwise, false. + + + + Gets a value indicating whether this instance is default lazy init. + + + true if this instance is default lazy init; otherwise, false. + + + + + Represents the replacement of a method on a managed object by the IoC + container. + + +

+ Note that this mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the method that is to be overridden. + + + The object name of the + instance in the surrounding IoC container. + + + If either of the supplied arguments is or + contains only whitespace character(s). + + + + + Add a fragment of a instance's + such as 'Exception or System.Excep to identify an argument + for a dependency injected method. + + + A (sub) string of a instance's . + + + If the supplied is or + contains only whitespace character(s). + + + + + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The object name of the + instance in the surrounding IoC container. + + + + + Object definition reader for Spring's default XML object definition format. + + +

+ Typically applied to a + instance. +

+

+ This class registers each object definition with the given object factory superclass, + and relies on the latter's implementation of the + interface. +

+

+ It supports singletons, prototypes, and references to either of these kinds of object. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + the to use for creating new s + + + + Load object definitions from the supplied XML . + + + The XML resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Actually load object definitions from the specified XML file. + + The input stream to read from. + The resource for the XML data. + + + + + Validation callback for a validating XML reader. + + The source of the event. + Any data pertinent to the event. + + + + Register the object definitions contained in the given DOM document. + + The DOM document. + + The original resource from where the + was read. + + + The number of object definitions that were registered. + + + In case of parsing errors. + + + + + Creates the to use for actually + reading object definitions from an XML document. + + Default implementation instantiates the specified + or if no reader type is specified. + + + + + Creates the to be passed along + during the object definition reading process. + + The underlying that is currently processed. + A new + + + + Create a instance for handling custom namespaces. + + + TODO (EE): make protected virtual, see remarks on + + + + + The to be used for parsing. + + + + + Sets the IObjectDefinitionDocumentReader implementation to use, responsible for + the actual reading of the XML object definition document.stype of the document reader. + + The type of the document reader. + + + + Specify a to use. If none is specified a default + instance will be created by + + + + + Specify a for creating instances of . + + + + + For retrying the parse process + + + + + Convenience extension of + + that reads object definitions from an XML document or element. + + +

+ Delegates to + + underneath; effectively equivalent to using a + for a + . +

+ + objects doesn't need to be the root element of + the XML document: this class will parse all object definition elements in the + XML stream. + +

+ This class registers each object definition with the + + superclass, and relies on the latter's implementation of the + interface. It supports + singletons, prototypes and references to either of these kinds of object. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Gets object definition reader to use. + + + + + Extension of specific to use with an XmlObjectDefinitionReader. + Provides access to configured in + + + + + The maximum length of any XML fragment displayed in the error message + reporting. + + +

+ Hopefully this will display enough context so that a user + can pinpoint the cause of the error. +

+
+
+ + + Initializes a new instance of the class. + + The resource. + The reader. + + + + Initializes a new instance of the class. + + The resource. + The reader. + The factory to use for creating new instances. + + + + Generates the name of the object. + + The object definition. + the generated object name + + + + Registers the name of the with generated. + + The object definition. + the generated object name + + + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + + +
+ + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the error. + + + The root cause of the parse error (if any - may be ). + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + +
+ + + This method can be overwritten in order to implement validators + capable of displaying a full list of errors found in the definition. + + + The node that triggered the parse error. + + + A message about the exception. + + + + + Gets the reader. + + The reader. + + + + Gets the resource loader. + + The resource loader. + + + + Gets the registry. + + The registry. + + + + Gets or sets the object definition factory. + + The object definition factory. + + + + Get the instance to lookup parsers for custom namespaces. + + + + + Exception thrown if an + is not fully + initialized, for example if it is involved in a circular reference. + + +

+ This is usually indicated by any of the variants of the + + method returning . +

+

+ A circular reference with an + cannot be solved by eagerly caching singleton instances (as is the + case with normal objects. The reason is that every + needs to be fully + initialized before it can return the created object, while only specific + normal objects need to be initialized - that is, if a collaborating object + actually invokes them on initialization instead of just storing the reference. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Thrown when an + encounters an error when attempting to create an object from an object + definition. + + Juergen Hoeller + Rick Evans (.NET) + + + + 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 name of the object that triggered 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. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Describes the creation failure trace of this exception. + + + + + Creates a new instance of the + FactoryObjectNotInitializedException class. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + FactoryObjectCircularReferenceException class. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectCircularReferenceException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + is asked for an object instance name for which it cannot find a definition. + + Rod Johnson + Rick Evans (.NET) + + + + 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. + + + Name of the missing object. + + + A further, detailed message describing the problem. + + + + + Initializes a new instance of the class. + + The required type of the object. + A description of the originating dependency. + A message describing the problem. + + + + Creates a new instance of the + class. + + + The of the missing object. + + + A further, detailed message describing the problem. + + + + + 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. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Return the required of object, if it was a + lookup by that failed. + + + + + Return the name of the missing object, if it was a lookup by name that + failed. + + + + + Thrown in case of a reference to an object that is currently in creation. + + +

+ Typically happens when constructor autowiring matches the currently + constructed object. +

+
+ Juergen Hoeller + Rick Evans +
+ + + The default error message text to be used, if none is specified. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectCurrentlyInCreationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + encounters an error when attempting to parse an object + definition. + + Federico Spinazzi (.NET) + + + + Creates a new instance of the ObjectDefinitionException class. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The value of the xml class attribute thet can be resolved + as a type + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The message about the exception. + + + + + Convenience methods operating on object factories, returning object instances, + names, or counts. + + +

+ The nesting hierarchy of an object factory is taken into account by the various methods + exposed by this class. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Used to dereference an + and distinguish it from managed objects created by the factory. + + +

+ For example, if the managed object identified as foo is a + factory, getting &foo will return the factory, not the + instance returned by the factory. +

+
+
+ + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Creates a new instance of the + class. + + +

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

+
+
+ + + Count all object definitions in any hierarchy in which this + factory participates. + + +

+ Includes counts of ancestor object factories. +

+

+ Objects that are "overridden" (specified in a descendant factory + with the same name) are counted only once. +

+
+ The object factory. + + The count of objects including those defined in ancestor factories. + +
+ + + Return all object names in the factory, including ancestor factories. + + The object factory. + The array of object names, or an empty array if none. + + + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s + if is set to true, + which means that s will get initialized. +

+
+ + If this isn't also an + , + this method will return the same as it's own + + method. + + + The that objects must match. + + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + The array of object names, or an empty array if none. + +
+ + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+
+ + If this isn't also an , + this method will return the same as it's own method. + + + The that objects must match. + + + The array of object names, or an empty array if none. + +
+ + + Return all objects of the given type or subtypes, also picking up objects + defined in ancestor object factories if the current object factory is an + . + + +

+ The return list will only contain objects of this type. + Useful convenience method when we don't care about object names. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the objects could not be created. + + + The of object instances, or an + empty if none. + +
+ + + Return a single object of the given type or subtypes, also picking up objects defined + in ancestor object factories if the current object factory is an + . + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If more than one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. + This version of ObjectOfType automatically includes prototypes and + instances. +

+
+ The object factory. + The of object to match. + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return the object name, stripping out the factory dereference prefix if necessary. + + The name of the object. + The object name sans any factory dereference prefix. + + + + Given an (object) name, builds a corresponding factory object name such that + the return value can be used as a lookup name for a factory object. + + + The name to be used to build the resulting factory object name. + + + The transformed into its factory object name + equivalent. + + + + + + + Is the supplied a factory dereference? + + +

+ That is, does the supplied begin with + the + ? +

+
+ The name to check. + + if the supplied is a + factory dereference; if not, or the + aupplied is or + consists solely of the + + value. + + +
+ + + Exception that an object implementation is suggested to throw if its own + factory-aware initialization code fails. + thrown by object factory methods + themselves should simply be propagated as-is. + + +

+ Note that non-factory-aware initialization methods like AfterPropertiesSet () + or a custom "init-method" can throw any exception. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectInitializationException class. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectInitializationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to an attempt to lookup a factory object, and + the object identified by the lookup key is not a factory. + + +

+ An object is a factory if it implements (either directly or indirectly + via inheritance) the + interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Thrown when an object doesn't match the required . + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + Name of the object requested. + + + The required of the actual object + instance that was retrieved. + + + The instance actually returned, whose class did not match the + expected . + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The actual of the actual object + instance that was retrieved. + + + + + The required of the actual object + instance that was retrieved. + + + + + The instance actually returned, whose class did not match the + expected . + + + + + The name of the object requested. + + + + + 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 name of the object that was being retrieved from the factory. + + + The object instance that was retrieved. + + + + + 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. + + + + + Exception thrown when an object depends on other objects or simple properties + that were not specified in the object factory definition, although dependency + checking was enabled. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The constructor argument index at which the dependency is + unsatisfied. + + + The of the constructor argument at + which the dependency is unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The name identifying the property on which the dependency is + unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Base class implementation for classes that describe an event handler. + + Rick Evans + + + + Describes an event handler. + + Rick Evans + + + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + The source of the event. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

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

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Returns a stringified representation of this object. + + A stringified representation of this object. + + + + The source of the event (may be unresolved, as in the case + of a + value). + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Convenience base class for implementations. + + + + + Abstracts the state sharing strategy used + by + + Erich Eichinger + + + + Indicate, whether the given instance can be served by this factory + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state can + be served for the given instance or not. + + + + + Returns the shared state for the given instance. + + the instance to obtain shared state for. + the name of this instance + a dictionary containing shared state for or null. + + + + Gets a dictionary acc. to the type of . + If no dictionary is found, create it according to + + the instance to obtain shared state for + the name of the instance. + + A dictionary containing the 's state, + or null if no state can be served by this provider. + + + + + Creates a dictionary to hold the shared state identified by . + + a key to create the dictionary for. + a dictionary according to and . + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Create the key used for obtaining the state dictionary for . + + the instance to create the key for + the name of the instance. + + the key identifying the state dictionary to be used for + or null, if this state manager doesn't serve the given instance. + + + + Implementations may choose to return null from this method to indicate, + that they won't serve state for the given instance. + + + Note:Keys returned by this method are always treated case-sensitive! + + + + + + Create shared state dictionaries case-sensitive or case-insensitive? + + + + + A number indicating the priority of this ( for more). + + + + + Base class for all + implemenations that actually perform event wiring. + + Rick Evans + + + + Creates a new instance of the + class. + + +

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

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

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

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Resolves the method metadata that describes the method that is to be used + as the argument to a delegate constructor. + + + The exposing the method. + + + The of the delegate (e.g. System.EventHandler). + + + The custom binding flags to use when searching for the method. + + The method metadata. + + If the method could not be found. + + + + + Describes an implementation + that autowires events to handler methods. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Wires up the specified handler to the named event on the supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a , + etc). + + + + + The name of the method that is going to handle the event. + + + + + Performs the matching up of handler methods to one or more source events. + + +

+ This class merely marshals the matching of handler methods to the events exposed + by an event source, and then delegates to a concrete + implementation (such as + or + ) to do the heavy lifting of + actually wiring a handler method to an event. +

+

+ Note : the order in which handler's are wired up to events is non-deterministic. +

+
+
+ + + Creates a new instance of the + class. + + + The object exposing the event (s) being wired up. + + + The name of the event that is being wired up. + + + The object exposing the method (s) being wired to the event. + + + The name of the method that is going to handle the event. + + + + + Wires up events on the source to methods exposed on the handler. + + + + + Wires up the supplied event to any handler methods that match the event + signature. + + The event being wired up. + + + + Only replaces the first occurrence of the placeholder. + + The event whose name is going to be used. + + The method name customised for the name of the supplied event. + + + + + The object exposing the event (s) being wired up. + + + + + The object exposing the method (s) being wired to an event source. + + + + + The of the object that is handling any events. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Serves shared state on a by-type basis. + + + + + Creates a new instance matching all types by default. + + + + + Creates a new instance matching only specified list of types. + + the list of types to serve. + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Returns the for the given . + + the instance to obtain the key for. + the name of the instance (ignored by this provider) + instance.GetType() if it matches the list. Null otherwise. + + This method will only be called if returned true previously. + + + + + Limit object types to be served by this state manager. + + + Only objects assignable to one of the types in this list + will be served state by this manager. + + + + + Describes an event handler for an object instance. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Definition for sorting object instances by a property. + + Juergen Hoeller + Simon White (.NET) + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Mutable implementation of the + interface that + supports toggling the ascending value on setting the same property again. + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using + the specified . + + + The to use + as a source for initial property values. + + + + + Creates a new instance of the + class. + + + The name of the property to sort by. + + + Whether upper and lower case in string values should be ignored. + + + Whether or not the sorting should be ascending or descending. + + + + + Creates a new instance of the + class. + + + Whether or not the + + property should be toggled if the same name is set on the + + property. + + + + + Overrides the default method + + + The object to test against this instance for equality. + + + True if the supplied is equal to this instance. + + + + + Overrides the default method. + + The hashcode for this instance. + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Performs a comparison of two objects, using the specified object property via + an . + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + The to use for any + sorting. + + + If the supplied is . + + + + + Compares two objects and returns a value indicating whether one is less + than, equal to or greater than the other. + + The first object to compare. + The second object to compare. + + + + + Get the 's property + value for the given object. + + The object to get the property value for. + The property value. + + + + Sort the given according to the + given sort definition. + + + The to be sorted. + + The parameters to sort by. + + In the case of a missing property name. + + + If the supplied is . + + + + + Gets the to + use for any sorting. + + + The to use for + any sorting. + + + + + Describes an event handler for a static class method. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + The central interface of Spring.NET's low-level object infrastructure. + + +

+ Typically not directly used by application code but rather implicitly + via an . +

+

+ Implementing classes have the ability to get and set property values + (individually or in bulk), get property descriptors and query the + readability and writability of properties. +

+

+ This interface supports nested properties enabling the setting + of properties on subproperties to an unlimited depth. +

+

+ If a property update causes an exception, a + will be thrown. Bulk + updates continue after exceptions are encountered, throwing an exception + wrapping all exceptions encountered during the update. +

+

+ implementations can be used + repeatedly, with their "target" or wrapped object changed. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + Get the value of a property. + + The name of the property to get the value of. May be nested. + + The value of the property. + + if the property isn't readable, or if the getting the value throws + an exception. + + + + + Get the for a particular + property. + + + The property to be retrieved. + + + The for the particular + property. + + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Get all of the instances for + all of the properties of the wrapped object. + + + An array of instances. + + + + + Set a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ The new property value. +
+ + + Set a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new property value. +
+ + Set a number of property values in bulk. + +

+ This is the preferred way to perform a bulk update. +

+

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

+ Does not allow the setting of unknown fields. Equivalent to + + with an argument of false for the second parameter. +

+
+ + The collection of instances to + set on the wrapped object. + +
+ + + Set a number of property values in bulk with full control over behavior. + + +

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

Does not allow the setting of unknown fields. +

+
+ + The to set on the target object + + + Should we ignore unknown values (not found in the object!?) + +
+ + + The object wrapped by the wrapper (cannot be ). + + +

+ Implementations are required to allow the type of the wrapped + object to change. +

+
+ The object wrapped by this wrapper. +
+ + + Convenience method to return the + of the wrapped object. + + The of the wrapped object. + + + + A collection style container for + instances. + + Rod Johnson + Mark Pollack (.NET) + + + + Return the instance with the + given name. + + The name to search for. + the , or null if a + the with the supplied + did not exist in this collection. + + + + + Is there a instance for this + property name? + + The name to search for. + + True if there is a instance for + the supplied . + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + +

+ Subclasses should also override Equals. +

+
+ The old property values. + + An containing any changes, or + an empty instance if there were + no changes. + +
+ + + Return an array of the objects + held in this object. + + An array of the objects held + in this object. + + + + + This interface should be implemented by classes that want to + have access to the shared state. + + +

+ Shared state is very useful if you have data that needs to be shared by all instances + of e.g. the same webform (or other IHttpHandlers). +

+

+ For example, Spring.Web.UI.Page class implements this interface, which allows + each page derived from it to cache localizalization resources and parsed data binding + expressions only once and then reuse the cached values, regardless of how many instances + of the page are created. +

+
+
+ + + Gets or sets the that should be used + to store shared state for this instance. + + + + + Default implementation of the + interface. + + +

+ Allows simple manipulation of properties, and provides constructors to + support deep copy and construction from a number of collection types such as + and + . +

+
+ Rod Johnson + Mark Pollack (.NET) + Rick Evans (.NET) +
+ + + The list of objects. + + + + + Creates a new instance of the + class. + + +

+ The returned instance is initially empty... + s can be added with the various + overloaded , + , + , + and + methods. +

+
+ + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. Guarantees + references are independent, although it can't deep copy objects currently + referenced by individual objects. +

+
+
+ + + Creates a new instance of the + class. + + + The with property values + keyed by property name, which must be a . + + + + + Overloaded version of Add that takes a property name and a property value. + + + The name of the property. + + + The value of the property. + + + + + Add the supplied object, + replacing any existing one for the respective property. + + + The object to add. + + + + + Merges the value of the supplied 'new' with that of + the current if merging is supported and enabled. + + + The new pv. + The current pv. + The possibly merged PropertyValue + + + + Add all property values from the given + . + + + The map of property values, the keys of which must be + s. + + + + + Add all property values from the given + . + + + The list of s to be added. + + + + + Remove the given , if contained. + + + The to remove. + + + + + Removes the named , if contained. + + + The name of the property. + + + + + Modify a object held in this object. Indexed from 0. + + + + + Return the property value given the name. + + + The property name is checked in a case-insensitive fashion. + + + The name of the property. + + + The property value. + + + + + Does the container of properties contain one of this name. + + The name of the property to search for. + + True if the property is contained in this collection, false otherwise. + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + Another property values collection. + + The collection of property values that are different than the supplied one. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + Convert the object to a string representation. + + + A string representation of the object. + + + + + Property to retrieve the array of property values. + + + + + Holder for a key-value style attribute that is part of a bean definition. + Keeps track of the definition source in addition to the key-value pair. + + + + + Create a new AttributeValue instance. + + the name of the attribute (never null) + the value of the attribute (possibly before type conversion) + + + + Return the name of the attribute. + + + + + Return the value of the attribute. + + + + + Set the configuration source Object for this metadata element. +

The exact type of the object will depend on the configuration mechanism used.

+
+
+ + + Default implementation of the + interface that should be sufficient for all normal uses. + + +

+ will convert + and array + values to the corresponding target arrays, if necessary. Custom + s that deal with + s or arrays can be written against a + comma delimited as + arrays are converted in such a format if the array itself is not assignable. +

+
+ Rod Johnson + Juergen Hoeller + Jean-Pierre Pawlak + Mark Pollack (.NET) + Aleksandar Seovic(.NET) +
+ + The wrapped object. + + + + The ILog instance for this class. We'll create a lot of these objects, + so we don't want a new instance every time. + + + + + Creates a new instance of the class. + + +

+ The wrapped target instance will need to be set afterwards. +

+
+ +
+ + + Creates a new instance of the class. + + + The object wrapped by this . + + + If the supplied is . + + + + + Creates a new instance of the class, + instantiating a new instance of the specified and using + it as the . + + +

+ Please note that the passed as the + argument must have a no-argument constructor. + If it does not, an exception will be thrown when this class attempts + to instantiate the supplied using it's + (non-existent) constructor. +

+
+ + The to instantiate and wrap. + + + If the is , or if the + invocation of the s default (no-arg) constructor + fails (due to invalid arguments, insufficient permissions, etc). + +
+ + Gets the value of a property. + + The name of the property to get the value of. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + Gets the value of a property. + + The property expression that should be used to retrieve the property value. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + + Sets a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new value. +
+ + + Sets a property value. + + + The property expression that should be used to set the property value. + + The new value. + + + + Sets a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ + The object containing new property value. + +
+ + Set a number of property values in bulk. + +

+ Does not allow unknown fields. Equivalent to + + with and for + arguments. +

+
+ + The to set on the target + object. + + + If an error is encountered while setting a property. + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Perform a bulk update with full control over behavior. + + +

+ This method may throw a reflection-based exception, if there is a critical + failure such as no matching field... less serious exceptions will be accumulated + and thrown as a single . +

+
+ + The s to set on the target object. + + + Should we ignore unknown values (not found in the object!?). + + + If an error is encountered while setting a property (only thrown if the + parameter is set to ). + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Returns PropertyInfo for the specified property + + The name of the property to search for. + The for the specified property. + If cannot be determined. + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Returns MemberInfo for the specified property or field + + The name of the property or field to search for. + The or for the specified property or field. + If does not resolve to a property or field. + + + + Get the properties of the wrapped object. + + + An array of s. + + + + + This method is expensive! Only call for diagnostics and debugging reasons, + not in production. + + + A string describing the state of this object. + + + + + Attempts to parse property expression first and falls back to full expression + if that fails. Performance optimization. + + Property expression to parse. + Parsed proeprty expression. + + + + The object wrapped by this . + + + If the object cannot be changed; or an attempt is made to set the + value of this property to . + + + + + Convenience method to return the of the wrapped object. + + +

+ Do not use this (convenience) method prior to setting the + property. +

+
+ + The of the wrapped object. + + + If the property + is . + +
+ + + Return the collection of property descriptors. + + + + + Combined exception, composed of individual binding + s. + + +

+ An object of this class is created at the beginning of the binding + process, and errors added to it as necessary. +

+

+ The binding process continues when it encounters application-level + s, applying those changes + that can be applied and storing rejected changes in an instance of this class. +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) +
+ + + Creates a new instance of the PropertyAccessExceptionsException class. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Create new empty PropertyAccessExceptionsException. + We'll add errors to it as we attempt to bind properties. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The IObjectWrapper wrapping the target object at the root of the exception. + + + + The list of PropertyAccessException objects. + + + + Return the + for the supplied , or + if there isn't one. + + + + + Describe the number of exceptions contained in this container class. + + A description of the instance contents. + + + + Return the that generated + this exception. + + + + + Return the object we're binding to. + + + + + If this returns zero (0), no errors were encountered during binding. + + + + + Return an array of the s + stored in this object. + + +

+ Will return the empty array (not ) if there were no errors. +

+
+
+ + + Describe the group of exceptions. + + + + + Holds information and value for an individual property. + + +

+ Using an object here, rather than just storing all properties in a + map keyed by property name, allows for more flexibility, and the + ability to handle indexed properties in a special way if necessary. +

+

+ Note that the value doesn't need to be the final required + : an + implementation must + handle any necessary conversion, as this object doesn't know anything + about the objects it will be applied to. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + + If the supplied is or + contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + Pre-parsed property name. + + If the supplied or + is , or if the name contains only whitespace characters. + + + + + Print a string representation of the property. + + A string representation of the property. + + + + Determines whether the supplied + is equal to the current . + + The other instance. + + if they are equal in content. + + + + + 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 name of the property. + The name of the property. + + + + Parsed property expression. + + + + + Return the value of the property. + + +

+ Note that type conversion will not have occurred here. + It is the responsibility of the + implementation to + perform type conversion. +

+
+ The (possibly unresolved) value of the property. +
+ + + A simple pool implementation + + +

+ Based on the implementation found in Concurrent Programming in Java, + 2nd ed., by Doug Lea. +

+
+ Doug Lea + Federico Spinazzi + Mark Pollack +
+ + + A simple pooling interface for managing and monitoring a pool + of objects. + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + Obtain an instance from the pool. + + +

+ By contract, clients must return the borrowed + instance using + or a related method as defined in an implementation or + sub-interface. +

+
+ An instance from the pool. + + In case the pool is unusable. + + +
+ + + Return an instance to the pool. + + +

+ By contract, the object must have been obtained using + + or a related method as defined in an implementation or sub-interface. +

+
+ The instance to be returned to the pool. + +
+ + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This is an optional operation. AddObject is useful for "pre-loading" a + pool with idle objects. +

+
+ + If the implementation does not support the operation. + +
+ + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently borrowed from the pool. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently idle in the pool. + + +

+ This is an optional operation. +

+

+ This may be considered an approximation of the number of objects + that can be borrowed without creating any new instances. +

+
+ + If the implementation does not support the operation. + +
+ + + Set the factory used to create new instances. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Set of permits + + + + + Creates a new instance of the + class. + + + The factory used to instantiate and manage the lifecycle of pooled objects. + + The initial size of the pool. + + If the supplied is . + + + If the supplied is less than or equal to zero. + + + + + Obtain an instance from the pool. + + + In case the pool is unusable. + + + + + + + Return an instance to the pool. + + The instance to be returned to the pool. + + + + + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Synchronized borrow logic. + + + + + + Synchronized release logic. + + + The object to release to the pool. + + + if the object was not a busy one. + + + + + Instantiates the supplied number of instances and adds + them to the pool. + + + The initial number of objects to build. + + + If the supplied number of is + less than or equal to zero. + + + + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Change the state of the pool to unusable. + + + + + Gets the number of instances currently borrowed from the pool. + + + If the implementation does not support the operation. + + + + + + Gets the number of instances currently idle in the pool. + + + If the implementation does not support the operation. + + + + + + Set the factory used to create new instances. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Defines lifecycle methods for objects that are to be used in an + implementation. + + +

+ The following methods summarize the contract between an + and an + an . +

+ + + + is called whenever a new instance is needed. + + + + is invoked on every instance before it is returned from + the pool. + + + + is invoked on every instance when it is returned to the pool. + + + + is invoked on every instance when it is being dropped from the + pool (see + + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + 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. + + +

+ Invoked on every instance when it is being "dropped" + from the pool (whether due to the return value from a call to the + + method, or for reasons specific to the pool implementation.) +

+
+ 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. + + +

+ Invoked in an implementation-specific fashion to determine if an + instance is still valid to be returned by the pool. + It will only be invoked on an "activated" instance. +

+
+ 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. + + +

+ Invoked on every instance before it is returned from the pool. +

+
+ The instance to be activated. +
+ + + Uninitialize an instance to be returned to the pool. + + +

+ Invoked on every instance when it is returned to the pool. +

+
+ The instance returned to the pool. +
+ + + Base class for all pooling exceptions. + + Federico Spinazzi + + + + 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. + + + + + Implementation of IProxyMethodBuilder that delegates method calls to the base class. + + Bruno Baia + + + + 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 . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Builds a proxy type using composition. + + + + In order for this builder to work, the target must implement + one or more interfaces. + + + Aleksandar Seovic + Bruno Baia + + + + Target instance calls should be delegated to. + + + + + Creates a new instance of the + class. + + + + + Creates a proxy that delegates calls to an instance of the + target object. + + +

+ Only interfaces can be proxied using composition, so the target + must implement one or more interfaces. +

+
+ The generated proxy class. + + If the + does not implement any interfaces. + +
+ + + Create an to create interface implementations + + + + + Allows subclasses to generate additional code + + + + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + Deaclares a field that holds the target object instance. + + + The builder to use for code generation. + + + + + Generates the proxy constructor. + + +

+ This implementation creates instance of the target object for delegation + using constructor arguments. +

+
+ The constructor builder to use. + The IL generator to use. + The constructor to delegate the creation to. +
+ + + Gets or sets a value indicating whether interfaces should be implemented explicitly. + + + if they should be; otherwise, . + + + + + Allows easy access to existing and creation of new dynamic proxies. + + Aleksandar Seovic + Bruno Baia + + + + The name of the assembly that defines proxy types created. + + + + + The attributes of the proxy type to generate. + + + + + Creates an appropriate type builder. + + The proxy type name. + The type to extends if provided. + The type builder to use. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + This attribute can be used to mark interfaces that should not be proxied + + Bruno Baia + + + + Creates a new instance of the + class. + + + + + Implementation of IProxyMethodBuilder that delegates method calls to target object. + + Bruno Baia + + + + 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 . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Base class for dynamic members. + + Aleksandar Seovic + + + + Method attributes constant. + + + + + Sets up target instance for invocation. + + IL generator to use. + Type of target instance. + + + + Sets up invocation argument. + + IL generator to use. + Argument type. + Argument position. + + + + Generates method invocation code. + + IL generator to use. + Flag specifying whether method is static. + Flag specifying whether method is on the value type. + Method to invoke. + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Defines constructors that dynamic constructor class has to implement. + + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Safe wrapper for the dynamic constructor. + + + will attempt to use dynamic + constructor if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached constructor info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe constructor wrapper. + + Constructor to wrap. + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Factory class for dynamic constructors. + + Aleksandar Seovic + + + + Creates dynamic constructor instance for the specified . + + Constructor info to create dynamic constructor for. + Dynamic constructor for the specified . + + + + Defines methods that dynamic field class has to implement. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Safe wrapper for the dynamic field. + + + will attempt to use dynamic + field if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached fieldInfo or creates a new entry, if none is found. + + + + + Creates a new instance of the safe field wrapper. + + Field to wrap. + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Holds cached Getter/Setter delegates for a Field + + + + + Factory class for dynamic fields. + + Aleksandar Seovic + + + + Creates dynamic field instance for the specified . + + Field info to create dynamic field for. + Dynamic field for the specified . + + + + Defines methods that dynamic indexer class has to implement. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer arguments. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer arguments. + + + A new indexer value. + + + + + Defines methods that dynamic method class has to implement. + + + + + Invokes dynamic method on the specified target object. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Safe wrapper for the dynamic method. + + + will attempt to use dynamic + method if possible, but it will fall back to standard + reflection if necessary. + + + + + Creates a new instance of the safe method wrapper. + + Method to wrap. + + + + Invokes dynamic method. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Gets the class, that declares this method + + + + + Factory class for dynamic methods. + + Aleksandar Seovic + + + + Creates dynamic method instance for the specified . + + Method info to create dynamic method for. + Dynamic method for the specified . + + + + Defines methods that dynamic property class has to implement. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Safe wrapper for the dynamic property. + + + will attempt to use dynamic + property if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached property info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe property wrapper. + + Property to wrap. + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Internal PropertyInfo accessor. + + + + + Holds cached Getter/Setter delegates for a Property + + + + + Factory class for dynamic properties. + + Aleksandar Seovic + + + + Creates safe dynamic property instance for the specified . + + +

This factory method will create a dynamic property with a "safe" wrapper.

+

Safe wrapper will attempt to use generated dynamic property if possible, + but it will fall back to standard reflection if necessary.

+
+ Property info to create dynamic property for. + Safe dynamic property for the specified . + +
+ + + Creates dynamic property instance for the specified . + + Property info to create dynamic property for. + Dynamic property for the specified . + + + + Represents a Get method + + the target instance when calling an instance method + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + Represents an Indexer Get method + + the target instance when calling an instance method + + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + + Represents a method + + the target instance when calling an instance method + arguments to be passed to the method + the value return by the method. null when calling a void method + + + + Represents a constructor + + arguments to be passed to the method + the new object instance + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Allows easy access to existing and creation of new dynamic relection members. + + Aleksandar Seovic + + + + The name of the assembly that defines reflection types created. + + + + + The attributes of the reflection type to generate. + + + + + Cache for dynamic property types. + + + + + Cache for dynamic field types. + + + + + Cache for dynamic indexer types. + + + + + Cache for dynamic method types. + + + + + Cache for dynamic constructor types. + + + + + Creates an appropriate type builder. + + + The base name to use for the reflection type name. + + The type builder to use. + + + + Returns dynamic property if one exists. + + Property to look up. + callback function that will be called to create the dynamic property + An for the given property info. + + + + Returns dynamic field if one exists. + + Field to look up. + callback function that will be called to create the dynamic field + An for the given field info. + + + + Returns dynamic indexer if one exists. + + Indexer to look up. + callback function that will be called to create the dynamic indexer + An for the given indexer. + + + + Returns dynamic method if one exists. + + Method to look up. + callback function that will be called to create the dynamic method + An for the given method. + + + + Returns dynamic constructor if one exists. + + Constructor to look up. + callback function that will be called to create the dynamic constructor + An for the given constructor. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG mode, per ConditionalAttribute rules. + + + + + Create a new Get method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field + + + + Create a new Set method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field. + + If the field's returns true, the returned method + will throw an when called. + + + + + Create a new Get method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to read the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new Set method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to write the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new method delegate for the specified method using + + the method to create the delegate for + a delegate that can be used to invoke the method. + + + + Creates a new delegate for the specified constructor. + + the constructor to create the delegate for + delegate that can be used to invoke the constructor. + + + + Creates a instance with the highest possible code access security. + + + If allowed by security policy, associates the method with the s declaring type. + Otherwise associates the dynamic method with . + + + + + Delegates a Method(object target, params object[] args) call to the actual underlying method. + + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Converts to an instance of if necessary to + e.g. avoid e.g. double/int cast exceptions. + + + + This method mimics the behavior of the compiler that + automatically performs casts like int to double in "Math.Sqrt(4)".
+ See about implicit, widening type conversions on MSDN - Type Conversion Tables +
+ + Note: is expected to be a value type! + +
+
+ + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Indicates that an annotated class is a "Controller" (e.g. a MVC Controller). + + + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Thomas Trageser + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + + + + Indicates that an annotated class is a "Repository" (or "DAO"). + + + A class with this attribute is eligible for Spring DataAccessException translation. A class + with the Repository attribute is also clarified as to its role in the overall application + architecture for the purpose of tools, aspects, etc. + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Rod Johnson + Jueren Hoeller + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the repository. + + + + Indicates that an annotated class is a "Service" (e.g. a business service facade). + + + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + + + + Implements by using . + + Erich Eichinger + + + + Specifies the contract a strategy must be implement to store and + retrieve data that is specific to the executing thread. + + + All implementations of this interface must treat keys case-sensitive. + + Erich Eichinger + + + + Retrieves an object with the specified . + + The name of the item. + + The object in the current thread's context associated with the + specified or null if no object has been stored previously + + + + + Stores a given object and associates it with the specified . + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + + If the object with the specified is not found, the method does nothing. + + The name of the object to remove. + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + + Acquire/Release protocol, base of many concurrency utilities. + + + +

objects isolate waiting and notification for particular logical + states, resource availability, events, and the like that are shared + across multiple threads.

+ +

Use of s sometimes (but by no means always) adds + flexibility and efficiency compared to the use of plain + .Net monitor methods and locking, and are sometimes (but by no means + always) simpler to program with.

+ +

Used for implementation of a

+
+ + Doug Lea + Federico Spinazzi (.Net) +
+ + Wait (possibly forever) until successful passage. + Fail only upon interuption. Interruptions always result in + `clean' failures. On failure, you can be sure that it has not + been acquired, and that no + corresponding release should be performed. Conversely, + a normal return guarantees that the acquire was successful. + + + + + Potentially enable others to pass. +

+ Because release does not raise exceptions, + it can be used in `finally' clauses without requiring extra + embedded try/catch blocks. But keep in mind that + as with any java method, implementations may + still throw unchecked exceptions such as Error or NullPointerException + when faced with uncontinuable errors. However, these should normally + only be caught by higher-level error handlers. +

+
+
+ + + Wait at most msecs to pass; report whether passed. +

+ The method has best-effort semantics: + The msecs bound cannot + be guaranteed to be a precise upper bound on wait time in Java. + Implementations generally can only attempt to return as soon as possible + after the specified bound. Also, timers in Java do not stop during garbage + collection, so timeouts can occur just because a GC intervened. + So, msecs arguments should be used in + a coarse-grained manner. Further, + implementations cannot always guarantee that this method + will return at all without blocking indefinitely when used in + unintended ways. For example, deadlocks may be encountered + when called in an unintended context. +

+
+ the number of milleseconds to wait + An argument less than or equal to zero means not to wait at all. + However, this may still require + access to a synchronization lock, which can impose unbounded + delay if there is a lot of contention among threads. + + true if acquired +
+ + A latch is a boolean condition that is set at most once, ever. + Once a single release is issued, all acquires will pass. +

+ Sample usage. Here are a set of classes that use + a latch as a start signal for a group of worker threads that + are created and started beforehand, and then later enabled. +

+ + class Worker implements IRunnable { + private readonly Latch startSignal; + Worker(Latch l) + { + startSignal = l; + } + + public void Run() { + startSignal.acquire(); + DoWork(); + } + + void DoWork() { ... } + } + + class Driver { // ... + void Main() { + Latch go = new Latch(); + for (int i = 0; i < N; ++i) // make threads + new Thread(new ThreadStart(new Worker(go)).Start(); + DoSomethingElse(); // don't let run yet + go.Release(); // let all threads proceed + } + } + +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + can acquire ? + + + + + Method mainly used by clients who are trying to get the latch + + + + Wait at most msecs millisconds for a permit + + + + Enable all current and future acquires to pass + + + + + An abstraction to safely store "ThreadStatic" data. + + + By default, is used to store thread-specific data. + You may switch the storage strategy by calling .

+ NOTE: Access to the underlying storage is not synchronized for performance reasons. + You should call only once at application startup! + + Erich Eichinger + + +

+ Holds the current strategy. + + + Access to this variable is not synchronized on purpose for performance reasons. + Setting a different strategy should happen only once + at application startup. + +
+ + + Set the new strategy. + + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + +

Base class for counting semaphores based on Semaphore implementation + from Doug Lea.

+
+ + +

Conceptually, a semaphore + maintains a set of permits. Each acquire() blocks if + necessary until a permit is available, and then takes it.

+ +

Each release adds a permit. However, no actual permit objects are used; + the Semaphore just keeps a count of the number available + and acts accordingly.

+ +

A semaphore initialized to 1 can serve as a mutual exclusion lock.

+ + Used for implementation of a +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + current number of available permits + + + + +

Create a Semaphore with the given initial number of permits.

+

Using a seed of 1 makes the semaphore act as a mutual + exclusion lock.

+ +

Negative seeds are also allowed, + in which case no acquires will proceed until the number of + releases has pushed the number of permits past 0.

+
+
+ + + Release a permit + + + + + Acquire a permit + + + + + Wait at most msecs millisconds for a permit + + number of ms to wait + true if aquired + + + Release N permits. release(n) is + equivalent in effect to: +
+            for (int i = 0; i < n; ++i) release();
+            
+ But may be more efficient in some semaphore implementations. +
+ if n is negative. + + +
+ + Return the current number of available permits. + Returns an accurate, but possibly unstable value, + that may change immediately after returning. + + + + + Utility class to use an with the + C# using () {} idiom + + + + + Creates a new trying to the given + + + the to be held + + + + Creates a new trying to the given + + + the to be held + millisecond to try to acquire the lock + + + + Releases the held + + + + + initializes and acquire access to the + + + + + + Implements by using a hashtable. + + Erich Eichinger + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + Thrown by synchronization classes that report + timeouts via exceptions. The exception is treated + as a form (subclass) of InterruptedException. This both + simplifies handling, and conceptually reflects the fact that + timed-out operations are artificially interrupted by timers. + + + + + The approximate time that the operation lasted before + this timeout exception was thrown. + + + + + + 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. + + + 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. + + + + + Override of GetObjectData to allow for private serialization + + serialization info + streaming context + + + Constructs a TimeoutException with given duration value. + + + + + Constructs a TimeoutException with the + specified duration value and detail message. + + + + + Gets the approximate time that the operation lasted before + this timeout exception was thrown. + + + + A TimeoutSync is an adaptor class that transforms all + calls to acquire to instead invoke attempt with a predetermined + timeout value. + + + + + + the adapted sync + + + + + timeout value + + + + Create a TimeoutSync using the given Sync object, and + using the given timeout value for all calls to acquire. + + + + + Try to acquire the sync before the timeout + + In case a time out occurred + + + + + + + + + + + + + + Support to account for differences between java nad .NET: +
    +
+
+
+ + + .NET threads have not a method to check if they have been interrupted. + Moreover, differently from java threads, when entering locked + blocks, Monitor, Sleep, SpinWait and so on, a + will be raised by the runtime. +

Spring.Threading classes usually call this method before entering a lock block, to mirror java code +

Usually this is non issue because the same exception will be raised entering the monitor + associated with the lock () +

+
+ if the thread has been interrupted +
+ + + Normalize the given so that + is is comparable with . + + Date. + + + + + + + + + the difference between millisecodns of the first and second date + + + + Returns the number of nanoseconds for the current value of + + Current number of nanoseconds + + + + Returns the number of nano seconds represented by the + + to use + Number of nano seconds for + + + + Returns a representing the number of nanoseconds passed in via . + + Number of nanoseconds. + representing the number of nanoseconds passed in. + + + + Placeholder for java.lang.System.currentTimeMillis + + The current machine time in milliseconds + + + + Has been interrupted this thread + + + + + Miscellaneous generic collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Various utility methods relating to the manipulation of arrays. + + Aleksandar Seovic + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Use this sort method instead of to overcome + bugs in Mono. + + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Tests equality of two single-dimensional arrays by checking each element + for equality. + + The first array to be checked. + The second array to be checked. + True if arrays are the same, false otherwise. + + + + Returns hash code for an array that is generated based on the elements. + + + Hash code returned by this method is guaranteed to be the same for + arrays with equal elements. + + + Array to calculate hash code for. + + + A hash code for the specified array. + + + + + Returns string representation of an array. + + + Array to return as a string. + + + String representation of the specified . + + + + + Concatenates 2 arrays of compatible element types + + + If either of the arguments is null, the other array is returned as the result. + The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. + + + + + Assertion utility methods that simplify things such as argument checks. + + +

+ Not intended to be used directly by applications. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Checks, whether may be invoked on . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the method to test for + + if is null + + + if it is not possible to invoke on + + + + + checks, whether supports the methods of . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the type to test for + + if is null + + + if it is not possible to invoke methods of + type on + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + If the supplied is . + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is . + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + An arbitrary message that will be passed to any thrown . + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is , contains no elements or only null elements. + + The array or collection to check. + The argument name. + + If the supplied is , + contains no elements or only null elements. + + + + + Checks whether the specified can be cast + into the . + + + The argument to check. + + + The name of the argument to check. + + + The required type for the argument. + + + An arbitrary message that will be passed to any thrown + . + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + The exception message to use if the assertion fails. + + if expression is false + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + + if expression is false + + + + + Assert a bool expression, throwing InvalidOperationException + if the expression is false. + + a boolean expression. + The exception message to use if the assertion fails + if expression is false + + + + Creates a new instance of the class. + + +

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

+
+
+ + + General utility methods for working with annotations + + + + + Find a single Attribute of the type 'attributeType' from the supplied class, + traversing it interfaces and super classes if no attribute can be found on the + class iteslf. + + + This method explicitly handles class-level attributes which are not declared as + inherited as well as attributes on interfaces. + + The class to look for attributes on . + Type of the attribibute to look for. + the attribute of the given type found, or null + + + + Get all attribute properties with values for a specific attribute type + + attribute to check against + collection of all properties with values + + + + Get the default name value of an attribute and a specific property + + attribute from where to get the default value + property to get the default value + + + + + Miscellaneous collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Adds the specified to the specified . + + The collection to add the element to. + The object to add to the collection. + + + + Adds the specified to the specified . + + The enumerable to add the element to. + The object to add to the collection. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Converts an instance to an instance. + + The instance to be converted. + An instance in which its elements are the elements of the instance. + if the is null. + + + + Copies the elements of the to a + new array of the specified element type. + + The instance to be converted. + The element of the destination array to create and copy elements to + An array of the specified element type containing copies of the elements of the . + + + + Returns the first element contained in both, and . + + The implementation assumes that <<< + the source enumerable. may be null + the list of candidates to match against elements. may be null + the first element found in both enumerables or null + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a value of the given type found, or null if none. + If more than one value of the given type is found + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a collection of matching values of the given type found, empty if none found, or null if the input collection was null. + + + + Find a value of one of the given types in the given Collection, + searching the Collection for a value of the first type, then + searching for a value of the second type, etc. + + The collection to search. + The types to look for, in prioritized order. + a value of the given types found, or null if none + If more than one value of the given type is found + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified dictionary is null empty. + + The dictionary to check. + + true if the specified dictionary is empty or null; otherwise, false. + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A callback method used for comparing to items. + + + + the first object to compare + the second object to compare + Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. + + + + + + Utility class containing helper methods for object comparison. + + Aleksandar Seovic + + + Compares two objects. + First object. + Second object. + + 0, if objects are equal; + less than zero, if the first object is smaller than the second one; + greater than zero, if the first object is greater than the second one. + + + + Utility class for .NET configuration files management. + + Aleksandar Seovic + + + + Avoid BeforeFieldInit pitfall + + + + + Parses the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. + Object created by a corresponding . +
+ + + Refresh the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. +
+ + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Configuration exception. + + + + Creates the configuration exception. + + Configuration exception. + + + + Determines whether the specified exception is configuration exception. + + The exception to check. + + true if the specified exception is configuration exception; otherwise, false. + + + + + Returns the line number of the specified node. + + Node to get the line number for. + The line number of the specified node. + + + + Returns the name of the file specified node is defined in. + + Node to get the file name for. + The name of the file specified node is defined in. + + + + Sets the current to be used by . + + + íf implements , this method invokes + on the new configSystem to chain them.
+ Note, that this method requires reflection on internals of +
+ the configuration system to set + bypasses the check if the current system has already been initialized + the previous config system, if any +
+ + + Resets the global configuration system instance. Use for unit testing only! + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Gets a string specifying the file/resource name related to the configuration details. + + + + + Gets an integer specifying the line number related to the configuration details. + + + + + Gets an integer specifying the line position related to the configuration details. + + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + An implementation, who's elements retain information + about their location in the original XML text document the were read from. + + + When loading a document, the used must implement . + Typical XmlReader implementations like support this interface. + + Erich Eichinger + + + + Overridden to create a retaining the current + text position information. + + + + + Overridden to create a retaining the current + text position information. + + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store null as their property. + + The XML source + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store as their property. + + + The new XmlNode or null if no more nodes exist. + + the name of the resource + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store null as their property. + + + The new XmlNode or null if no more nodes exist. + + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Get info about the current text position during loading a document. + Outside loading a document, the properties of + will always be null. + + + + + Holds the current text position during loading a document + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + Collects information on the constructor to use to create the instance and the argument instances to pass into the + constructor. + + + + + Initializes a new instance of the class. + + The constructor info. + The arg instances. + + + + Gets the constructor info. + + The constructor info. + + + + Gets the arg instances. + + The arg instances. + + + + Discovers the attributes of a + and provides access to the + s metadata. + + Rick Evans + + + + The method name associated with a delegate invocation. + + + + + Creates a new instance of the + class. + + + The event used to extract the delegate + from. + + + if the supplied is + . + + + + + Creates a new instance of the + class. + + + The delegate . + + + If the supplied is not a subclass of the + class, or is . + + + + + Checks to see if the method encapsulated by the supplied method + metadata is compatible with the method signature associated with + this delegate type. + + The method to be checked. + + if the method signature is compatible with + the signature of this delegate; if not, or + if the supplied parameter is + . + + + + + Gets the s of the parameters of the + method signature associated with this delegate type. + + +

+ This method will never return ; the returned + array may be empty, but it most certainly + will not be . +

+
+ + A array of the parameter + s; or the + array if the method signature has no parameters. + +
+ + + Gets the return of the + method signature associated with this delegate type. + + The return . + + + + Gets the metadata about the method signature associated + with this delegate type. + + + The metadata about the method signature associated + with this delegate type. + + + + + Determines whether the supplied + is a type. + + + The to be checked. + + + if the supplied + is a ; + if not or the supplied + is . + + + + + Checks if the signature of the supplied + is compatible with the signature expected by the supplied + . + + The event to be checked against. + + The method signature to check for compatibility. + + + if the signature of the supplied + is compatible with the signature + expected by the supplied ; + if not or either of the supplied + parameters is . + + + + + + The of the delegate. + + + + + Use this class for obtaining instances for dynamic code generation. + + +

+ The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. +

+ + Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. + +
+ +

The following excerpt from demonstrates usage:

+ + public class DynamicProxyManager + { + public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; + + public static TypeBuilder CreateTypeBuilder(string name, Type baseType) + { + // Generates type name + string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); + ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); + return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); + } + } + +
+ Erich Eichinger + + + +
+ + + prevent instantiation + + + + + Returns the for the dynamic module within the specified assembly. + + + If the assembly does not exist yet, it will be created.
+ This factory caches any dynamic assembly it creates - calling GetModule() twice with + the same name will *not* create 2 distinct modules! +
+ The assembly-name of the module to be returned + the that can be used to define new types within the specified assembly +
+ + + Persists the specified dynamic assembly to the file-system + + the name of the dynamic assembly to persist + + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + Removes all registered s. + + + + + A utility class for raising events in a generic and consistent fashion. + + Rick Evans + + + + Create a new EventRaiser instance + + + + + Raises the event encapsulated by the supplied + , passing the supplied + to the event. + + The event to be raised. + The arguments to the event. + a map of sink/exception entries that occurred during event raising + + + + Invokes the supplied , passing the supplied + to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Raises events defensively. + + +

+ Raising events defensively means that as the raised event is passed to each handler, + any thrown by a handler will be caught and silently + ignored. +

+
+ Rick Evans +
+ + + Defensively invokes the supplied , passing the + supplied to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Implement this interface to create your own, delegating + and set them using + + + + + + + + + + + A strategy for handling errors. This is especially useful for handling + errors that occur during asynchronous execution as in such cases it may not be + possible to throw the error to the original caller. + + Mark Fisher + Mark Pollack (.NET) + + + + Handles the error. + + The exception. + + + + Utility methods for IO handling + + + + + Copies one stream into another. + (Don't forget to call on the destination stream!) + + + Does not close the input stream! + + + + + Reads a stream into a byte array. + + + Does not close the input stream! + + + + + Various utility methods relating to numbers. + + +

+ Mainly for internal use within the framework. +

+
+ Aleksandar Seovic +
+ + + Determines whether the supplied is an integer. + + The object to check. + + if the supplied is an integer. + + + + + Determines whether the supplied is a decimal number. + + The object to check. + + if the supplied is a decimal number. + + + + + Determines whether the supplied is of numeric type. + + The object to check. + + true if the specified object is of numeric type; otherwise, false. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to a number. + + The object to check. + + true if the specified object is decimal number; otherwise, false. + + + + + Is the supplied equal to zero (0)? + + The number to check. + + id the supplied is equal to zero (0). + + + + + Negates the supplied . + + The number to negate. + The supplied negated. + + If the supplied is not a supported numeric type. + + + + + Returns the bitwise not (~) of the supplied . + + The number. + The value of ~. + + If the supplied is not a supported numeric type. + + + + + Bitwise ANDs (&) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise ORs (|) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise XORs (^) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Adds the specified numbers. + + The first number. + The second number. + + + + Subtracts the specified numbers. + + The first number. + The second number. + + + + Multiplies the specified numbers. + + The first number. + The second number. + + + + Divides the specified numbers. + + The first number. + The second number. + + + + Calculates remainder for the specified numbers. + + The first number (dividend). + The second number (divisor). + + + + Raises first number to the power of the second one. + + The first number. + The second number. + + + + Coerces the types so they can be compared. + + The right. + The left. + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Helper methods with regard to objects, types, properties, etc. + + +

+ Not intended to be used directly by applications. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The instance for this class. + + + + + An empty object array. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Instantiates the type using the assembly specified to load the type. + + This is a convenience in the case of needing to instantiate a type but not + wanting to specify in the string the version, culture and public key token. + The assembly. + Name of the type. + + + If the or is + + + If cannot load the type from the assembly or the call to InstantiateType(Type) fails. + + + + + Convenience method to instantiate a using + its no-arg constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The to instantiate* + + A new instance of the . + + If the is + + + If the is an abstract class, an interface, + an open generic type or does not have a public no-argument constructor. + +
+ + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. + + + + + Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains + open generic type parameters. + + The type. + + + + Convenience method to instantiate a using + the given constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The constructor to use for the instantiation. + + + The arguments to be passed to the constructor. + + A new instance. + + If the is + + + If the 's declaring type is an abstract class, + an interface, an open generic type or does not have a public no-argument constructor. + +
+ + + Checks whether the supplied is not a transparent proxy and is + assignable to the supplied . + + +

+ Neccessary when dealing with server-activated remote objects, because the + object is of the type TransparentProxy and regular is testing for assignable + types does not work. +

+

+ Transparent proxy instances always return when tested + with the 'is' operator (C#). This method only checks if the object + is assignable to the type if it is not a transparent proxy. +

+
+ The target to be checked. + The value that should be assigned to the type. + + if the supplied is not a + transparent proxy and is assignable to the supplied . + +
+ + + Determine if the given is assignable from the + given value, assuming setting by reflection and taking care of transparent proxies. + + +

+ Considers primitive wrapper classes as assignable to the + corresponding primitive types. +

+

+ For example used in an object factory's constructor resolution. +

+
+ The target . + The value that should be assigned to the type. + True if the type is assignable from the value. +
+ + + Check if the given represents a + "simple" property, + i.e. a primitive, a , a + , or a corresponding array. + + +

+ Used to determine properties to check for a "simple" dependency-check. +

+
+ + The to check. + +
+ + + Check if the given class represents a primitive array, + i.e. boolean, byte, char, short, int, long, float, or double. + + + + + Determines whether the specified array is null or empty. + + The array to check. + + true if the specified array is null empty; otherwise, false. + + + + + Determine if the given objects are equal, returning + if both are respectively + if only one is . + + The first object to compare. + The second object to compare. + + if the given objects are equal. + + + + + Return as hash code for the given object; typically the value of + {@link Object#hashCode()}. If the object is an array, + this method will delegate to any of the nullSafeHashCode + methods for arrays in this class. If the object is null, + this method returns 0. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + If the supplied is . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + If the supplied is . + + + + + Gets the qualified name of the given method, consisting of + fully qualified interface/class name + "." method name. + + The method. + qualified name of the method. + + + + Return a String representation of an object's overall identity. + + The object (may be null). + The object's identity as String representation, + or an empty String if the object was null + + + + + Gets a hex String form of an object's identity hash code. + + The obj. + The object's identity code in hex notation + + + + Support matching of file system paths in a manner similar to that of the + NAnt FileSet. + + +

+ Any (back)slashes are converted to forward slashes. +

+
+ + + // true + PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); + PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); + PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); + // false + PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); + + + Federico Spinazzi +
+ + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + should the match consider the case + + if the path is matched by the pattern; + otherwise . + + + + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + + if the path is matched by the pattern; + otherwise . + + + + + Replaces back(slashes) with forward slashes. + + + The path or the pattern to modify. + + A forward-slashed string. + + + + Helper method to convert a NAnt-like pattern into the + appropriate pattern for a regular expression. + + The NAnt-like pattern. + A regex-compatible pattern. + + + + Creates a new instance of the class. + + +

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

+
+
+ + Utility methods for simple pattern matching, in particular for + Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. + + Juergen Hoeller + Mark Pollack + + + Match a String against the given pattern, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the pattern to match against + + the String to match + + whether the String matches the given pattern + + + + Match a String against the given patterns, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the patterns to match against + + the String to match + + whether the String matches any of the given patterns + + + + + An implementation of the Java Properties class. + + + For the complete syntax see java.util.Properties JavaDoc. + This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. + + + key1 = value + key2: + key3 + + will result in the name/value pairs: + + key1:="value" + key2:=string.Empty + key3:=<null> + + note, that to specify a null value, the key must not be followed by any character except newline. + + + Simon White + + + + Creates an empty property list with no default values. + + + + + Creates a property list with the specified initial properties. + + The initial properties. + + + + Reads a property list (key and element pairs) from the input stream. + + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + The text reader to load from. + + + + Reads a property list (key and element pairs) from the input stream. + + the dictionary to put it in + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + the dictionary to put it in + The text reader to load from. + + + + Strips whitespace from the front of the specified string. + + The string. + The string with all leading whitespace removed. + + + + Splits the specified string into a key / value pair. + + The line to split. + An array containing the key / value pair. + + + + Searches for the property with the specified key in this property list. + + The key. + The property, or null if the key was not found. + + + + Searches for the property with the specified key in this property list. + + The key. + + The default value to be returned if the key is not found. + + The property, or the default value. + + + + Writes this property list out to the specified stream. + + The stream to write to. + + + + Sets the specified property key / value pair. + + The key. + The value. + + + + Writes the properties in this instance out to the supplied stream. + + The stream to write to. + Arbitrary header information. + + + + Removes the key / value pair identified by the supplied key. + + + The key identifying the key / value pair to be removed. + + + + + Adds the specified key / object pair to this collection. + + The key. + The value. + + + + Adds the specified key / object pair to this collection. + + + + + Various reflection related methods that are missing from the standard library. + + Rod Johnson + Juergen Hoeller + Aleksandar Seovic (.NET) + Stan Dvoychenko (.NET) + Bruno Baia (.NET) + + + + Convenience value that will + match all private and public, static and instance members on a class + in a case inSenSItivE fashion. + + + + + Avoid BeforeFieldInit problem + + + + + Checks, if the specified type is a nullable + + + + + Returns signature for the specified , method name and argument + s. + + The the method is in. + The method name. + + The argument s. + + The method signature. + + + + Returns method for the specified , method + name and argument + s. + + + Searches with BindingFlags + When dealing with interface methods, you probable want to 'normalize' method references by calling + . + + + + The target to find the method on. + + The method to find. + + The argument s. May be + if the method has no arguments. + + The target method. + + + + + Returns method for the specified , method + name and argument + s. + + + Searches with BindingFlags + When dealing with interface methods, you probable want to 'normalize' method references by calling + . + + + + The target to find the method on. + + The method to find. + + The argument s. May be + if the method has no arguments. + + Number of Generic Arguments in the method + The target method. + + + + + Resolves a given to the representing the actual implementation. + + + see article How To Get an Explicit Interface Implementation Method. + + a + the type to lookup + the representing the actual implementation method of the specified + + + + Returns an array of parameter s for the specified method + or constructor. + + The method (or constructor). + An array containing the parameter s. + + If is . + + + + + Returns an array of parameter s for the + specified parameter info array. + + The parameter info array. + An array containing parameter s. + + If is or any of the + elements is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The method. + An array containing the parameter names. + + If is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The parameter info array. + An array containing parameter names. + + If is or any of the + elements is . + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the type of method (used for exception reporting only) + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of constructors, selects the constructor having an exact match on the given ' types. + + the list of constructors to choose from + the arguments to the method + the constructor matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + Packages arguments into argument list containing parameter array as a last argument. + + Argument vaklues to package. + Total number of oarameters. + Type of the param array element. + Packaged arguments. + + + + Convenience method to convert an interface + to a array that contains + all the interfaces inherited and the specified interface. + + The interface to convert. + An array of interface s. + + If the specified is not an interface. + + + If is . + + + + + Is the supplied the default indexer for the + supplied ? + + + The name of the property on the supplied to be checked. + + + The to be checked. + + + if the supplied is the + default indexer for the supplied . + + + If the supplied is . + + + + + Is the supplied declared on one of these interfaces? + + The method to check. + The array of interfaces we want to check. + + if the method is declared on one of these interfaces. + + + If any of the s specified is not an interface. + + + If or any of the specified interfaces is + . + + + + + Returns the default value for the specified + + +

+ Follows the standard .NET conventions for default values where + relevant; for example, all numeric types default to the value + 0. +

+
+ + The to return default value for. + + + The default value for the specified . + + + If the supplied is an enumerated type that + has no values. + +
+ + + Returns an array consisting of the default values for the supplied + . + + + The array of s to return default values for. + + + An array consisting of the default values for the supplied + . + + + If any of the elements in the supplied + array is an enumerated type that has no values. + + + + + + Checks that the parameter s of the + supplied match the parameter + s of the supplied + . + + The method to be checked. + + The array of parameter s to check against. + + + if the parameter s + match. + + + + + Returns an array containing the s of the + objects in the supplied array. + + + The objects array for which the corresponding s + are needed. + + + An array containing the s of the objects + in the supplied array; this array will be empty (but not + if the supplied + is null or has no elements. + + +

+ [C#]
+ Given an array containing the following objects, + [83, "Foo", new object ()], the + array returned from this method call would consist of the following + elements... + [Int32, String, Object]. +

+
+
+ + + Given the return its representation as + it would appear in the source code files. + + + Largely intended to handle generic types where .ToString() will typically return: + "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]" + and this method will instead return: + "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>" + + The type. + Friendly string representing the Type + + + + Does the given and/or it's superclasses + have at least one or more methods with the given name (with any + argument types)? + + +

+ Includes non-public methods in the methods searched. +

+
+ + The to be checked. + + + The name of the method to be searched for. Case inSenSItivE. + + + if the given or / and it's + superclasses have at least one or more methods (with any argument types); + if not, or either of the parameters is . + +
+ + + Within , counts the number of overloads for the method with the given (case-insensitive!) + + The type to be searched + the name of the method for which overloads shall be counted + The number of overloads for method within type + + + + Creates a . + + +

+ Note that if a non- + is supplied, any read write properties exposed by the + will be used to overwrite values that may have been passed in via the + . That is, the will be used + to initialize the custom attribute, and then any read-write properties on the + will be plugged in. +

+
+ + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + If the parameter is . + + + If the parameter is not a + that derives from the class. + + +
+ + + Creates a . + + + The desired . + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + + + Creates a . + + + The source attribute to copy properties from. + + A custom attribute builder. + + If the supplied is + . + + + + + Creates a . + + + The desired . + + A custom attribute builder. + + + + Creates a . + + + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + A custom attribute builder. + + + + Creates a . + + + The to create + the custom attribute builder from. + + A custom attribute builder. + + + + Calculates and returns the list of attributes that apply to the + specified type or method. + + The type or method to find attributes for. + + A list of custom attributes (CustomAttributeData or Attribute instances) + that should be applied to type or method. + + + + + Tries to find matching methods in the specified + for each method in the supplied list. + + + The to look for matching methods in. + + The methods to match. + + A flag that specifies whether to throw an exception if a matching + method is not found. + + A list of the matched methods. + + If either of the or + parameters are . + + + + + Returns the of the supplied + . + + +

+ If the is a + instance, the return value of this method call with be the + parameter cast to a + . If the is + anything other than a , the return value + will be the result of invoking the 's + method. +

+
+ + A or instance. + + + The argument if it is a + or the result of invoking + on the argument if it + is an . + + + If the is . + +
+ + + Unwraps the supplied + and returns the inner exception preserving the stack trace. + + + The to unwrap. + + The unwrapped exception. + + + + Is the supplied can be accessed outside the assembly ? + + The type to check. + + if the type can be accessed outside the assembly; + Otherwise . + + + + + Determines whether the specified type is nullable. + + The type. + + true if the specified type is ullable]; otherwise, false. + + + + + Is the supplied can be accessed + from the supplied friendly assembly ? + + The type to check. + The friendly assembly name. + + if the type can be accessed + from the supplied friendly assembly; Otherwise . + + + + + Gets all of the interfaces implemented by + the specified . + + + The object to get the interfaces of. + + + All of the interfaces implemented by the + . + + + + + Returns the explicit that is the root cause of an exception. + + + If the InnerException property of the current exception is a null reference + or a , returns the current exception. + + The last exception thrown. + + The first explicit exception thrown in a chain of exceptions. + + + + + Copies all fields from one object to another. + + + The types of both objects must be related. This means, that either of the following is true: + + fromObject.GetType() == toObject.GetType() + fromObject.GetType() is derived from toObject.GetType() + toObject.GetType() is derived from fromObject.GetType() + + + The source object + The object, who's fields will be populated with values from the source object + If the object's types are not related + + + + Convenience method that uses reflection to return the value of a non-public field of a given object. + + Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. + The instance of the object from which to retrieve the field value. + Name of the field on the object from which to retrieve the value. + + + + + Convenience method that uses reflection to set the value of a non-public field of a given object. + + Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing. + The instance of the object from which to set the field value. + Name of the field on the object to which to set the value. + The field value to set. + + + + Creates a . + + Bruno Baia + + + + Creates a new instance of the + class. + + The custom attribute type. + + + + Creates a new instance of the + class. + + The custom attribute type. + The custom attribute constructor arguments. + + + + Adds the specified values to the constructor argument list + used to create the custom attribute. + + An array of argument values. + + + + Adds a property value to the custom attribute. + + The property name. + The property value. + + + + Creates the . + + The created . + + + + Utility class to be used from within this assembly for executing security critical code + NEVER EVER MAKE THIS PUBLIC! + + Erich Eichinger + + + + Miscellaneous utility methods. + + +

+ Mainly for internal use within the framework. +

+
+ Rod Johnson + Juergen Hoeller + Keith Donald + Aleksandar Seovic (.NET) + Mark Pollack (.NET) + Rick Evans (.NET) + Erich Eichinger (.NET) +
+ + + The string that signals the start of an Ant-style expression. + + + + + The string that signals the end of an Ant-style expression. + + + + + An empty array of instances. + + + + + Creates a new instance of the class. + + +

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

+
+
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + An array of the tokens. +
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + + + Pairs of quote characters. within a pair of quotes are ignored + + An array of the tokens. +
+ + + Convert a CSV list into an array of s. + + + Values may also be quoted using doublequotes. + + A CSV list. + + An array of s, or the empty array + if is . + + + + + Take a which is a delimited list + and convert it to a array. + + +

+ If the supplied is a + or zero-length string, then a single element + array composed of the supplied + will be + eturned. If the supplied + is , then an empty, + zero-length array will be returned. +

+
+ + The to be parsed. + + + The delimeter (this will not be returned). Note that only the first + character of the supplied is used. + + + An array of the tokens in the list. + +
+ + + Convenience method to return an + as a delimited + (e.g. CSV) . + + + The to parse. + + + The delimiter to use (probably a ','). + + The delimited string representation. + + + + Convenience method to return an + as a CSV + . + + + The to display. + + The delimited string representation. + + + + Convenience method to return an array as a CSV + . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + + + Convenience method to return a + array as a delimited (e.g. CSV) . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + The delimiter to use (probably a ','). + + + + Checks if a string has length. + + The string to check, may be . + + + if the string has length and is not + . + + + + StringUtils.HasLength(null) = false + StringUtils.HasLength("") = false + StringUtils.HasLength(" ") = true + StringUtils.HasLength("Hello") = true + + + + + + Checks if a has text. + + +

+ More specifically, returns if the string is + not , it's is > + zero (0), and it has at least one non-whitespace character. +

+
+ + The string to check, may be . + + + if the is not + , + > zero (0), and does not consist + solely of whitespace. + + + + StringUtils.HasText(null) = false + StringUtils.HasText("") = false + StringUtils.HasText(" ") = false + StringUtils.HasText("12345") = true + StringUtils.HasText(" 12345 ") = true + + +
+ + + Checks if a is + or an empty string. + + +

+ More specifically, returns if the string is + , it's is equal + to zero (0), or it is composed entirely of whitespace + characters. +

+
+ + The string to check, may (obviously) be . + + + if the is + , has a length equal to zero (0), or + is composed entirely of whitespace characters. + + + + StringUtils.IsNullOrEmpty(null) = true + StringUtils.IsNullOrEmpty("") = true + StringUtils.IsNullOrEmpty(" ") = true + StringUtils.IsNullOrEmpty("12345") = false + StringUtils.IsNullOrEmpty(" 12345 ") = false + + +
+ + + Returns , if it contains non-whitespaces. null otherwise. + + + + + Strips first and last character off the string. + + The string to strip. + The stripped string. + + + + Returns a list of Ant-style expressions from the specified text. + + The text to inspect. + + A list of expressions that exist in the specified text. + + + If any of the expressions in the supplied + is empty (${}). + + + + + Replaces Ant-style expression placeholder with expression value. + + +

+ +

+
+ The string to set the value in. + The name of the expression to set. + The expression value. + + A new string with the expression value set; the + value if the supplied + is , has a length + equal to zero (0), or is composed entirely of whitespace + characters. + +
+ + + Surrounds (prepends and appends) the string value of the supplied + to the supplied . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The prefix and suffix that respectively will be prepended and + appended to the target . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + The surrounded string. +
+ + + Surrounds (prepends and appends) the string values of the supplied + and to the supplied + . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The value that will be prepended to the . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + + The value that will be appended to the . If this value + is not a value, it's attendant + value will be used. + + The surrounded string. +
+ + + Converts escaped characters (for example "\t") within a string + to their real character. + + The string to convert. + The converted string. + + + + Utility class containing miscellaneous system-level functionality. + + Aleksandar Seovic + + + + Registers assembly resolver that iterates over the + assemblies loaded into the current + in order to find an assembly that cannot be resolved. + + + This method has to be called if you need to serialize dynamically + generated types in transient assemblies, such as Spring AOP proxies, + because standard .NET serialization engine always tries to load + assembly from the disk. + + + + + Returns true if running on Mono + + Tests for the presence of the type Mono.Runtime + + + + Returns true if running on CLR 4.0 under InProc SxS mode + + + + + Gets the thread id for the current thread. Use thread name is available, + otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and + CurrentThread.ManagedThreadId otherwise. + + The thread id. + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Creates a new TextPositionInfo instance. + + + + + Creates a new TextPositionInfo instance, copying values from another instance. + + + + + The filename related to this text position + + + + + The line number related to this text position + + + + + The line position related to this text position + + + + + UniqueKey allows for generating keys unique to a type or particular instance and a partial name, + that can e.g. be used as keys in . + + + // shows usage type-scoped keys + UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); + UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); + + HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; + Assert.AreEqual( "some value unique for class A having key 'myKey'", value); + + HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; + Assert.AreEqual( "some value unique for class B having key 'myKey'", value); + + + + + Initialize a new instance of from its string representation. + See and See for details. + + The string representation of the new instance. + + + + Compares this instance to another. + + + + + Compares this instance to another. + + + + + Returns the hash code for this key. + + + + + + Returns a string representation of this key. + + + + + Creates a new key instance unique to the given instance. + + The instance the key shall be unique to + The partial key to be made unique + + + If is of type + + + + Creates a new key instance unique to the given type. + + The type the key shall be unique to + The partial key to be made unique + + + + Returns a key unique for the given instance. + + The instance the key shall be unique to + The partial key to be made unique + A key formatted as typename[instance-id].partialkey + + + + Returns a key unique for the given type. + + The type the key shall be unique to + The partial key to be made unique + A key formatted as typename.partialkey + + + + XML utility methods. + + Aleksandar Seovic + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + to be used for resolving external references + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + + A non-validating implementation. + + + + + Implementation of that adds error message + to the validation errors container. + + Aleksandar Seovic + + + + Abstract base class that should be extended by all + validation actions. + + +

+ This class implements template Execute method + and defines OnValid and OnInvalid methods that + can be overriden + by specific validation actions. +

+
+ Aleksandar Seovic +
+ + + An action that should be executed after validator is evaluated. + + +

+ This interface allows us to define the actions that should be executed + after validation in a generic fashion. +

+

+ For example, addition of error messages to validation errors collection + is performed by one specific implementation of this interface, . +

+
+ Aleksandar Seovic +
+ + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Initializes a new instance of the class. + + + + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is not valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Evaluates 'when' expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + Error message resource identifier. + Names of the error providers this message should be added to. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Resolves the error message. + + Validation context to resolve message parameters against. + Additional context parameters. + Resolved error message + + + + Resolves the message parameters. + + List of parameters to resolve. + Validation context to resolve parameters against. + Additional context parameters. + Resolved message parameters. + + + + Sets the expressions that should be resolved to error message parameters. + + The expressions that should be resolved to error message parameters. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression that defines the exception to throw when the validator is not valid. + + + + Initializes a new instance of the class with an expression + that defines the exception to throw. + + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the exception to throw + + The throws. + + + + Implementation of that allows you + to define Spring.NET expressions that should be evaluated after + validation. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression to execute when validator is valid. + + The expression to execute when validator is valid. + + + + Gets or sets the expression to execute when validator is not valid. + + The expression to execute when validator is not valid. + + + + Implementation of the custom configuration parser for validator definitions. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parses the validator definition. + + Validator's identifier. + The element to parse. + The parser helper. + Validator object definition. + + + + Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with + the parsed value. + + + + + Parses and potentially registers a validator. + + + Only validators that have id attribute specified are registered + as separate object definitions within application context. + + Validator XML element. + The parser helper. + Validator object definition. + + + + Gets the name of the object type for the specified element. + + The element. + The name of the object type. + + + + Creates an error message action based on the specified message element. + + The message element. + The parser helper. + The error message action definition. + + + + Creates a generic action based on the specified element. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Creates object definition for the validator reference. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Evaluates validator test using condition evaluator. + + Aleksandar Seovic + + + + Base class that defines common properties for all single validators. + + +

+ Custom single validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class that defines common properties for all validators. + + +

+ Custom validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + An object that can validate application-specific objects. + + +

+ The primary motivation for this interface is to enable validation to be + decoupled from the (user) interface and placed in business objects. +

+

+ Application developers writing their own custom + implementations will + typically not implement this interface directly. In most cases, custom + validators woud be better served deriving from the + class, with the + custom validation ligic being implemented in an override of the + + + template method. +

+
+ Aleksandar Seovic + +
+ + + Validates the specified object. + + The object to validate. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Evaluates when expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Processes the error messages. + + Whether validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Gets or sets the validation actions. + + The actions that should be executed after validation. + + + + Creates a new instance of the validator without any + and criteria + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates test object. + + Object to validate. + True if specified object is valid, False otherwise. + + + + Evaluates test expression. + + Root context to use for expression evaluation. + Additional context parameters. + Result of the test expression evaluation, or validation context if test is null. + + + + Gets or sets the test expression. + + The test expression. + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Evaluates the test using condition evaluator. + + +

+ Test can be any logical expression that is supported by the Spring.NET logical + expression evaluation engine, and can use any variables that can be resolved + by the variable resolver used by the validation engine. +

+
+ The object to validate. + + if the supplied is valid. + +
+ + + Perform credit card validations. + + + By default, all supported card types are allowed. You can specify + which credit card type validator should be used by setting + the value of property to a concrete + instance. + + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid credit card number. + + The object to validate. + + if the supplied is valid + credit card number. + + + + + Checks if the is a valid credit card number. + + + The card number to validate. + + + true if the card number is valid. + + + + + Validates card number with the specified validator. + + + Credit card number to validate. + + + true if credit card number is a valid number of credit card type specified. + + + + + Checks for a valid credit card number. + + + Credit Card Number. + + + true if the card number passes the LuhnCheck. + + + + + Credit card type validator to use. + + + Can be concrete implementations of + interface. The following are available implementations: + , , , + . + + + + + CreditCardType interface defines how validation is performed + for one type/brand of credit card. + + + + + Returns true if the card number matches this type of + credit card. + + + The card number, never null. + + + true if the number matches. + + + + + Visa credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a visa number. + + + + + American Express credit card type validation support. + + + + + Indicates, wheter the given credit card number matches an amex number. + + + + + Discover credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a discover number. + + + + + Mastercard credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a mastercard number. + + + + + Perform email validations. + + +

+ This implementation is not guaranteed to catch all possible errors in an + email address. For example, an address like nobody@noplace.nowhere will + pass validator, even though there is no TLD "nowhere". + + Goran Milosavljevic + + +

+ Creates a new instance of the EmailValidator class. + +
+ + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid e-mail address. + + The object to validate. + + if the supplied is valid + e-mail address. + + + + + Regular expression used for validation of object passed to this . + + + + + Validates that the object is valid ISBN-10 or ISBN-13 value. + + Goran Milosavljevic + + + + Creates a new instance of the ISBNValidator class. + + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the ISBN-10 or + ISBN-13 validation rules. + + The object to validate. + + if the supplied is valid ISBN. + + + + + Validates against ISBN-10 or ISBN-13 validation + rules. + + + ISBN string to validate. + + + true if is a valid ISBN-10 or ISBN-13 code. + + + + + ISBN-10 consists of 4 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 1-5 characters, second 1-7, third 1-6, + and fourth is 1 digit or an X. + + + + + ISBN-13 consists of 5 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 978 or 979, the second group is + 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. + + + + + Validates that object matches specified regular expression. + + +

+ The test expression must evaluate to a ; + otherwise, an exception is thrown. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Validates an object. + + Object to validate. + + if the supplied + object is valid. + + + If the supplied is not a + + + + + + The regular expression text to match against. + + The regular expression text. + + + + Gets or sets a value indicating whether to do a partial match instead of a full match. + Default is false. + + + + + The for the regular expression evaluation. + + The regular expression evaluation options. + + + + + Validates that required value is not empty. + + +

+ This validator uses following rules to determine if target value is valid: + + + + + + + + + + + + + + + + + + + + + + + + + +
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
+

+

+ You cannot use this validator to validate any value types other than the ones + specified in the table above. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a variable expression that will be evaluated and the object + obtained as a result of this evaluation will be tested using the rules described + in the class overview of the + class. + + The object to validate. + + if the supplied is valid. + + + + + Validates that the value is valid URL. + + Goran Milosavljevic + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the URL validation rules. + + The object to validate. + + if the supplied is valid. + + + + + Regular expression used for validation of object passed to this . + + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one or more of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

Note, that defaults to true for this validator type!

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class for composite validators + + + + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Gets or sets the child validators. + + The validators. + + + + When set true, shortcircuits evaluation. + + + Setting this property true causes the evaluation process to prematurely abort + if the end result is known. Any remaining child validators will not be considered then. + Setting this value false causes implementations to evaluate all child validators, regardless + of the potentially already known result. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + implementation that supports validating collections. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid for all of the objects in the specified collection. +

+

+ You can specify if you want to validate all of the collection elements regardless of the errors by + setting the property to false. +

+

Note, that defaults to true for this validator type!

+

+ If you set the IncludeElementErrors property to true, + ValidationErrors collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. +

+
+ Damjan Tomic + Aleksandar Seovic +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The bool that determines if all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Validates the specified collection of objects. + If the IncludeElementErrors property was set to true, + collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. + + The collection to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Gets or sets the value that indicates whether to validate all elements of the collection + regardless of the errors. + + This is just an alias for property + + + + Gets or sets the value that indicates whether to capture all the errors of the specific + elements of the collection + + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one and only one of the validators in the Validators collection are valid +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

+ By default, this validator group uses == true semantics. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + An interface that validation errors containers have to implement. + + Aleksandar Seovic + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied error . + + +

+ If there are no errors for the supplied , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all error providers. + + + + + Allows developers to specify which validator should be used + to validate method argument. + + Damjan Tomic + Aleksandar Seovic + + + + Creates an attribute instance. + + + The name of the validator to use (must be defined within + Spring application context). + + + + + Gets the name of the validator to use. + + The name of the validator to use. + + + + A container for validation errors. + + +

+ This class groups validation errors by validator names and allows + access to both the complete errors collection and to the errors for a + certain validator. +

+
+ Aleksandar Seovic + Goran Milosavljevic +
+ + + Default constructor. + + + + + This property is reserved, apply the + + to the class instead. + + + An that describes the + XML representation of the object that is produced by + the + method and consumed by the + + method. + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all providers. + + + + + Thrown by the validation advice if the method parameters validation fails. + + Aleksandar Seovic + + + + Creates a new instance of the ValidationException class. + + + + + Creates a new instance of the ValidationException class with + specified validation errors. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the ValidationException class with the + specified message and validation errors. + + + A message about the exception. + + + Validation errors. + + + + + Creates a new instance of the ValidationException 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 ValidationException class with the + specified message, root cause and validation errors. + + + A message about the exception. + + + The root exception that is being wrapped. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Implements object serialization. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Gets validation errors. + + Validation errors. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + Additional context parameters. + instance to add error messages to. + The object to validate. + True if validation was successful, False otherwise. + + + + Represents a reference to an externally defined validator object + + +

+ This class allows validation groups to reference validators that + are defined outside of the group itself. +

+

+ It also allows users to narrow the context for the referenced validator + by specifying value for the Context property. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + The expression that determines if this validator should be evaluated. + + + + + Creates a new instance of the class. + + + The expression that determines if this validator should be evaluated. + + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Gets or sets the name of the referenced validator. + + The name of the referenced validator. + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + 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. + +
+ + diff --git a/packages/structuremap.2.6.3/lib/StructureMap.pdb b/packages/structuremap.2.6.3/lib/StructureMap.pdb new file mode 100644 index 0000000..83f6872 Binary files /dev/null and b/packages/structuremap.2.6.3/lib/StructureMap.pdb differ diff --git a/packages/xunit.runner.visualstudio.2.0.0/xunit.runner.visualstudio.2.0.0.nupkg b/packages/xunit.runner.visualstudio.2.0.0/xunit.runner.visualstudio.2.0.0.nupkg new file mode 100644 index 0000000..8c2dc31 Binary files /dev/null and b/packages/xunit.runner.visualstudio.2.0.0/xunit.runner.visualstudio.2.0.0.nupkg differ