Package org.jgroups.annotations

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


                    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

                if(atts.containsKey(tmp))
                    attr_name=tmp;
            }
        }

        String descr=attr_annotation != null ? attr_annotation.description() : prop != null? prop.description() : null;
        AttributeEntry attr=atts.get(attr_name);
        if(attr != null) {
            if(isSetMethod(method)) {
                if(attr.setter != null) {
                    if(log.isWarnEnabled())
View Full Code Here

                if(expose) {
                    String fieldName=attr != null? attr.name() : (prop != null? prop.name() : null);
                    if(fieldName != null && fieldName.trim().isEmpty())
                        fieldName=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

        if(attributeName != null && attributeName.trim().length() > 0)
            attributeName=attributeName.trim();
        else
            attributeName=null;
           
        String descr=attr != null ? attr.description() : prop != null? prop.description() : null;

        boolean writeAttribute=false;
        MBeanAttributeInfo info=null;
        if(isSetMethod(method)) { // setter
            attributeName=(attributeName==null)?methodName.substring(3):attributeName;
View Full Code Here

                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

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.