Is there a way to apply a type and instance parameter to an object?