Specifies the given Object to load config values to and save config values from. The Object must be from a ConfigMappable class, and all of its non-transient fields will be worked with. @param obj The Object to operate on @return This ConfigManager
(Object obj)
| 152 | * @return This ConfigManager |
| 153 | */ |
| 154 | public ConfigManager target(Object obj) { |
| 155 | if (target != null || targetClass != null) { |
| 156 | throw new IllegalStateException("ConfigManager already has a target"); |
| 157 | } |
| 158 | target = obj; |
| 159 | converter = ObjectConverter.create(conversionManager, new ConfigType<>(obj.getClass())); |
| 160 | return this; |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Specifies the given Class to load config values to and save config values from. The Class's |