Class DefaultBindableCache
java.lang.Object
org.tentackle.bind.DefaultBindableCache
- All Implemented Interfaces:
BindableCache
Default implementation of the cache for bindable elements per class.
Annotated getters, setters, "from"- or "with"-methods and fields of the same name are merged into a single element. For records, the "from"- or "with"-method of an annotated component is detected automatically.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultBindableCache(BindingFactory bindingFactory) Creates a bindable cache. -
Method Summary
Modifier and TypeMethodDescriptiongetBindableMap(Class<?> clazz, boolean declaredOnly) Gets the map of bindables for the given class.
-
Constructor Details
-
DefaultBindableCache
Creates a bindable cache.- Parameters:
bindingFactory- the binding factory to create binding elements
-
-
Method Details
-
getBindableMap
Gets the map of bindables for the given class.- Specified by:
getBindableMapin interfaceBindableCache- Parameters:
clazz- the class to retrieve the bindables fordeclaredOnly- true if only declared elements, else inherited as well- Returns:
- the elements
- Throws:
BindingException- if more than one setter or "from"-method is annotated for the same element
-