if (value instanceof JMeterProperty)
{
return (JMeterProperty)value;
}
JMeterProperty property;
if (value == null)
{
property= new NullProperty();
}
else if (value instanceof Boolean)
{
property= new BooleanProperty();
}
else if (value instanceof Double)
{
property= new DoubleProperty();
}
else if (value instanceof Float)
{
property= new FloatProperty();
}
else if (value instanceof Integer)
{
property= new IntegerProperty();
}
else if (value instanceof Long)
{
property= new LongProperty();
}
else if (value instanceof String)
{
property= new StringProperty();
}
else if (value instanceof TestElement)
{
property= new TestElementProperty();
}
else throw new Error("Ouch!");
property.setObjectValue(value);
return property;
}