[*] Generalize the entry system by introducing "structured entries"

This commit is contained in:
2025-08-12 10:04:05 +02:00
parent 6f2e715b2a
commit 83cbe91e35
22 changed files with 307 additions and 288 deletions

View File

@@ -99,13 +99,7 @@ public class AttributesExtensionImpl implements AttributesExtension {
);
@Override
public boolean enterCompoundEntry(ConfigEntry<?> entry) {
enterEntry(entry);
return true;
}
@Override
public boolean enterCollectionEntry(ConfigEntry<?> entry) {
public boolean enterStructuredEntry(ConfigEntry<?> entry) {
enterEntry(entry);
return true;
}
@@ -130,12 +124,7 @@ public class AttributesExtensionImpl implements AttributesExtension {
}
@Override
public void leaveCompoundEntry(ConfigEntry<?> entry) {
defaults.pop();
}
@Override
public void leaveCollectionEntry(ConfigEntry<?> entry) {
public void leaveStructuredEntry(ConfigEntry<?> entry) {
defaults.pop();
}

View File

@@ -88,26 +88,14 @@ public class AttributesReadWriteFilterExtensionImpl
}
@Override
public boolean enterCollectionEntry(ConfigEntry<?> entry) {
public boolean enterStructuredEntry(ConfigEntry<?> entry) {
attributesCollectors.push(new HashMap<>());
visitEntry(entry);
return true;
}
@Override
public void leaveCollectionEntry(ConfigEntry<?> entry) {
leaveContainerEntry(entry);
}
@Override
public boolean enterCompoundEntry(ConfigEntry<?> entry) {
attributesCollectors.push(new HashMap<>());
visitEntry(entry);
return true;
}
@Override
public void leaveCompoundEntry(ConfigEntry<?> entry) {
public void leaveStructuredEntry(ConfigEntry<?> entry) {
leaveContainerEntry(entry);
}