Class StringObjectPromoter
java.lang.Object
io.nosqlbench.virtdata.core.bindings.StringObjectPromoter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAssignableForConstructor(Class<?> have, Class<?> need) If a boxed type would suffice for a constructor call, even thoughClass.isAssignableFrom(Class)says the assignment wouldn't work, return true;static ObjectSpecialize the form of a string argument around the apparent object type.static ObjectSpecialize the type of an object according to a target class.
-
Constructor Details
-
StringObjectPromoter
public StringObjectPromoter()
-
-
Method Details
-
promote
Specialize the type of an object according to a target class.- Parameters:
raw- The string representation of an object.targetType- The target object type- Returns:
- The promoted form, in the target class, or the original value if the format failed or the class type was not supported.
-
promote
-
isAssignableForConstructor
If a boxed type would suffice for a constructor call, even thoughClass.isAssignableFrom(Class)says the assignment wouldn't work, return true;- Parameters:
have- The class that we have.need- The class that we need.- Returns:
- true, if the class that we have would work for a constructor call, due to unboxing.
-