BrightSide Workbench Full Report + Source Code
org.turro.visual.JsonVisualConstraints Class Reference
Inheritance diagram for org.turro.visual.JsonVisualConstraints:
Collaboration diagram for org.turro.visual.JsonVisualConstraints:

Static Public Member Functions

static JsonVisualConstraints load (String visualFile, Consumer< JsonVisualConstraints > defaults)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 35 of file JsonVisualConstraints.java.

Member Function Documentation

◆ load()

static JsonVisualConstraints org.turro.visual.JsonVisualConstraints.load ( String  visualFile,
Consumer< JsonVisualConstraints defaults 
)
static

Definition at line 41 of file JsonVisualConstraints.java.

41  {
42  File file = Document.from(convert(visualFile)).document();
43  return CACHED.constructor(() -> {
44  JsonVisualConstraints lvc = new JsonVisualConstraints();
45  defaults.accept(lvc);
46  save(visualFile, lvc);
47  return lvc;
48  }).loader(f -> {
49  try {
50  JSONSerializer ser = new JSONSerializer(true);
51  return ser.fromJson(Document.from(f).content(), JsonVisualConstraints.class);
52  } catch (IOException ex) {
53  WebLoggers.severe(JsonVisualConstraints.class).exception(ex).log();
54  return null;
55  }
56  }).load(visualFile, file);
57  }
static JsonVisualConstraints load(String visualFile, Consumer< JsonVisualConstraints > defaults)
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: