/** * Set the LibraryLocations on the specified VM, by extracting the subordinate * nodes from the specified 'lirbaryLocations' node. * * @param vm the {@link IVMInstall} to populate from the given {@link Element} * @param libLocationsElement the {@link Element} to populate the {@link IVMInstall} with */ private static void setLibraryLocations(IVMInstall vm, Element libLocationsElement) { NodeList list = libLocationsElement.getChildNodes(); int length = list.getLength(); List<LibraryLocation> locations = new ArrayList<LibraryLocation>(length); for (int i = 0; i < length; ++i) { Node node = list.item(i); short type = node.getNodeType(); if (type == Node.ELEMENT_NODE) { Element libraryLocationElement= (Element)node; if (libraryLocationElement.getNodeName().equals("libraryLocation")) { //$NON-NLS-1$ locations.add(getLibraryLocation(libraryLocationElement)); } } } vm.setLibraryLocations(locations.toArray(new LibraryLocation[locations.size()])); }
/** * Set the LibraryLocations on the specified VM, by extracting the subordinate * nodes from the specified 'lirbaryLocations' node. * * @param vm the {@link IVMInstall} to populate from the given {@link Element} * @param libLocationsElement the {@link Element} to populate the {@link IVMInstall} with */ private static void setLibraryLocations(IVMInstall vm, Element libLocationsElement) { NodeList list = libLocationsElement.getChildNodes(); int length = list.getLength(); List<LibraryLocation> locations = new ArrayList<>(length); for (int i = 0; i < length; ++i) { Node node = list.item(i); short type = node.getNodeType(); if (type == Node.ELEMENT_NODE) { Element libraryLocationElement= (Element)node; if (libraryLocationElement.getNodeName().equals("libraryLocation")) { //$NON-NLS-1$ locations.add(getLibraryLocation(libraryLocationElement)); } } } vm.setLibraryLocations(locations.toArray(new LibraryLocation[locations.size()])); }
String subElementName = subElement.getNodeName(); if (subElementName.equals("libraryLocation")) { //$NON-NLS-1$ LibraryLocation loc = getLibraryLocation(subElement); vmStandin.setLibraryLocations(new LibraryLocation[]{loc}); } else if (subElementName.equals("libraryLocations")) { //$NON-NLS-1$
String subElementName = subElement.getNodeName(); if (subElementName.equals("libraryLocation")) { //$NON-NLS-1$ LibraryLocation loc = getLibraryLocation(subElement); vmStandin.setLibraryLocations(new LibraryLocation[]{loc}); } else if (subElementName.equals("libraryLocations")) { //$NON-NLS-1$