Added support for parameterised solid & shadows and enforcing type
parameters on @RealObject annotated fields.

Closes #1396.