test/jdk/javax/management/MBeanInfo/TooManyFooTest.java
author herrick
Mon, 28 Oct 2019 11:21:43 -0400
branchJDK-8200758-branch
changeset 58818 a9316bb4c0e8
parent 47216 71c04702a3d5
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
30376
2ccf2cf7ea48 8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents: 5506
diff changeset
     2
 * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @bug 6398884
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Test that a method inherited from two different interfaces
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 *          appears only once in MBeanInfo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * @author dfuchs
44423
306c020eb154 8176176: fix @modules in jdk_svc tests
iignatyev
parents: 30376
diff changeset
    30
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * @run clean TooManyFooTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * @run build TooManyFooTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * @run main TooManyFooTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import java.lang.management.ManagementFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import java.lang.reflect.Method;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.util.Arrays;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.util.HashMap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.util.HashSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import java.util.Map;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import java.util.Set;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import java.util.logging.Logger;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import javax.management.Descriptor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import javax.management.MBeanInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import javax.management.MBeanOperationInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
import javax.management.MBeanServer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
import javax.management.ObjectName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
import javax.management.StandardMBean;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
import javax.management.openmbean.OpenMBeanOperationInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * Class TooManyFooTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * @author Sun Microsystems, 2005 - All rights reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
public class TooManyFooTest {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    public static class NumberHolder {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        public Integer getNumber() { return 0;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        public void setNumber(Integer n) {};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    public static class MyNumberHolder extends NumberHolder {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    public interface Parent1 {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        public int foo(); // Both in Parent1 and Parent2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        public Integer barfoo(); // Subtype in Parent1, Super type in Parent2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        public Long    foobar(); // Subtype in Parent1 & MBean, Super type in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                                 // Parent2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        public Number  toofoo(); // Subtype in Parent1, Super type in Parent2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                                 // Concrete type in MBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        public Object toofoofoo(); // Super type in Parent1, Subtype in Parent2,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        public NumberHolder toobarbar(); // toofoofoo reversed
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    public interface Parent2 {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        public int foo(); // Both in Parent1 and Parent2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        public Number barfoo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        public Number foobar();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        public Object toofoo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        public NumberHolder  toofoofoo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        public Object toobarbar();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    public interface ChildMBean extends Parent1, Parent2 {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        public Long foobar();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        public Long toofoo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    public interface ChildMXBean extends Parent1, Parent2 {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        public Long foobar();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        public Long toofoo();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    public interface ChildMixMXBean extends ChildMBean, ChildMXBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    public static class Child implements ChildMBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        public int foo() {return 0;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        public Long foobar() {return 0L;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        public Long toofoo() {return 0L;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        public Integer barfoo() {return 0;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        public MyNumberHolder toofoofoo() { return null;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        public MyNumberHolder toobarbar() { return null;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    public static class ChildMix implements ChildMXBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        public int foo() {return 0;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
        public Long foobar() {return 0L;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        public Long toofoo() {return 0L;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        public Integer barfoo() {return 0;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        public MyNumberHolder toofoofoo() { return null;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        public MyNumberHolder toobarbar() { return null;}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    public static class ChildMixMix extends Child implements ChildMixMXBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    /** Creates a new instance of TooManyFooTest */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    public TooManyFooTest() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    private static final int OPCOUNT;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    private static final Map<String,String> EXPECTED_TYPES;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    private static final String[][] type_array = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        { "foo", int.class.getName() },
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        { "foobar", Long.class.getName()},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        { "toofoo", Long.class.getName()},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        { "barfoo", Integer.class.getName()},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
        { "toofoofoo", NumberHolder.class.getName()},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
        { "toobarbar", NumberHolder.class.getName()},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    static {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            final Set<String> declared = new HashSet<String>();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            for (Method m:Child.class.getDeclaredMethods()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                declared.add(m.getName()+Arrays.asList(m.getParameterTypes()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
            final Set<String> exposed = new HashSet<String>();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
            for (Method m:ChildMBean.class.getMethods()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                exposed.add(m.getName()+Arrays.asList(m.getParameterTypes()));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            declared.retainAll(exposed);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            OPCOUNT = declared.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            EXPECTED_TYPES = new HashMap<String,String>();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
            for (String[] st:type_array) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                EXPECTED_TYPES.put(st[0],st[1]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        } catch (Exception x) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            throw new ExceptionInInitializerError(x);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    private static void test(Object child, String name, boolean mxbean)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        final ObjectName childName =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
                new ObjectName("test:type=Child,name="+name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        final MBeanServer server =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
                ManagementFactory.getPlatformMBeanServer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        server.registerMBean(child,childName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
            final MBeanInfo info = server.getMBeanInfo(childName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
            System.out.println(name+": " + info.getDescriptor());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
            final int len = info.getOperations().length;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            if (len == OPCOUNT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                System.out.println(name+": OK, only "+OPCOUNT+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
                        " operations here...");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
                final String qual = (len>OPCOUNT)?"many":"few";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                System.err.println(name+": Too "+qual+" foos! Found "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                        len+", expected "+OPCOUNT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                for (MBeanOperationInfo op : info.getOperations()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                    System.err.println("public "+op.getReturnType()+" "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
                            op.getName()+"();");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                throw new RuntimeException("Too " + qual +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                        " foos for "+name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            final Descriptor d = info.getDescriptor();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            final String mxstr = String.valueOf(d.getFieldValue("mxbean"));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            final boolean mxb =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                    (mxstr==null)?false:Boolean.valueOf(mxstr).booleanValue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
            System.out.println(name+": mxbean="+mxb);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
            if (mxbean && !mxb)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                throw new AssertionError("MXBean is not OpenMBean?");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
            for (MBeanOperationInfo mboi : info.getOperations()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                // Sanity check
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
                if (mxbean && !mboi.getName().equals("foo")) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                    // The spec doesn't guarantee that the MBeanOperationInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                    // of an MXBean will be an OpenMBeanOperationInfo, and in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                    // some circumstances in our implementation it will not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                    // However, in thsi tests, for all methods but foo(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                    // it should.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                    if (!(mboi instanceof OpenMBeanOperationInfo))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
                        throw new AssertionError("Operation "+mboi.getName()+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
                                "() is not Open?");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                final String exp = EXPECTED_TYPES.get(mboi.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
                // For MXBeans, we need to compare 'exp' with the original
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                // type - because mboi.getReturnType() returns the OpenType
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
                String type = (String)mboi.getDescriptor().
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
                            getFieldValue("originalType");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                if (type == null) type = mboi.getReturnType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
                if (type.equals(exp)) continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
                System.err.println("Bad return type for "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                        mboi.getName()+"! Found "+type+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                        ", expected "+exp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                throw new RuntimeException("Bad return type for "+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                        mboi.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        } finally {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
            server.unregisterMBean(childName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    public static void main(String[] args) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
        final Child child = new Child();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        test(child,"Child[MBean]",false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
        final ChildMix childx = new ChildMix();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        test(childx,"ChildMix[MXBean]",true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        final ChildMixMix childmx = new ChildMixMix();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        test(childmx,"ChildMixMix[MXBean]",false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        final StandardMBean schild = new StandardMBean(child,ChildMBean.class);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        test(schild,"Child[StandarMBean(Child)]",false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        final StandardMBean schildx =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
                new StandardMBean(childx,ChildMXBean.class,true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
        test(schildx,"ChildMix[StandarMXBean(ChildMix)]",true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        final StandardMBean schildmx =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
                new StandardMBean(childmx,ChildMixMXBean.class,true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
        test(schildmx,"ChildMixMix[StandarMXBean(ChildMixMix)]",true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
}