public class StringObjectPromoter extends Object
| Constructor and Description |
|---|
StringObjectPromoter() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isAssignableForConstructor(Class<?> have,
Class<?> need)
If a boxed type would suffice for a constructor call, even though
Class.isAssignableFrom(Class) says the assignment wouldn't work,
return true; |
static Object |
promote(String stringArg)
Specialize the form of a string argument around the apparent object type.
|
static Object |
promote(String raw,
Class<?> targetType)
Specialize the type of an object according to a target class.
|
public static Object promote(String raw, Class<?> targetType)
raw - The string representation of an object.targetType - The target object typepublic static Object promote(String stringArg)
stringArg - The raw value in string formpublic static boolean isAssignableForConstructor(Class<?> have, Class<?> need)
Class.isAssignableFrom(Class) says the assignment wouldn't work,
return true;have - The class that we have.need - The class that we need.Copyright © 2018. All rights reserved.