Question: I need some insight in the correct type of design pattern to use in the following scenario:

Existing framework that will allow 3rd party developer to create modules to provide a small piece of functionality that is **required** by my system.

The piece of functionality involves a subset of my system that is essentially very simple: it ensures that 2 properties are available on a specific model in my system, say for example sake "Customer" and the two properties are getName and getEmailAddress.

Now, 3rd party debelopers can provide their own implementation of these which may have very complicated processes of generating these values, but my system is only concerned with the fact that these two properties **must** be available.

I gess the difficult part is how the 3rd party module code attaches itself to the Customer model

Answer: 
Create a class `CustomerInfo`, containing the two customer properties, and an interface `CustomerInfoProvider` containing this unique method:

```
CustomerInfo loadCustomerInfo();

```

Let the framework accept an instance of this interface, that the user will provide directly, or by configuring the name of a concrete class implementing this interface in a config file.

If the latter, load the class using `Class.forName(...).newInstance()`, and cast the result to the CustomerInfoProvider interface.
> 
> Existing framework that will allow 3rd party developer to create
>  modules to provide a small piece of functionality that is required by
>  my system.
> 
> 
> 

This means there will be a contract between your system and your client's code. Any external code that needs to interact with you system needs to fulfill that contract. In OO terms, interfaces are contracts so what you need is an interface that your clients need to implement. Example:

```
public interface ICustomer{
   public String getName();
   public String getEmailAddress();
}

```