Interface Converter
- All Known Implementing Classes:
BukkitConverter
,DefaultConverter
,SimpleConverter
,StringConverter
public interface Converter
The converter for
ConfigPath
to convert the object to the raw value stored in the config and vice versa-
Method Summary
Modifier and TypeMethodDescriptionConvert the raw value from the config file to the final value for the fieldconvertToRaw
(Object value) Convert the final value from the field to the raw value for the config filestatic @NotNull Converter
createConverterSafe
(Class<? extends Converter> converterClass) Create a new instance of the converter
-
Method Details
-
createConverterSafe
Create a new instance of the converter- Parameters:
converterClass
- the class of the converter- Returns:
- the new instance
-
convert
Convert the raw value from the config file to the final value for the field- Parameters:
raw
- the raw value- Returns:
- the final value
-
convertToRaw
Convert the final value from the field to the raw value for the config file- Parameters:
value
- the final value- Returns:
- the raw value
-