<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Instance Providers</title><link>https://sourceforge.net/p/easycoverage/wiki/Instance%2520Providers/</link><description>Recent changes to Instance Providers</description><atom:link href="https://sourceforge.net/p/easycoverage/wiki/Instance%20Providers/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 10 Dec 2012 11:13:11 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/easycoverage/wiki/Instance%20Providers/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Instance Providers modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Instance%2520Providers/</link><description>&lt;pre&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Mon, 10 Dec 2012 11:13:11 -0000</pubDate><guid>https://sourceforge.net4f6cb22ee014eda541463b1bd6c3def245b95e44</guid></item><item><title>WikiPage Instance providers modified by Romain Delamare</title><link>https://sourceforge.net/p/easycoverage/wiki/Instance%2520providers/</link><description>Instance providers
==================

Instance providers are used to generate instances on which verifications are performed by checkers. The `IInstanceProvider` interface has two methods, `getInstance` and `canProvide`. `getInstance` returns an instance of the specified class, and `canProvide` checks if the instance provider is able to return an instance of as given class.


Implemented providers
---------------------

- `DefaultInstanceProvider`
This default provider tries to generate instances with the public constructor with the least number of parameters and default values (null for objects).
- `CopyConstructorInstanceProvider`
This provider tries to generate a copy of an instance using the copy constructor pattern. To generate an instance of a class, a reference instance need to be provided.
- `MultipleInstanceProvider`
This provider is used to chain several providers. It has a list of provider and successively tries to generate an instance with each of them.


Writing an instance provider
----------------------------

To write your own instance provider, you only need to implement the `IInstanceProvider` class and its two methods, `getInstance` and `canProvide`.
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Romain Delamare</dc:creator><pubDate>Thu, 06 Dec 2012 17:14:26 -0000</pubDate><guid>https://sourceforge.netbdf11df9c1d3af4dbdb1f9dab7767b2dde46e42e</guid></item></channel></rss>