public final class FunctionTypeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
discoverBeanDefinitionNameByQualifier(org.springframework.beans.factory.ListableBeanFactory beanFactory,
String qualifier) |
static Method |
discoverFunctionalMethod(Class<?> pojoFunctionClass)
Will attempt to discover functional methods on the class.
|
static Type |
discoverFunctionType(Object function,
String functionName,
org.springframework.context.support.GenericApplicationContext applicationContext) |
static Type |
discoverFunctionTypeFromClass(Class<?> functionalClass) |
static Type |
discoverFunctionTypeFromFunctionMethod(Method functionMethod) |
static Type |
getGenericType(Type type)
A convenience method identical to
getImmediateGenericType(Type, int)
for cases when provided 'type' is Publisher or Message. |
static Type |
getImmediateGenericType(Type type,
int index) |
static int |
getInputCount(Type functionType) |
static Type |
getInputType(Type functionType)
Returns input type of function type that represents Function or Consumer.
|
static int |
getOutputCount(Type functionType) |
static Type |
getOutputType(Type functionType) |
static Class<?> |
getRawType(Type type)
Effectively converts
Type which could be ParameterizedType to raw Class (no generics). |
static boolean |
isCollectionOfMessage(Type type) |
static boolean |
isConsumer(Type type) |
static boolean |
isFlux(Type type) |
static boolean |
isFunction(Type type) |
static boolean |
isMessage(Type type) |
static boolean |
isMono(Type type) |
static boolean |
isMultipleArgumentType(Type type) |
static boolean |
isOutputArray(Type functionType)
Determines if input argument to a Function is an array.
|
static boolean |
isPublisher(Type type) |
static boolean |
isSupplier(Type type) |
static boolean |
isTypeArray(Type type) |
static boolean |
isTypeCollection(Type type)
Will return 'true' if the provided type is a
Collection type. |
public static boolean isTypeCollection(Type type)
Collection type.
This also includes collections wrapped in Message. For example,
If provided type is Message<List<Foo>> this operation will return 'true'.type - type to interrogateCollection. Otherwise 'false'.public static boolean isTypeArray(Type type)
public static Type getGenericType(Type type)
getImmediateGenericType(Type, int)
for cases when provided 'type' is Publisher or Message.type - type to interrogatepublic static Class<?> getRawType(Type type)
Type which could be ParameterizedType to raw Class (no generics).public static Method discoverFunctionalMethod(Class<?> pojoFunctionClass)
FunctionalInterface)pojoFunctionClass - the class to introspectpublic static Type discoverFunctionTypeFromClass(Class<?> functionalClass)
public static Type discoverFunctionTypeFromFunctionMethod(Method functionMethod)
public static int getInputCount(Type functionType)
public static int getOutputCount(Type functionType)
public static Type getInputType(Type functionType)
functionType - the Type of Function or ConsumerTypepublic static Type discoverFunctionType(Object function, String functionName, org.springframework.context.support.GenericApplicationContext applicationContext)
public static String discoverBeanDefinitionNameByQualifier(org.springframework.beans.factory.ListableBeanFactory beanFactory, String qualifier)
public static boolean isPublisher(Type type)
public static boolean isFlux(Type type)
public static boolean isCollectionOfMessage(Type type)
public static boolean isMessage(Type type)
public static boolean isOutputArray(Type functionType)
functionType - the function typepublic static boolean isSupplier(Type type)
public static boolean isFunction(Type type)
public static boolean isConsumer(Type type)
public static boolean isMono(Type type)
public static boolean isMultipleArgumentType(Type type)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.