org.apache.felix.mosgi.jmx.httpconnector.mx4j.tools.adaptor.http
Class CommandProcessorUtil

java.lang.Object
  extended by org.apache.felix.mosgi.jmx.httpconnector.mx4j.tools.adaptor.http.CommandProcessorUtil

public class CommandProcessorUtil
extends Object

Contains utilities common to CommandProcessor objects

Version:
$Revision: 1.2 $
Author:
Carlos Quiroz, Lachezar Dobrev

Constructor Summary
CommandProcessorUtil()
           
 
Method Summary
protected static boolean canCreateParameterValue(String parameterType)
          Checks if the given type is primitive of can be initialized from String.
This is done by trying to load the class and checking if there is a public String only constructor.
static Comparator createClassComparator()
           
static Comparator createConstructorComparator()
           
static Comparator createObjectInstanceComparator()
           
static Comparator createObjectNameComparator()
           
protected static Object createParameterValue(String parameterType, String parameterValue)
          Creates a parameter object of the given type containing a given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandProcessorUtil

public CommandProcessorUtil()
Method Detail

createParameterValue

protected static Object createParameterValue(String parameterType,
                                             String parameterValue)
                                      throws Exception
Creates a parameter object of the given type containing a given value. If the type is unknown null is returned

Parameters:
parameterType - Indicates the type of the parameter, for instance java.lang.String
parameterValue - The value of the parameter as a String
Returns:
an object of parameterType type and value parameterValue or null if the type is unknown
Throws:
Thrown - in case there is a data conversion error
Exception

canCreateParameterValue

protected static boolean canCreateParameterValue(String parameterType)
Checks if the given type is primitive of can be initialized from String.
This is done by trying to load the class and checking if there is a public String only constructor.

Parameters:
parameterType - Indicates the type of the parameter, for instance java.lang.String
Returns:
true if the type is primitive or String initializable
Throws:
Thrown - in case there is a data conversion error

createObjectNameComparator

public static Comparator createObjectNameComparator()

createObjectInstanceComparator

public static Comparator createObjectInstanceComparator()

createConstructorComparator

public static Comparator createConstructorComparator()

createClassComparator

public static Comparator createClassComparator()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.