org.apache.commons.modeler
Class AttributeInfo

java.lang.Object
  |
  +--org.apache.commons.modeler.FeatureInfo
        |
        +--org.apache.commons.modeler.AttributeInfo

public class AttributeInfo
extends FeatureInfo

Internal configuration information for an Attribute descriptor.

Version:
$Revision: 1.1.1.1 $ $Date: 2002/04/30 20:58:51 $
Author:
Craig R. McClanahan

Field Summary
protected  java.lang.String displayName
          The display name of this attribute.
protected  java.lang.String getMethod
          The name of the property getter method, if non-standard.
(package private)  javax.management.modelmbean.ModelMBeanAttributeInfo info
          The ModelMBeanAttributeInfo object that corresponds to this AttributeInfo instance.
protected  boolean is
          Is this a boolean attribute with an "is" getter?
protected  boolean readable
          Is this attribute readable by management applications?
protected  java.lang.String setMethod
          The name of the property setter method, if non-standard.
protected  java.lang.String type
          The fully qualified Java class name of this attribute.
protected  boolean writeable
          Is this attribute writeable by management applications?
 
Fields inherited from class org.apache.commons.modeler.FeatureInfo
description, name
 
Constructor Summary
AttributeInfo()
           
 
Method Summary
 javax.management.modelmbean.ModelMBeanAttributeInfo createAttributeInfo()
          Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by this instance.
 java.lang.String getDisplayName()
           
 java.lang.String getGetMethod()
           
private  java.lang.String getMethodName(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.
 java.lang.String getSetMethod()
           
 java.lang.String getType()
           
 boolean isIs()
           
 boolean isReadable()
           
 boolean isWriteable()
           
 void setDescription(java.lang.String description)
          Override the description property setter.
 void setDisplayName(java.lang.String displayName)
           
 void setGetMethod(java.lang.String getMethod)
           
 void setIs(boolean is)
           
 void setName(java.lang.String name)
          Override the name property setter.
 void setReadable(boolean readable)
           
 void setSetMethod(java.lang.String setMethod)
           
 void setType(java.lang.String type)
           
 void setWriteable(boolean writeable)
           
 java.lang.String toString()
          Return a string representation of this attribute descriptor.
 
Methods inherited from class org.apache.commons.modeler.FeatureInfo
getDescription, getName
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

info

javax.management.modelmbean.ModelMBeanAttributeInfo info
The ModelMBeanAttributeInfo object that corresponds to this AttributeInfo instance.

displayName

protected java.lang.String displayName
The display name of this attribute.

getMethod

protected java.lang.String getMethod
The name of the property getter method, if non-standard.

is

protected boolean is
Is this a boolean attribute with an "is" getter?

readable

protected boolean readable
Is this attribute readable by management applications?

setMethod

protected java.lang.String setMethod
The name of the property setter method, if non-standard.

type

protected java.lang.String type
The fully qualified Java class name of this attribute.

writeable

protected boolean writeable
Is this attribute writeable by management applications?
Constructor Detail

AttributeInfo

public AttributeInfo()
Method Detail

setDescription

public void setDescription(java.lang.String description)
Override the description property setter.
Overrides:
setDescription in class FeatureInfo
Parameters:
description - The new description

setName

public void setName(java.lang.String name)
Override the name property setter.
Overrides:
setName in class FeatureInfo
Parameters:
name - The new name

getDisplayName

public java.lang.String getDisplayName()

setDisplayName

public void setDisplayName(java.lang.String displayName)

getGetMethod

public java.lang.String getGetMethod()

setGetMethod

public void setGetMethod(java.lang.String getMethod)

isIs

public boolean isIs()

setIs

public void setIs(boolean is)

isReadable

public boolean isReadable()

setReadable

public void setReadable(boolean readable)

getSetMethod

public java.lang.String getSetMethod()

setSetMethod

public void setSetMethod(java.lang.String setMethod)

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

isWriteable

public boolean isWriteable()

setWriteable

public void setWriteable(boolean writeable)

createAttributeInfo

public javax.management.modelmbean.ModelMBeanAttributeInfo createAttributeInfo()
Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by this instance.

toString

public java.lang.String toString()
Return a string representation of this attribute descriptor.
Overrides:
toString in class java.lang.Object

getMethodName

private java.lang.String getMethodName(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.
Parameters:
name - Name of the property itself
getter - Do we want a get method (versus a set method)?
is - If returning a getter, do we want the "is" form?


Copyright (c) 2001-2002 - Apache Software Foundation