javax.management.DescriptorRead Java Examples

The following examples show how to use javax.management.DescriptorRead. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #2
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #3
Source File: OpenMBeanAttributeInfoSupport.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #4
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #5
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #6
Source File: OpenMBeanAttributeInfoSupport.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #7
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #8
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #9
Source File: OpenMBeanAttributeInfoSupport.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #10
Source File: OpenMBeanAttributeInfoSupport.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #11
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #12
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #13
Source File: OpenMBeanAttributeInfoSupport.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #14
Source File: OpenMBeanAttributeInfoSupport.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #15
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #16
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
static int hashCode(OpenMBeanParameterInfo info) {
    int value = 0;
    value += info.getName().hashCode();
    value += info.getOpenType().hashCode();
    if (info.hasDefaultValue())
        value += info.getDefaultValue().hashCode();
    if (info.hasMinValue())
        value += info.getMinValue().hashCode();
    if (info.hasMaxValue())
        value += info.getMaxValue().hashCode();
    if (info.hasLegalValues())
        value += info.getLegalValues().hashCode();
    if (info instanceof DescriptorRead)
        value += ((DescriptorRead) info).getDescriptor().hashCode();
    return value;
}
 
Example #17
Source File: OpenMBeanAttributeInfoSupport.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
static boolean equal(OpenMBeanParameterInfo x1, OpenMBeanParameterInfo x2) {
    if (x1 instanceof DescriptorRead) {
        if (!(x2 instanceof DescriptorRead))
            return false;
        Descriptor d1 = ((DescriptorRead) x1).getDescriptor();
        Descriptor d2 = ((DescriptorRead) x2).getDescriptor();
        if (!d1.equals(d2))
            return false;
    } else if (x2 instanceof DescriptorRead)
        return false;

    return
        x1.getName().equals(x2.getName()) &&
        x1.getOpenType().equals(x2.getOpenType()) &&
        (x1.hasDefaultValue() ?
            x1.getDefaultValue().equals(x2.getDefaultValue()) :
            !x2.hasDefaultValue()) &&
        (x1.hasMinValue() ?
            x1.getMinValue().equals(x2.getMinValue()) :
            !x2.hasMinValue()) &&
        (x1.hasMaxValue() ?
            x1.getMaxValue().equals(x2.getMaxValue()) :
            !x2.hasMaxValue()) &&
        (x1.hasLegalValues() ?
            x1.getLegalValues().equals(x2.getLegalValues()) :
            !x2.hasLegalValues());
}
 
Example #18
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #19
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #20
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #21
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static boolean equal(OpenMBeanParameterInfo x1, OpenMBeanParameterInfo x2) {
    if (x1 instanceof DescriptorRead) {
        if (!(x2 instanceof DescriptorRead))
            return false;
        Descriptor d1 = ((DescriptorRead) x1).getDescriptor();
        Descriptor d2 = ((DescriptorRead) x2).getDescriptor();
        if (!d1.equals(d2))
            return false;
    } else if (x2 instanceof DescriptorRead)
        return false;

    return
        x1.getName().equals(x2.getName()) &&
        x1.getOpenType().equals(x2.getOpenType()) &&
        (x1.hasDefaultValue() ?
            x1.getDefaultValue().equals(x2.getDefaultValue()) :
            !x2.hasDefaultValue()) &&
        (x1.hasMinValue() ?
            x1.getMinValue().equals(x2.getMinValue()) :
            !x2.hasMinValue()) &&
        (x1.hasMaxValue() ?
            x1.getMaxValue().equals(x2.getMaxValue()) :
            !x2.hasMaxValue()) &&
        (x1.hasLegalValues() ?
            x1.getLegalValues().equals(x2.getLegalValues()) :
            !x2.hasLegalValues());
}
 
Example #22
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #23
Source File: OpenMBeanAttributeInfoSupport.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
static boolean equal(OpenMBeanParameterInfo x1, OpenMBeanParameterInfo x2) {
    if (x1 instanceof DescriptorRead) {
        if (!(x2 instanceof DescriptorRead))
            return false;
        Descriptor d1 = ((DescriptorRead) x1).getDescriptor();
        Descriptor d2 = ((DescriptorRead) x2).getDescriptor();
        if (!d1.equals(d2))
            return false;
    } else if (x2 instanceof DescriptorRead)
        return false;

    return
        x1.getName().equals(x2.getName()) &&
        x1.getOpenType().equals(x2.getOpenType()) &&
        (x1.hasDefaultValue() ?
            x1.getDefaultValue().equals(x2.getDefaultValue()) :
            !x2.hasDefaultValue()) &&
        (x1.hasMinValue() ?
            x1.getMinValue().equals(x2.getMinValue()) :
            !x2.hasMinValue()) &&
        (x1.hasMaxValue() ?
            x1.getMaxValue().equals(x2.getMaxValue()) :
            !x2.hasMaxValue()) &&
        (x1.hasLegalValues() ?
            x1.getLegalValues().equals(x2.getLegalValues()) :
            !x2.hasLegalValues());
}
 
