Package org.jgroups.annotations

Examples of org.jgroups.annotations.ManagedAttribute.description()


                boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();
                boolean expose=attr != null || expose_prop;

                if(expose) {
                    String fieldName = Util.attributeNameToMethodName(field.getName());
                    String descr=attr != null? attr.description() : prop.description();
                    boolean writable=attr != null? attr.writable() : prop.writable();

                    MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,
                                                                   field.getType().getCanonicalName(),
                                                                   descr,
View Full Code Here


            boolean writeAttribute=false;
            if(isSetMethod(method)) { // setter
                attributeName=(attributeName==null)?methodName.substring(3):attributeName;
                info=new MBeanAttributeInfo(attributeName,
                                            method.getParameterTypes()[0].getCanonicalName(),
                                            attr.description(),
                                            true,
                                            true,
                                            false);
                writeAttribute=true;
            }
View Full Code Here

                    //we found is method
                    if(methodName.startsWith("is")) {
                        attributeName=(attributeName==null)?methodName.substring(2):attributeName;
                        info=new MBeanAttributeInfo(attributeName,
                                                    method.getReturnType().getCanonicalName(),
                                                    attr.description(),
                                                    true,
                                                    hasSetter,
                                                    true);
                    }
                    else {
View Full Code Here

                    else {
                        //this has to be get
                        attributeName=(attributeName==null)?methodName.substring(3):attributeName;
                        info=new MBeanAttributeInfo(attributeName,
                                                    method.getReturnType().getCanonicalName(),
                                                    attr.description(),
                                                    true,
                                                    hasSetter,
                                                    false);
                    }
                }
View Full Code Here

                        //we already have annotated field as read
                        //lets make the field writable
                        Field f = ((FieldAttributeEntry)ae).getField();
                        MBeanAttributeInfo i=new MBeanAttributeInfo(ae.getInfo().getName(),
                                                                    f.getType().getCanonicalName(),
                                                                    attr.description(),
                                                                    true,
                                                                    Modifier.isFinal(f.getModifiers())? false: true,
                                                                    false);                              
                        atts.put(attributeName,new FieldAttributeEntry(i,f));
                    }
View Full Code Here

                ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);
                if(attr != null) {
                    String fieldName = renameToJavaCodingConvention(field.getName());
                    MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,
                                                                   field.getType().getCanonicalName(),
                                                                   attr.description(),
                                                                   true,
                                                                   Modifier.isFinal(field.getModifiers())? false: attr.writable(),
                                                                   false);

                    atts.put(fieldName, new FieldAttributeEntry(info, field));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.