当前位置: 首页>>代码示例>>Java>>正文


Java MBeanInfo.getConstructors方法代码示例

本文整理汇总了Java中javax.management.MBeanInfo.getConstructors方法的典型用法代码示例。如果您正苦于以下问题:Java MBeanInfo.getConstructors方法的具体用法?Java MBeanInfo.getConstructors怎么用?Java MBeanInfo.getConstructors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.management.MBeanInfo的用法示例。


在下文中一共展示了MBeanInfo.getConstructors方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMBeanInfo

import javax.management.MBeanInfo; //导入方法依赖的package包/类
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:MBeanIntrospector.java

示例2: printMBeanInfo

import javax.management.MBeanInfo; //导入方法依赖的package包/类
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:21,代码来源:MXBeanInteropTest2.java

示例3: getMBeanInfo

import javax.management.MBeanInfo; //导入方法依赖的package包/类
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:StandardMBeanSupport.java

示例4: check

import javax.management.MBeanInfo; //导入方法依赖的package包/类
private static void check(MBeanServer mbs, ObjectName on) throws Exception {
    MBeanInfo mbi = mbs.getMBeanInfo(on);

    // check the MBean itself
    check(mbi);

    // check attributes
    MBeanAttributeInfo[] attrs = mbi.getAttributes();
    for (MBeanAttributeInfo attr : attrs) {
        check(attr);
        if (attr.getName().equals("ReadOnly"))
            check("@Full", attr.getDescriptor(), expectedFullDescriptor);
    }

    // check operations
    MBeanOperationInfo[] ops = mbi.getOperations();
    for (MBeanOperationInfo op : ops) {
        check(op);
        check(op.getSignature());
    }

    MBeanConstructorInfo[] constrs = mbi.getConstructors();
    for (MBeanConstructorInfo constr : constrs) {
        check(constr);
        check(constr.getSignature());
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:28,代码来源:AnnotationTest.java


注:本文中的javax.management.MBeanInfo.getConstructors方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。