X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2FCapabilities.java;h=147f1b13aedc32e6c3f50ebdf5badcaca010a85b;hb=a37de3862829ea430f032662a457efeb835d9b43;hp=a41a0e22904482050bbcfe95c4338c2acb0dc520;hpb=e3e571dbfd9bb37364502101d482b7796d6b5cea;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Capabilities.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Capabilities.java index a41a0e2290..147f1b13ae 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Capabilities.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Capabilities.java @@ -9,6 +9,8 @@ package org.opendaylight.controller.sal.core; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @@ -20,29 +22,30 @@ import javax.xml.bind.annotation.XmlRootElement; * Describes supported capabilities */ @XmlRootElement +@XmlAccessorType(XmlAccessType.NONE) public class Capabilities extends Property { - private static final long serialVersionUID = 1L; - @XmlElement + private static final long serialVersionUID = 1L; + @XmlElement(name="value") private int capabilitiesValue; - - public enum CapabilitiesType { - FLOW_STATS_CAPABILITY(1<<0), - TABLE_STATS_CAPABILITY(1<<1), - PORT_STATS_CAPABILITY(1<<2), - STP_CAPABILITY(1<<3), - RSVD_CAPABILITY(1<<4), - IP_REASSEM_CAPABILITY(1<<5), - QUEUE_STATS_CAPABILITY(1<<6), - ARP_MATCH_IP_CAPABILITY(1<<7); - private final int ct; - CapabilitiesType(int val) { - this.ct = val; - } - public int getValue() { - return ct; - } + + public enum CapabilitiesType { + FLOW_STATS_CAPABILITY(1<<0), + TABLE_STATS_CAPABILITY(1<<1), + PORT_STATS_CAPABILITY(1<<2), + STP_CAPABILITY(1<<3), + RSVD_CAPABILITY(1<<4), + IP_REASSEM_CAPABILITY(1<<5), + QUEUE_STATS_CAPABILITY(1<<6), + ARP_MATCH_IP_CAPABILITY(1<<7); + private final int ct; + CapabilitiesType(int val) { + this.ct = val; + } + public int getValue() { + return ct; + } } - + public static final String CapabilitiesPropName = "capabilities"; /** * Construct a Capabilities property @@ -63,14 +66,15 @@ public class Capabilities extends Property { this.capabilitiesValue = 0; } + @Override public Capabilities clone() { return new Capabilities(this.capabilitiesValue); } public int getValue() { - return this.capabilitiesValue; + return this.capabilitiesValue; } - + @Override public int hashCode() { final int prime = 31; @@ -97,4 +101,9 @@ public class Capabilities extends Property { public String toString() { return "Capabilities[" + capabilitiesValue + "]"; } + + @Override + public String getStringValue() { + return Integer.toHexString(capabilitiesValue); + } }