public final class GridifyUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN_SIZE |
Modifier and Type | Method and Description |
---|---|
static @Nullable Object |
collectionToParameter(Class<?> paramCls,
Collection data)
Converts
Collection back to object applied for method. |
static Collection<String> |
getAllowedMethodParameterTypes()
Allowed method return types.
|
static List<String> |
getAllowedMethodReturnTypes()
Allowed method return types.
|
static Iterator<?> |
getIterator(Object obj)
Gets iterator or create new for container object with elements with unknown type.
|
static int |
getLength(Object obj)
Gets length of elements in container object with unknown type.
|
static boolean |
isMethodParameterTypeAllowed(Class<?> cls)
Check if method parameter type type can be used for
GridifySetToSet
or GridifySetToValue annotations. |
static boolean |
isMethodParameterTypeAnnotated(Annotation[] anns)
Check is method parameter annotated with
GridifyInput . |
static boolean |
isMethodReturnTypeValid(Class<?> cls)
Check if method return type can be used for
GridifySetToSet
or GridifySetToValue annotations. |
static @Nullable Collection |
parameterToCollection(Object arg)
Converts parameter object to
Collection . |
public static final int UNKNOWN_SIZE
public static int getLength(Object obj)
UNKNOWN_SIZE
value.obj
- Container object with elements.UNKNOWN_SIZE
.public static Iterator<?> getIterator(Object obj)
obj
- Container object with elements.public static boolean isMethodReturnTypeValid(Class<?> cls)
GridifySetToSet
or GridifySetToValue
annotations.cls
- Method return type class to check.true
if method return type is valid.public static boolean isMethodParameterTypeAllowed(Class<?> cls)
GridifySetToSet
or GridifySetToValue
annotations.cls
- Method parameter to check.true
if method parameter type is valid.public static boolean isMethodParameterTypeAnnotated(Annotation[] anns)
GridifyInput
.anns
- Annotations for method parameters.true
if annotation found.public static List<String> getAllowedMethodReturnTypes()
public static Collection<String> getAllowedMethodParameterTypes()
@Nullable public static @Nullable Collection parameterToCollection(Object arg)
Collection
.arg
- Method parameter object.null
for unknown object.@Nullable public static @Nullable Object collectionToParameter(Class<?> paramCls, Collection data)
Collection
back to object applied for method.paramCls
- Method parameter type.data
- Collection of data elements.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021