org.apache.tools.ant.taskdefs.optional.jmx.converter
Interface ValueConverter
- All Known Implementing Classes:
- DefaultValueConverter, SetValueConverter, WebLogicMBeanValueConverter, PropertiesValueConverter, ValueFactory
- public interface ValueConverter
Objects that implement this interface are capable of converting a
java.lang.String value into an equivalent value object of a given type.
ValueConverter implementations register themselves with the ValueFactory class
which is in turn called by various JMX Ant tasks to get/set MBean attributes.
The ValueFactory is responsible for calling the appropriate
ValueConverter to create an Object based on the types the builder supports.
- Version:
- $Id: ValueConverter.java,v 1.3 2003/05/28 22:28:26 bdueck Exp $
- Author:
- Brian Dueck
Method Summary |
java.lang.String[] |
getSupportedTypes()
Returns an array of types (Java class names, or Java primitives)
this converter supports. |
java.lang.Object |
valueOf(java.lang.String value,
java.lang.String type)
Converts the specified string value to the specified type (java primitive type
or java class name). |
getSupportedTypes
public java.lang.String[] getSupportedTypes()
- Returns an array of types (Java class names, or Java primitives)
this converter supports.
- Returns:
- An array of supported type names.
valueOf
public java.lang.Object valueOf(java.lang.String value,
java.lang.String type)
throws java.lang.Exception
- Converts the specified string value to the specified type (java primitive type
or java class name).
- Parameters:
value
- The attribute value.type
- The java primitive type or class name.