MCPcopy Index your code
hub / github.com/apache/groovy / inheritFields

Method inheritFields

src/main/java/groovy/lang/MetaClassImpl.java:2733–2745  ·  view source on GitHub ↗
(final Iterable<CachedClass> superClasses)

Source from the content-addressed store, hash-verified

2731 }
2732
2733 private void inheritFields(final Iterable<CachedClass> superClasses) {
2734 Map<String, MetaProperty> sci = null;
2735 for (CachedClass cc : superClasses) {
2736 Map<String, MetaProperty> cci = subMap(classPropertyIndex, cc);
2737 if (sci != null && !sci.isEmpty()) {
2738 copyNonPrivateFields(sci, cci, cc);
2739 // GROOVY-9608, GROOVY-9609: add public, protected, and package-private fields to index for super
2740 copyNonPrivateFields(sci, subMap(classPropertyIndexForSuper, cc), cc);
2741 }
2742 sci = cci;
2743 addFields(cc, cci);
2744 }
2745 }
2746
2747 private static void addConsts(final CachedClass iface, final Map<String, MetaProperty> index) {
2748 for (CachedClass superInterface : iface.getDeclaredInterfaces()) { // GROOVY-11639

Callers 1

setUpPropertiesMethod · 0.95

Calls 4

subMapMethod · 0.95
copyNonPrivateFieldsMethod · 0.95
addFieldsMethod · 0.95
isEmptyMethod · 0.45

Tested by

no test coverage detected