Code example for Constructor

Methods: getAnnotationgetName

0
     * @return MBeanConstructorInfo 
     */ 
    private static MBeanConstructorInfo getMBeanConstructorInfo(Constructor cons)
    { 
        String desc = _defaultConstructorDescription;
        Annotation anno = cons.getAnnotation(MBeanConstructor.class);
        if (anno != null && MBeanConstructor.class.isInstance(anno))
        { 
            desc = MBeanConstructor.class.cast(anno).value();
            if(desc == null)
            { 
                desc = _defaultConstructorDescription;
            } 
        } 
 
        //MBeanParameterInfo[] paramsInfo = getParametersInfo(cons.getParameterAnnotations(), 
        //                                                    cons.getParameterTypes()); 
 
        return new MBeanConstructorInfo(cons.getName(), desc, null);
    } 
 
    /** 
     * Retrieves the description from the annotations of given class 
     * @param annotatedClass