public static boolean isEmpty(IBase... theElements) { if (theElements == null) { return true; } for (int i = 0; i < theElements.length; i++) { IBase next = theElements[i]; if (next != null && !next.isEmpty()) { return false; } } return true; }
public static boolean isEmpty(IElement... theElements) { if (theElements == null) { return true; } for (int i = 0; i < theElements.length; i++) { IBase next = theElements[i]; if (next != null && !next.isEmpty()) { return false; } } return true; }
@SuppressWarnings("unchecked") @Override public void acceptElement(IBaseResource theOuterResource, IBase theElement, List<String> thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition<?> theDefinition) { if (theElement == null || theElement.isEmpty()) { return; } if (theType.isAssignableFrom(theElement.getClass())) { retVal.add((T) theElement); } } });
@Override public void acceptElement(IBaseResource theOuterResource, IBase theElement, List<String> thePathToElement, BaseRuntimeChildDefinition theChildDefinition, BaseRuntimeElementDefinition<?> theDefinition) { if (theElement == null || theElement.isEmpty()) { return; } if (IBaseReference.class.isAssignableFrom(theElement.getClass())) { retVal.add(new ResourceReferenceInfo(myContext, theOuterResource, thePathToElement, (IBaseReference) theElement)); } } });
public static boolean isEmpty(List<? extends IBase> theElements) { if (theElements == null) { return true; } for (int i = 0; i < theElements.size(); i++) { IBase next; try { next = theElements.get(i); } catch (ClassCastException e) { List<?> elements = theElements; String s = "Found instance of " + elements.get(i).getClass() + " - Did you set a field value to the incorrect type? Expected " + IBase.class.getName(); throw new ClassCastException(s); } if (next != null && !next.isEmpty()) { return false; } } return true; }
@SuppressWarnings("unchecked") public static boolean isEmpty(Object... theElements) { if (theElements == null) { return true; } for (int i = 0; i < theElements.length; i++) { Object next = theElements[i]; if (next instanceof List) { if (!isEmpty((List<? extends IBase>) next)) { return false; } } else if (next instanceof String && (!((String)next).isEmpty())) { return false; } else if (next != null && !((IBase) next).isEmpty()) { return false; } } return true; }
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)); } } } }
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
private void encodeChildElementToStreamWriter(IBaseResource theResource, XMLStreamWriter theEventWriter, IBase theElement, String childName, BaseRuntimeElementDefinition<?> childDef, String theExtensionUrl, boolean theIncludedResource, boolean theSubResource, CompositeChildElement theParent) throws XMLStreamException, DataFormatException { if (theElement == null || theElement.isEmpty()) { if (isChildContained(childDef, theIncludedResource)) {
boolean noValue = value == null || value.isEmpty(); if (noValue && ext.getExtension().isEmpty()) { ourLog.debug("Extension with URL[{}] has no value", extensionUrl);
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
private void copyChildren(BaseRuntimeElementCompositeDefinition<?> theSourceDef, IBase theSource, BaseRuntimeElementCompositeDefinition<?> theTargetDef, IBase theTarget) { if (!theSource.isEmpty()) { List<BaseRuntimeChildDefinition> targetChildren = theTargetDef.getChildren(); List<RuntimeChildDeclaredExtensionDefinition> targetExts = theTargetDef.getExtensions();
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
continue; if (nextValue.isEmpty()) { continue;
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
if (nextObject == null || ((IBase) nextObject).isEmpty()) { continue;
if ((nextValue == null || nextValue.isEmpty())) { continue;