[*] Generalize the entry system by introducing "structured entries"
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user