ModelNode node = new ModelNode(); node.get("path").set("/home/user"); node.get("type").set("directory");
ModelNode node = new ModelNode(); node.get("path").set("/home/user"); node.get("type").set("directory"); if (node.hasDefined("type")) { String type = node.get("type").asString(); if (type.equals("directory")) { node.get("path").set("/home/user/documents"); } }This code modifies the "path" property of the ModelNode object if the "type" property is set to "directory". The package library for org.jboss.dmr ModelNode is jboss-dmr.jar.