Android Question Pass Type as Parameter

Homerclese

Member
Licensed User
Longtime User
I want to pass a Type as a parameter where the method is expecting an Object and so I get an "incompatible types" error "myType cannot be converted to Object".

Is there a way to cast a Type as an Object? If not I guess I'll have to create a Class instead of a Type.

Edit: In fact using a Class as a parameter instead of a Type doesn't help as I get the same error. So a Class instance isn't an Object?

Edit2: Actually the method is looking for an array of objects. So the error message was a little confusing. Anyway I think it's solved now. Nothing to see here. Move along... ;-)
 
Last edited:
Top