private void extractDeclaredExtensions(IBase theResource, BaseRuntimeElementDefinition<?> resDef, List<HeldExtension> extensions, List<HeldExtension> modifierExtensions, CompositeChildElement theChildElem) { for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsNonModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } extensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } modifierExtensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } }
private void addExtension(BaseRuntimeElementCompositeDefinition<?> theSourceDef, IBase theSource, IBase theTarget, RuntimeChildDeclaredExtensionDefinition nextExt, String url) { RuntimeChildDeclaredExtensionDefinition sourceDeclaredExt = theSourceDef.getDeclaredExtension(url, ""); if (sourceDeclaredExt == null) { if (theSource instanceof IBaseHasExtensions) { for (IBaseExtension<?, ?> next : ((IBaseHasExtensions) theSource).getExtension()) { if (next.getUrl().equals(url)) { nextExt.getMutator().addValue(theTarget, next.getValue()); } } } if (theSource instanceof IBaseHasModifierExtensions) { for (IBaseExtension<?, ?> next : ((IBaseHasModifierExtensions) theSource).getModifierExtension()) { if (next.getUrl().equals(url)) { nextExt.getMutator().addValue(theTarget, next.getValue()); } } } } else { List<? extends IBase> values = sourceDeclaredExt.getAccessor().getValues(theSource); for (IBase nextElement : values) { nextExt.getMutator().addValue(theTarget, nextElement); } } } }
private void extractDeclaredExtensions(IBase theResource, BaseRuntimeElementDefinition<?> resDef, List<HeldExtension> extensions, List<HeldExtension> modifierExtensions, CompositeChildElement theChildElem) { for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsNonModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } extensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } for (RuntimeChildDeclaredExtensionDefinition nextDef : resDef.getExtensionsModifier()) { for (IBase nextValue : nextDef.getAccessor().getValues(theResource)) { if (nextValue != null) { if (nextValue.isEmpty()) { continue; } modifierExtensions.add(new HeldExtension(nextDef, nextValue, theChildElem)); } } } }
private void addExtension(BaseRuntimeElementCompositeDefinition<?> theSourceDef, IBase theSource, IBase theTarget, RuntimeChildDeclaredExtensionDefinition nextExt, String url) { RuntimeChildDeclaredExtensionDefinition sourceDeclaredExt = theSourceDef.getDeclaredExtension(url, ""); if (sourceDeclaredExt == null) { if (theSource instanceof IBaseHasExtensions) { for (IBaseExtension<?, ?> next : ((IBaseHasExtensions) theSource).getExtension()) { if (next.getUrl().equals(url)) { nextExt.getMutator().addValue(theTarget, next.getValue()); } } } if (theSource instanceof IBaseHasModifierExtensions) { for (IBaseExtension<?, ?> next : ((IBaseHasModifierExtensions) theSource).getModifierExtension()) { if (next.getUrl().equals(url)) { nextExt.getMutator().addValue(theTarget, next.getValue()); } } } } else { List<? extends IBase> values = sourceDeclaredExt.getAccessor().getValues(theSource); for (IBase nextElement : values) { nextExt.getMutator().addValue(theTarget, nextElement); } } } }