diff options
author | Manuel Bentele | 2021-05-19 09:01:38 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-05-19 09:01:38 +0200 |
commit | adc19701eafcd18a746a57dc0a610a614e1d80cf (patch) | |
tree | df9f27c6172684909ed1c5ffede2a46243322a8d /src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java | |
parent | Remove needless reference to internal/private Maven repository (diff) | |
parent | Implements XML schema validation for VirtualBox configurations (diff) | |
download | master-sync-shared-adc19701eafcd18a746a57dc0a610a614e1d80cf.tar.gz master-sync-shared-adc19701eafcd18a746a57dc0a610a614e1d80cf.tar.xz master-sync-shared-adc19701eafcd18a746a57dc0a610a614e1d80cf.zip |
Merge branch 'feature/qemu-integration'
Diffstat (limited to 'src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java')
-rw-r--r-- | src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java b/src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java new file mode 100644 index 0000000..96c77d5 --- /dev/null +++ b/src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java @@ -0,0 +1,51 @@ +package org.openslx.libvirt.capabilities.cpu; + +import org.openslx.libvirt.xml.LibvirtXmlNode; + +/** + * Implementation of a host CPU feature as part of the Libvirt capabilities XML document. + * + * @author Manuel Bentele + * @version 1.0 + */ +public class Feature extends LibvirtXmlNode +{ + /** + * Creates an empty host CPU feature instance. + */ + public Feature() + { + super(); + } + + /** + * Creates an host CPU feature representing an existing Libvirt XML host CPU feature element. + * + * @param xmlNode existing Libvirt XML host CPU feature element. + */ + public Feature( LibvirtXmlNode xmlNode ) + { + super( xmlNode ); + } + + /** + * Returns the name of the host CPU feature. + * + * @return name of the host CPU feature. + */ + public String getName() + { + return this.getXmlElementAttributeValue( "name" ); + } + + /** + * Creates an host CPU feature representing an existing Libvirt XML host CPU feature element. + * + * @param xmlNode existing Libvirt XML host CPU feature element. + * @return host CPU feature instance. + */ + public static Feature newInstance( LibvirtXmlNode xmlNode ) + { + return new Feature( xmlNode ); + } +} |