org.apache.commons.modeler

Class AttributeInfo

Implemented Interfaces:
Serializable

public class AttributeInfo
extends FeatureInfo
implements Serializable

Internal configuration information for an Attribute descriptor.
Version:
$Revision: 1.7 $ $Date: 2003/07/20 07:35:12 $
Author:
Craig R. McClanahan

Field Summary

protected String
defaultStringValue
protected String
displayName
protected String
getMethod
protected Method
getMethodObj
protected ModelMBeanAttributeInfo
info
The ModelMBeanAttributeInfo object that corresponds to this AttributeInfo instance.
protected boolean
is
protected String
persist
protected boolean
readable
(package private) static long
serialVersionUID
protected String
setMethod
protected Method
setMethodObj
protected String
type
protected boolean
writeable

Fields inherited from class org.apache.commons.modeler.FeatureInfo

description, fields, name, serialVersionUID

Method Summary

ModelMBeanAttributeInfo
createAttributeInfo()
Create and return a ModelMBeanAttributeInfo object that corresponds to the attribute described by this instance.
String
getDefault()
Default value.
String
getDisplayName()
The display name of this attribute.
String
getGetMethod()
The name of the property getter method, if non-standard.
Method
getGetMethodObj()
private String
getMethodName(String name, boolean getter, boolean is)
Create and return the name of a default property getter or setter method, according to the specified values.
String
getPersist()
Persistence policy.
String
getSetMethod()
The name of the property setter method, if non-standard.
Method
getSetMethodObj()
String
getType()
The fully qualified Java class name of this attribute.
boolean
isIs()
Is this a boolean attribute with an "is" getter?
boolean
isReadable()
Is this attribute readable by management applications?
boolean
isWriteable()
Is this attribute writeable by management applications?
void
setDefault(String defaultStringValue)
void
setDescription(String description)
Override the description property setter.
void
setDisplayName(String displayName)
void
setGetMethod(String getMethod)
void
setGetMethodObj(Method getMethodObj)
void
setIs(boolean is)
void
setName(String name)
Override the name property setter.
void
setPersist(String persist)
void
setReadable(boolean readable)
void
setSetMethod(String setMethod)
void
setSetMethodObj(Method setMethodObj)
void
setType(String type)
void
setWriteable(boolean writeable)
String
toString()
Return a string representation of this attribute descriptor.

Methods inherited from class org.apache.commons.modeler.FeatureInfo

addField, addFields, getDescription, getFields, getName, setDescription, setName

Field Details

defaultStringValue

protected String defaultStringValue

displayName

protected String displayName

getMethod

protected String getMethod

getMethodObj

protected Method getMethodObj

info

protected ModelMBeanAttributeInfo info
The ModelMBeanAttributeInfo object that corresponds to this AttributeInfo instance.

is

protected boolean is

persist

protected String persist

readable

protected boolean readable

serialVersionUID

(package private) static final long serialVersionUID
Field Value:
-2511626862303972143L

setMethod

protected String setMethod

setMethodObj

protected Method setMethodObj

type

protected String type

writeable

protected boolean writeable

Method Details

createAttributeInfo

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

getDefault

public String getDefault()
Default value. If set, it can provide info to the user and it can be used by persistence mechanism to generate a more compact representation ( a value may not be saved if it's default )

getDisplayName

public String getDisplayName()
The display name of this attribute.

getGetMethod

public String getGetMethod()
The name of the property getter method, if non-standard.

getGetMethodObj

public Method getGetMethodObj()

getMethodName

private String getMethodName(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?

getPersist

public String getPersist()
Persistence policy. All persistent attributes should have this attribute set. Valid values: ???

getSetMethod

public String getSetMethod()
The name of the property setter method, if non-standard.

getSetMethodObj

public Method getSetMethodObj()

getType

public String getType()
The fully qualified Java class name of this attribute.

isIs

public boolean isIs()
Is this a boolean attribute with an "is" getter?

isReadable

public boolean isReadable()
Is this attribute readable by management applications?

isWriteable

public boolean isWriteable()
Is this attribute writeable by management applications?

setDefault

public void setDefault(String defaultStringValue)

setDescription

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

setDisplayName

public void setDisplayName(String displayName)

setGetMethod

public void setGetMethod(String getMethod)

setGetMethodObj

public void setGetMethodObj(Method getMethodObj)

setIs

public void setIs(boolean is)

setName

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

setPersist

public void setPersist(String persist)

setReadable

public void setReadable(boolean readable)

setSetMethod

public void setSetMethod(String setMethod)

setSetMethodObj

public void setSetMethodObj(Method setMethodObj)

setType

public void setType(String type)

setWriteable

public void setWriteable(boolean writeable)

toString

public String toString()
Return a string representation of this attribute descriptor.

Copyright (c) 2001-2003 - Apache Software Foundation