Package gw.lang.reflect.json
Interface IJsonIO
- All Known Subinterfaces:
IRunConfig<T>,IRunConfigParameters<T>,ISettings<T>,ISettingsParameters<T>
- All Known Implementing Classes:
AbstractRunConfig,AbstractRunConfigParameters,AbstractSearchDialog.State,AbstractSettings,AbstractSettingsParameters,AppearanceSettings,AppearanceSettingsParameters,Breakpoint,CompilerSettings,CompilerSettingsParameters,FqnRunConfig,FqnRunConfigParameters,ProgramRunConfig,ProgramRunConfigParameters,RemoteRunConfig,RemoteRunConfigParameters,RunToCursorBreakpoint
public interface IJsonIO
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisSimpleType(Class cls) static booleanisSimpleType(Object value) default voidImplement this method to control loading from the Json bindings.static voidloadFields(IJsonIO obj, Class cls, Bindings bindings) static <E extends IJsonIO>
Estatic <E extends IJsonIO>
Edefault voidImplement this method to control saving to a Json bindings.static voidsaveFields(IJsonIO obj, Class cls, Bindings bindings) static <E extends IJsonIO>
voidstatic <E extends IJsonIO>
voidstatic <E extends IJsonIO>
void
-
Field Details
-
TYPE
- See Also:
-
-
Method Details
-
read
-
read
-
write
-
write
-
readList
-
readList
-
writeList
-
load
Implement this method to control loading from the Json bindings. The default behavior simply loads values corresponding with your class's field values.The bindings is just a simple map with name value pairs, which usually maps directly to your class's fields. But anything goes; you can read and write anything from/to the Bindings.
Use #read() etc. to read proper Json data.
- Parameters:
bindings-
-
save
Implement this method to control saving to a Json bindings. The default behavior simply saves all your class's non-transient instance fields.Basically, the bindings is a simple map where you write name/value pairs representing your class's format. Typically you save just your field values, but you can save anything you like.
Use #write(String, Object, Bindings) etc. to write proper Json data.
- Parameters:
bindings-
-
loadFields
-
saveFields
-
isSimpleType
-
isSimpleType
-