jdk/src/share/classes/javax/management/openmbean/MXBeanMappingFactory.java
author xdono
Wed, 02 Jul 2008 12:55:45 -0700
changeset 715 f16baef3a20e
parent 687 874e25a9844a
child 1011 2cc4873fa29f
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
687
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     1
/*
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 687
diff changeset
     2
 * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
687
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     4
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    10
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    15
 * accompanied this code).
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    16
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    20
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    23
 * have any questions.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    24
 */
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    25
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    26
package javax.management.openmbean;
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    27
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    28
import com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory;
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    29
import java.lang.reflect.Type;
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    30
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    31
/**
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    32
 * <p>Defines how types are mapped for a given MXBean or set of MXBeans.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    33
 * An {@code MXBeanMappingFactory} can be specified either through the
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    34
 * {@link MXBeanMappingFactoryClass} annotation, or through the
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    35
 * {@link javax.management.JMX.MBeanOptions JMX.MBeanOptions} argument to a
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    36
 * {@link javax.management.StandardMBean StandardMBean} constructor or MXBean
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    37
 * proxy.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    38
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    39
 * <p>An {@code MXBeanMappingFactory} must return an {@code MXBeanMapping}
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    40
 * for any Java type that appears in the MXBeans that the factory is being
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    41
 * used for.  Usually it does that by handling any custom types, and
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    42
 * forwarding everything else to the {@linkplain #DEFAULT default mapping
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    43
 * factory}.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    44
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    45
 * <p>Consider the {@code MyLinkedList} example from the {@link MXBeanMapping}
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    46
 * documentation.  If we are unable to change the {@code MyLinkedList} class
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    47
 * to add an {@link MXBeanMappingClass} annotation, we could achieve the same
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    48
 * effect by defining {@code MyLinkedListMappingFactory} as follows:</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    49
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    50
 * <pre>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    51
 * public class MyLinkedListMappingFactory implements MXBeanMappingFactory {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    52
 *     public MyLinkedListMappingFactory() {}
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    53
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    54
 *     public MXBeanMapping mappingForType(Type t, MXBeanMappingFactory f)
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    55
 *     throws OpenDataException {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    56
 *         if (t == MyLinkedList.class)
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    57
 *             return new MyLinkedListMapping(t);
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    58
 *         else
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    59
 *             return MXBeanMappingFactory.DEFAULT.mappingForType(t, f);
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    60
 *     }
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    61
 * }
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    62
 * </pre>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    63
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    64
 * <p>The mapping factory handles only the {@code MyLinkedList} class.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    65
 * Every other type is forwarded to the default mapping factory.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    66
 * This includes types such as {@code MyLinkedList[]} and
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    67
 * {@code List<MyLinkedList>}; the default mapping factory will recursively
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    68
 * invoke {@code MyLinkedListMappingFactory} to map the contained
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    69
 * {@code MyLinkedList} type.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    70
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    71
 * <p>Once we have defined {@code MyLinkedListMappingFactory}, we can use
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    72
 * it in an MXBean interface like this:</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    73
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    74
 * <pre>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    75
 * {@literal @MXBeanMappingFactoryClass}(MyLinkedListMappingFactory.class)
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    76
 * public interface SomethingMXBean {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    77
 *     public MyLinkedList getSomething();
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    78
 * }
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    79
 * </pre>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    80
 *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    81
 * <p>Alternatively we can annotate the package that {@code SomethingMXBean}
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    82
 * appears in, or we can supply the factory to a {@link
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    83
 * javax.management.StandardMBean StandardMBean} constructor or MXBean
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    84
 * proxy.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    85
 */
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    86
public abstract class MXBeanMappingFactory {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    87
    /**
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    88
     * <p>Construct an instance of this class.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    89
     */
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    90
    protected MXBeanMappingFactory() {}
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    91
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    92
    /**
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    93
     * <p>Mapping factory that applies the default rules for MXBean
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    94
     * mappings, as described in the <a
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    95
     * href="../MXBean.html#MXBean-spec">MXBean specification</a>.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    96
     */
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    97
    public static final MXBeanMappingFactory DEFAULT =
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    98
            new DefaultMXBeanMappingFactory();
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
    99
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   100
    /**
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   101
     * <p>Determine the appropriate MXBeanMappingFactory to use for the given
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   102
     * MXBean interface, based on its annotations.  If the interface has an
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   103
     * {@link MXBeanMappingFactoryClass @MXBeanMappingFactoryClass} annotation,
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   104
     * that is used to determine the MXBeanMappingFactory.  Otherwise, if the
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   105
     * package containing the interface has such an annotation, that is used.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   106
     * Otherwise the MXBeanMappingFactory is the {@linkplain #DEFAULT default}
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   107
     * one.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   108
     *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   109
     * @param intf the MXBean interface for which to determine the
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   110
     * MXBeanMappingFactory.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   111
     *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   112
     * @return the MXBeanMappingFactory for the given MXBean interface.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   113
     *
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   114
     * @throws IllegalArgumentException if {@code intf} is null, or if an
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   115
     * exception occurs while trying constructing an MXBeanMappingFactory
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   116
     * based on an annotation.  In the second case, the exception will appear
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   117
     * in the {@linkplain Throwable#getCause() cause chain} of the
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   118
     * {@code IllegalArgumentException}.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   119
     */
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   120
    public static MXBeanMappingFactory forInterface(Class<?> intf) {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   121
        if (intf == null)
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   122
            throw new IllegalArgumentException("Null interface");
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   123
        MXBeanMappingFactoryClass annot =
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   124
                intf.getAnnotation(MXBeanMappingFactoryClass.class);
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   125
        if (annot == null) {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   126
            Package p = intf.getPackage();
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   127
            if (p != null)
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   128
                annot = p.getAnnotation(MXBeanMappingFactoryClass.class);
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   129
        }
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   130
        if (annot == null)
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   131
            return MXBeanMappingFactory.DEFAULT;
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   132
        Class<? extends MXBeanMappingFactory> factoryClass = annot.value();
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   133
        try {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   134
            return annot.value().newInstance();
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   135
        } catch (Exception e) {
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   136
            throw new IllegalArgumentException(
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   137
                    "Could not instantiate MXBeanMappingFactory " +
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   138
                    factoryClass.getName() +
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   139
                    " from @MXBeanMappingFactoryClass", e);
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   140
        }
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   141
    }
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   142
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   143
    /**
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   144
     * <p>Return the mapping for the given Java type.  Typically, a
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   145
     * mapping factory will return mappings for types it handles, and
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   146
     * forward other types to another mapping factory, most often
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   147
     * the {@linkplain #DEFAULT default one}.</p>
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   148
     * @param t the Java type to be mapped.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   149
     * @param f the original mapping factory that was consulted to do
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   150
     * the mapping.  A mapping factory should pass this parameter intact
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   151
     * if it forwards a type to another mapping factory.  In the example,
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   152
     * this is how {@code MyLinkedListMappingFactory} works for types
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   153
     * like {@code MyLinkedList[]} and {@code List<MyLinkedList>}.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   154
     * @return the mapping for the given type.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   155
     * @throws OpenDataException if this type cannot be mapped.  This
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   156
     * exception is appropriate if the factory is supposed to handle
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   157
     * all types of this sort (for example, all linked lists), but
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   158
     * cannot handle this particular type.
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   159
     */
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   160
    public abstract MXBeanMapping mappingForType(Type t, MXBeanMappingFactory f)
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   161
    throws OpenDataException;
874e25a9844a 6562936: Support custom type mappings in MXBeans
emcmanus
parents:
diff changeset
   162
}