/** * If not already created, a new <code>resources</code> element with the given value will be created. * Otherwise, the existing <code>resources</code> element will be returned. * @return a new or existing instance of <code>ResourcesType<ModuleDescriptor></code> */ public ResourcesType<ModuleDescriptor> getOrCreateResources() { Node node = model.getOrCreate("resources"); ResourcesType<ModuleDescriptor> resources = new ResourcesTypeImpl<ModuleDescriptor>(this, "resources", model, node); return resources; }
/** * If not already created, a new <code>resource-root</code> element will be created and returned. * Otherwise, the first existing <code>resource-root</code> element will be returned. * @return the instance defined for the element <code>resource-root</code> */ public ResourceType<ResourcesType<T>> getOrCreateResourceRoot() { List<Node> nodeList = childNode.get("resource-root"); if (nodeList != null && nodeList.size() > 0) { return new ResourceTypeImpl<ResourcesType<T>>(this, "resource-root", childNode, nodeList.get(0)); } return createResourceRoot(); }
/** * If not already created, a new <code>artifact</code> element will be created and returned. * Otherwise, the first existing <code>artifact</code> element will be returned. * @return the instance defined for the element <code>artifact</code> */ public ArtifactType<ResourcesType<T>> getOrCreateArtifact() { List<Node> nodeList = childNode.get("artifact"); if (nodeList != null && nodeList.size() > 0) { return new ArtifactTypeImpl<ResourcesType<T>>(this, "artifact", childNode, nodeList.get(0)); } return createArtifact(); }
/** * If not already created, a new <code>native-artifact</code> element will be created and returned. * Otherwise, the first existing <code>native-artifact</code> element will be returned. * @return the instance defined for the element <code>native-artifact</code> */ public ArtifactType<ResourcesType<T>> getOrCreateNativeArtifact() { List<Node> nodeList = childNode.get("native-artifact"); if (nodeList != null && nodeList.size() > 0) { return new ArtifactTypeImpl<ResourcesType<T>>(this, "native-artifact", childNode, nodeList.get(0)); } return createNativeArtifact(); }
/** * If not already created, a new <code>resources</code> element with the given value will be created. * Otherwise, the existing <code>resources</code> element will be returned. * @return a new or existing instance of <code>ResourcesType<ModuleType<T>></code> */ public ResourcesType<ModuleType<T>> getOrCreateResources() { Node node = childNode.getOrCreate("resources"); ResourcesType<ModuleType<T>> resources = new ResourcesTypeImpl<ModuleType<T>>(this, "resources", childNode, node); return resources; }