Example #24
Source File: OpenMBeanAttributeInfoSupport.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #25
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #26
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
static boolean equal(OpenMBeanParameterInfo x1, OpenMBeanParameterInfo x2) {
    if (x1 instanceof DescriptorRead) {
        if (!(x2 instanceof DescriptorRead))
            return false;
        Descriptor d1 = ((DescriptorRead) x1).getDescriptor();
        Descriptor d2 = ((DescriptorRead) x2).getDescriptor();
        if (!d1.equals(d2))
            return false;
    } else if (x2 instanceof DescriptorRead)
        return false;

    return
        x1.getName().equals(x2.getName()) &&
        x1.getOpenType().equals(x2.getOpenType()) &&
        (x1.hasDefaultValue() ?
            x1.getDefaultValue().equals(x2.getDefaultValue()) :
            !x2.hasDefaultValue()) &&
        (x1.hasMinValue() ?
            x1.getMinValue().equals(x2.getMinValue()) :
            !x2.hasMinValue()) &&
        (x1.hasMaxValue() ?
            x1.getMaxValue().equals(x2.getMaxValue()) :
            !x2.hasMaxValue()) &&
        (x1.hasLegalValues() ?
            x1.getLegalValues().equals(x2.getLegalValues()) :
            !x2.hasLegalValues());
}
 
Example #27
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #28
Source File: OpenMBeanAttributeInfoSupport.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
static String toString(OpenMBeanParameterInfo info) {
    Descriptor d = (info instanceof DescriptorRead) ?
        ((DescriptorRead) info).getDescriptor() : null;
    return
        info.getClass().getName() +
        "(name=" + info.getName() +
        ",openType=" + info.getOpenType() +
        ",default=" + info.getDefaultValue() +
        ",minValue=" + info.getMinValue() +
        ",maxValue=" + info.getMaxValue() +
        ",legalValues=" + info.getLegalValues() +
        ((d == null) ? "" : ",descriptor=" + d) +
        ")";
}
 
Example #29
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
static boolean equal(OpenMBeanParameterInfo x1, OpenMBeanParameterInfo x2) {
    if (x1 instanceof DescriptorRead) {
        if (!(x2 instanceof DescriptorRead))
            return false;
        Descriptor d1 = ((DescriptorRead) x1).getDescriptor();
        Descriptor d2 = ((DescriptorRead) x2).getDescriptor();
        if (!d1.equals(d2))
            return false;
    } else if (x2 instanceof DescriptorRead)
        return false;

    return
        x1.getName().equals(x2.getName()) &&
        x1.getOpenType().equals(x2.getOpenType()) &&
        (x1.hasDefaultValue() ?
            x1.getDefaultValue().equals(x2.getDefaultValue()) :
            !x2.hasDefaultValue()) &&
        (x1.hasMinValue() ?
            x1.getMinValue().equals(x2.getMinValue()) :
            !x2.hasMinValue()) &&
        (x1.hasMaxValue() ?
            x1.getMaxValue().equals(x2.getMaxValue()) :
            !x2.hasMaxValue()) &&
        (x1.hasLegalValues() ?
            x1.getLegalValues().equals(x2.getLegalValues()) :
            !x2.hasLegalValues());
}
 
Example #30
Source File: OpenMBeanAttributeInfoSupport.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
static boolean equal(OpenMBeanParameterInfo x1, OpenMBeanParameterInfo x2) {
    if (x1 instanceof DescriptorRead) {
        if (!(x2 instanceof DescriptorRead))
            return false;
        Descriptor d1 = ((DescriptorRead) x1).getDescriptor();
        Descriptor d2 = ((DescriptorRead) x2).getDescriptor();
        if (!d1.equals(d2))
            return false;
    } else if (x2 instanceof DescriptorRead)
        return false;

    return
        x1.getName().equals(x2.getName()) &&
        x1.getOpenType().equals(x2.getOpenType()) &&
        (x1.hasDefaultValue() ?
            x1.getDefaultValue().equals(x2.getDefaultValue()) :
            !x2.hasDefaultValue()) &&
        (x1.hasMinValue() ?
            x1.getMinValue().equals(x2.getMinValue()) :
            !x2.hasMinValue()) &&
        (x1.hasMaxValue() ?
            x1.getMaxValue().equals(x2.getMaxValue()) :
            !x2.hasMaxValue()) &&
        (x1.hasLegalValues() ?
            x1.getLegalValues().equals(x2.getLegalValues()) :
            !x2.hasLegalValues());
}