Java Code Examples for javax.management.Descriptor#equals()
The following examples show how to use
javax.management.Descriptor#equals() .
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: AnnotationTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private static void check(Object x, Descriptor d, Descriptor expect) { String fail = null; try { Descriptor u = ImmutableDescriptor.union(d, expect); if (!u.equals(d)) fail = "should contain " + expect + "; is " + d; } catch (IllegalArgumentException e) { fail = e.getMessage(); } if (fail == null) { System.out.println("OK: " + x); } else { failed = "NOT OK: Incorrect descriptor for: " + x; System.out.println(failed); System.out.println("..." + fail); } }
Example 2
Source File: AnnotationTest.java From hottub with GNU General Public License v2.0 | 6 votes |
private static void check(Object x, Descriptor d, Descriptor expect) { String fail = null; try { Descriptor u = ImmutableDescriptor.union(d, expect); if (!u.equals(d)) fail = "should contain " + expect + "; is " + d; } catch (IllegalArgumentException e) { fail = e.getMessage(); } if (fail == null) { System.out.println("OK: " + x); } else { failed = "NOT OK: Incorrect descriptor for: " + x; System.out.println(failed); System.out.println("..." + fail); } }
Example 3
Source File: AnnotationTest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static void check(Object x, Descriptor d, Descriptor expect) { String fail = null; try { Descriptor u = ImmutableDescriptor.union(d, expect); if (!u.equals(d)) fail = "should contain " + expect + "; is " + d; } catch (IllegalArgumentException e) { fail = e.getMessage(); } if (fail == null) { System.out.println("OK: " + x); } else { failed = "NOT OK: Incorrect descriptor for: " + x; System.out.println(failed); System.out.println("..." + fail); } }
Example 4
Source File: AnnotationTest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static void check(Object x, Descriptor d, Descriptor expect) { String fail = null; try { Descriptor u = ImmutableDescriptor.union(d, expect); if (!u.equals(d)) fail = "should contain " + expect + "; is " + d; } catch (IllegalArgumentException e) { fail = e.getMessage(); } if (fail == null) { System.out.println("OK: " + x); } else { failed = "NOT OK: Incorrect descriptor for: " + x; System.out.println(failed); System.out.println("..." + fail); } }
Example 5
Source File: AnnotationTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static void check(Object x, Descriptor d, Descriptor expect) { String fail = null; try { Descriptor u = ImmutableDescriptor.union(d, expect); if (!u.equals(d)) fail = "should contain " + expect + "; is " + d; } catch (IllegalArgumentException e) { fail = e.getMessage(); } if (fail == null) { System.out.println("OK: " + x); } else { failed = "NOT OK: Incorrect descriptor for: " + x; System.out.println(failed); System.out.println("..." + fail); } }
Example 6
Source File: AnnotationTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static void check(Object x, Descriptor d, Descriptor expect) { String fail = null; try { Descriptor u = ImmutableDescriptor.union(d, expect); if (!u.equals(d)) fail = "should contain " + expect + "; is " + d; } catch (IllegalArgumentException e) { fail = e.getMessage(); } if (fail == null) { System.out.println("OK: " + x); } else { failed = "NOT OK: Incorrect descriptor for: " + x; System.out.println(failed); System.out.println("..." + fail); } }
Example 7
Source File: AnnotationTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static void check(Object x, Descriptor d, Descriptor expect) { String fail = null; try { Descriptor u = ImmutableDescriptor.union(d, expect); if (!u.equals(d)) fail = "should contain " + expect + "; is " + d; } catch (IllegalArgumentException e) { fail = e.getMessage(); } if (fail == null) { System.out.println("OK: " + x); } else { failed = "NOT OK: Incorrect descriptor for: " + x; System.out.println(failed); System.out.println("..." + fail); } }
Example 8
Source File: OpenMBeanAttributeInfoSupport.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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 9
Source File: OpenMBeanAttributeInfoSupport.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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 10
Source File: OpenMBeanAttributeInfoSupport.java From hottub with GNU General Public License v2.0 | 5 votes |
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 11
Source File: OpenMBeanAttributeInfoSupport.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
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 12
Source File: OpenMBeanAttributeInfoSupport.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
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 13
Source File: OpenMBeanAttributeInfoSupport.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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 14
Source File: OpenMBeanAttributeInfoSupport.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
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 15
Source File: OpenMBeanAttributeInfoSupport.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
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 16
Source File: OpenMBeanAttributeInfoSupport.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
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 17
Source File: OpenMBeanAttributeInfoSupport.java From JDKSourceCode1.8 with MIT License | 5 votes |
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 jdk8u60 with GNU General Public License v2.0 | 5 votes |
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 19
Source File: OpenMBeanAttributeInfoSupport.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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 20
Source File: OpenMBeanAttributeInfoSupport.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
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()); }