Package org.aksw.jenax.reprogen.core
Interface MethodDescriptor
- All Known Implementing Classes:
MethodDescriptorBase,MethodDescriptorCollection,MethodDescriptorMap,MethodDescriptorSimple
public interface MethodDescriptor
-
Method Summary
Modifier and TypeMethodDescriptionstatic MethodDescriptorcollectionGetter(Method method, Class<?> collectionType, Class<?> itemType) static MethodDescriptorcollectionSetter(Method method, boolean fluentCapable, Class<?> collectionType, Class<?> itemType) static MethodDescriptordynamicCollectionGetter(Method method, Class<?> collectionType, Class<?> boundedItemType) Class<?>Class<?>Class<?>The method described by this descriptorClass<?>getType()Class<?>booleanbooleanFor signatures where the item type is dynamic based on a given class:Collection get(Class clazz) Only applies if isCollectionValued is true booleanOnly applicable to setters - is the method's return type assignable from the method's declaring class?booleanisGetter()booleandefault booleanisSetter()If a method is not a getter, it is by default assumed to be setterstatic MethodDescriptorstatic MethodDescriptorstatic MethodDescriptorstatic MethodDescriptorsimpleGetter(Method method, Class<?> type) static MethodDescriptorsimpleSetter(Method method, boolean fluentCapable, Class<?> type)
-
Method Details
-
getMethod
Method getMethod()The method described by this descriptor- Returns:
-
isGetter
boolean isGetter() -
isSetter
default boolean isSetter()If a method is not a getter, it is by default assumed to be setter- Returns:
-
isCollectionValued
boolean isCollectionValued() -
isDynamicCollection
boolean isDynamicCollection()For signatures where the item type is dynamic based on a given class:Collection get(Class clazz) Only applies if isCollectionValued is true - Returns:
-
getType
Class<?> getType() -
getItemType
Class<?> getItemType() -
getCollectionType
Class<?> getCollectionType() -
isMapType
boolean isMapType() -
getKeyType
Class<?> getKeyType() -
getValueType
Class<?> getValueType() -
isFluentCompatible
boolean isFluentCompatible()Only applicable to setters - is the method's return type assignable from the method's declaring class?- Returns:
-
simpleGetter
-
simpleSetter
-
collectionGetter
-
collectionSetter
static MethodDescriptor collectionSetter(Method method, boolean fluentCapable, Class<?> collectionType, Class<?> itemType) -
dynamicCollectionGetter
static MethodDescriptor dynamicCollectionGetter(Method method, Class<?> collectionType, Class<?> boundedItemType) -
mapGetter
-
mapGetter
-
mapSetter
static MethodDescriptor mapSetter(Method method, boolean fluentCapable, Class<?> keyType, Class<?> valueType)
-