interface

How can I update interfaces in OSGI?

I'm learning OSGi and I'm curious about the following situation: I want to change (extend mostly) an interface exposed by OSGi, without changing the classname. Is it possible make a bundle that "translates" the old interface to the new. Below is an example, I hope it is clear enough, just by making use of a few manifest headers. Suppos...

The purpose of interfaces continued

OK so I gather that Interfaces are a way to enforce that an object implements a certain amount of functionality, without having to use inheritance. Kind of like a contract. And I semi see the point of them. But if all you have in the interface is: public interface animal{ void eat(object food); } and it has no implementation a...

Why can't a list of Interfaces use an implementing type?

There must be something fundamental about interfaces/generics I have not yet learned. I hope to learn it now. Here is the scenario: I have this interface and class: public interface IInterface { string TestValue { get; set; } } public class RealValue: IInterface { public string TestValue { get; set; } } If I create a met...

List versus ArrayList

Ok so I know that Set, List and Map are interfaces but what makes the first line of code any better than the second line? List myArr = new ArrayList(); ArrayList myArr = new ArrayList(); Thanks. ...

Exposing aggregation through the interface vs. delegation

I have an Employee object which aggregates a few other objects, such as HRData and AssignmentHistory. In the past all of this logic was contained directly in the Employee object, but for testability and manageability I've split it to use aggregation. However, instead of exposing the aggregate objects directly, I've used delegation so tha...