Java Code Examples for javax.management.openmbean.OpenType.getClassName()

The following are Jave code examples for showing how to use getClassName() of the javax.management.openmbean.OpenType class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenJSharp   File: MXBeanMapping.java   Source Code and License Vote up 5 votes
private static Class<?> makeOpenClass(Type javaType, OpenType<?> openType) {
    if (javaType instanceof Class<?> && ((Class<?>) javaType).isPrimitive())
        return (Class<?>) javaType;
    try {
        String className = openType.getClassName();
        return Class.forName(className, false, MXBeanMapping.class.getClassLoader());
    } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);  // should not happen
    }
}
 
Example 2
Project: jdk8u-jdk   File: MXBeanMapping.java   Source Code and License Vote up 5 votes
private static Class<?> makeOpenClass(Type javaType, OpenType<?> openType) {
    if (javaType instanceof Class<?> && ((Class<?>) javaType).isPrimitive())
        return (Class<?>) javaType;
    try {
        String className = openType.getClassName();
        return Class.forName(className, false, MXBeanMapping.class.getClassLoader());
    } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);  // should not happen
    }
}
 
Example 3
Project: openjdk-jdk10   File: MXBeanMapping.java   Source Code and License Vote up 5 votes
private static Class<?> makeOpenClass(Type javaType, OpenType<?> openType) {
    if (javaType instanceof Class<?> && ((Class<?>) javaType).isPrimitive())
        return (Class<?>) javaType;
    try {
        String className = openType.getClassName();
        return Class.forName(className, false, MXBeanMapping.class.getClassLoader());
    } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);  // should not happen
    }
}