Package org.apache.commons.modeler
Class OperationInfo
- java.lang.Object
-
- org.apache.commons.modeler.FeatureInfo
-
- org.apache.commons.modeler.OperationInfo
-
- All Implemented Interfaces:
Serializable
public class OperationInfo extends FeatureInfo implements Serializable
Internal configuration information for an
Operation
descriptor.- Version:
- $Revision: 480402 $ $Date: 2006-11-29 04:43:23 +0000 (Wed, 29 Nov 2006) $
- Author:
- Craig R. McClanahan
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
impact
protected ParameterInfo[]
parameters
protected String
returnType
protected String
role
-
Fields inherited from class org.apache.commons.modeler.FeatureInfo
description, fields, name
-
-
Constructor Summary
Constructors Constructor Description OperationInfo()
Standard zero-arguments constructor.OperationInfo(String name, boolean getter, String type)
Special constructor for setting up getter and setter operations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(ParameterInfo parameter)
Add a new parameter to the set of arguments for this operation.ModelMBeanOperationInfo
createOperationInfo()
Create and return aModelMBeanOperationInfo
object that corresponds to the attribute described by this instance.String
getImpact()
The "impact" of this operation, which should be a (case-insensitive) string value "ACTION", "ACTION_INFO", "INFO", or "UNKNOWN".String
getReturnType()
The fully qualified Java class name of the return type for this operation.String
getRole()
The role of this operation ("getter", "setter", "operation", or "constructor").ParameterInfo[]
getSignature()
The set of parameters for this operation.void
setDescription(String description)
Override thedescription
property setter.void
setImpact(String impact)
void
setName(String name)
Override thename
property setter.void
setReturnType(String returnType)
void
setRole(String role)
String
toString()
Return a string representation of this operation descriptor.-
Methods inherited from class org.apache.commons.modeler.FeatureInfo
addField, addFields, getDescription, getFields, getName
-
-
-
-
Field Detail
-
impact
protected String impact
-
role
protected String role
-
returnType
protected String returnType
-
parameters
protected ParameterInfo[] parameters
-
-
Constructor Detail
-
OperationInfo
public OperationInfo()
Standard zero-arguments constructor.
-
OperationInfo
public OperationInfo(String name, boolean getter, String type)
Special constructor for setting up getter and setter operations.- Parameters:
name
- Name of this operationgetter
- Is this a getter (as opposed to a setter)?type
- Data type of the return value (if this is a getter) or the parameter (if this is a setter)
-
-
Method Detail
-
setDescription
public void setDescription(String description)
Override thedescription
property setter.- Overrides:
setDescription
in classFeatureInfo
- Parameters:
description
- The new description
-
setName
public void setName(String name)
Override thename
property setter.- Overrides:
setName
in classFeatureInfo
- Parameters:
name
- The new name
-
getImpact
public String getImpact()
The "impact" of this operation, which should be a (case-insensitive) string value "ACTION", "ACTION_INFO", "INFO", or "UNKNOWN".
-
setImpact
public void setImpact(String impact)
-
getRole
public String getRole()
The role of this operation ("getter", "setter", "operation", or "constructor").
-
setRole
public void setRole(String role)
-
getReturnType
public String getReturnType()
The fully qualified Java class name of the return type for this operation.
-
setReturnType
public void setReturnType(String returnType)
-
getSignature
public ParameterInfo[] getSignature()
The set of parameters for this operation.
-
addParameter
public void addParameter(ParameterInfo parameter)
Add a new parameter to the set of arguments for this operation.- Parameters:
parameter
- The new parameter descriptor
-
createOperationInfo
public ModelMBeanOperationInfo createOperationInfo()
Create and return aModelMBeanOperationInfo
object that corresponds to the attribute described by this instance.
-
-