I have the following problem.

I have a static method of a library class (that I cannot change) like this:

```
Loader.loadModel()

```

it returns an object of type Model.

I have also created a subclass of Model called ExtendedModel that adds to Model some methods and some fields.

I cannot do:

```
ExtendedModel m = Loader.loadModel() //compiler error
ExtendedModel m = (ExtendedModel) Loader.loadModel() //ClassCastException at runtime

```

because in Java you cannot assign a object of a super class to a sub class. 

However, I was wondering: which is the best way in which I could add methods and fields to a object returned by Loader.loadModel()