added @Preferences support for custom classes
@Preferences with support for generic types