ModelNode originalNode = new ModelNode(); originalNode.get("property").set("value"); ModelNode clonedNode = originalNode.clone();
ModelNode originalNode = new ModelNode(); originalNode.get("property").set("value"); ModelNode clonedNode = originalNode.clone(); clonedNode.get("property").set("new value");In this example, a new ModelNode is created, and a property "property" is set with the value "value". A clone of this node is created using the clone method. The clonedNode is modified to set the property "property" to a new value "new value". The originalNode is not affected by this modification. Package Library: The org.jboss.dmr ModelNode clone method is part of the JBoss Domain Management Remote library, which is part of the JBoss Application Server. This library allows for managing and configuring services in a domain environment, and is primarily used by administrators and developers working with JBoss applications.