FileDocCategorySizeDatePackage
AttributeInfo.javaAPI DocApache Tomcat 6.0.144821Fri Jul 20 04:20:32 BST 2007org.apache.tomcat.util.modeler

AttributeInfo

public class AttributeInfo extends FeatureInfo implements Serializable

Internal configuration information for an Attribute descriptor.

author
Craig R. McClanahan

Fields Summary
static final long
serialVersionUID
protected String
displayName
protected String
getMethod
protected String
setMethod
protected boolean
readable
protected boolean
writeable
protected boolean
is
Constructors Summary
Methods Summary
javax.management.MBeanAttributeInfocreateAttributeInfo()
Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by this instance.

        // Return our cached information (if any)
        if (info == null) {
            info = new MBeanAttributeInfo(getName(), getType(), getDescription(),
                            isReadable(), isWriteable(), false);
        }
        return (MBeanAttributeInfo)info;
    
public java.lang.StringgetDisplayName()
The display name of this attribute.

    
    // ------------------------------------------------------------- Properties

               
       
        return (this.displayName);
    
public java.lang.StringgetGetMethod()
The name of the property getter method, if non-standard.

        if(getMethod == null) 
            getMethod = getMethodName(getName(), true, isIs());
        return (this.getMethod);
    
private java.lang.StringgetMethodName(java.lang.String name, boolean getter, boolean is)
Create and return the name of a default property getter or setter method, according to the specified values.

param
name Name of the property itself
param
getter Do we want a get method (versus a set method)?
param
is If returning a getter, do we want the "is" form?


        StringBuffer sb = new StringBuffer();
        if (getter) {
            if (is)
                sb.append("is");
            else
                sb.append("get");
        } else
            sb.append("set");
        sb.append(Character.toUpperCase(name.charAt(0)));
        sb.append(name.substring(1));
        return (sb.toString());

    
public java.lang.StringgetSetMethod()
The name of the property setter method, if non-standard.

        if( setMethod == null )
            setMethod = getMethodName(getName(), false, false);
        return (this.setMethod);
    
public booleanisIs()
Is this a boolean attribute with an "is" getter?

        return (this.is);
    
public booleanisReadable()
Is this attribute readable by management applications?

        return (this.readable);
    
public booleanisWriteable()
Is this attribute writeable by management applications?

        return (this.writeable);
    
public voidsetDisplayName(java.lang.String displayName)

        this.displayName = displayName;
    
public voidsetGetMethod(java.lang.String getMethod)

        this.getMethod = getMethod;
    
public voidsetIs(boolean is)

        this.is = is;
    
public voidsetReadable(boolean readable)

        this.readable = readable;
    
public voidsetSetMethod(java.lang.String setMethod)

        this.setMethod = setMethod;
    
public voidsetWriteable(boolean writeable)

        this.writeable = writeable;