{
return Short.parseShort( (String)o );
}
catch ( NumberFormatException e )
{
throw new ComponentException(e);
}
}
if (o instanceof Boolean)
{
return (Boolean)o? 1: short0;
}
if (o instanceof Character)
{
return ( short ) ((Character)o).charValue();
}
if (o instanceof Number)
{
return ((Number)o).shortValue();
}
if (o == null)
{
return 0;
}
throw new ComponentException( "Unrecognized input type: " + o);
}