Class DefaultClassResolver<T extends DynO>
java.lang.Object
overit.geocallapp.utilities.core.data.DefaultClassResolver<T>
- Type Parameters:
T- the type ofDynOobjects this resolver handles
- All Implemented Interfaces:
ClassResolver<T>
Default implementation of
This resolver provides a simple, static class resolution strategy where the same class is returned regardless of the input values. It's useful when you know exactly which class should be instantiated and don't need dynamic resolution based on data content.
The resolver is created using the factory pattern and configured with a specific class that will be returned for all resolution requests.
ClassResolver that always returns the same configured class. This resolver provides a simple, static class resolution strategy where the same class is returned regardless of the input values. It's useful when you know exactly which class should be instantiated and don't need dynamic resolution based on data content.
The resolver is created using the factory pattern and configured with a specific class that will be returned for all resolution requests.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResolvedClass(Map<String, Object> values) Returns the configured class regardless of the input values.static <T extends DynO>
DefaultClassResolver<T> makeResolver(Class<? extends T> resolvedClass) Factory method to create a newDefaultClassResolverinstance.protected voidsetResolvedClass(Class<? extends T> resolvedClass) Sets the class that will be returned for all resolution requests.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocallapp.utilities.core.data.ClassResolver
getResolvedClass
-
Constructor Details
-
DefaultClassResolver
public DefaultClassResolver()
-
-
Method Details
-
makeResolver
public static <T extends DynO> DefaultClassResolver<T> makeResolver(Class<? extends T> resolvedClass) Factory method to create a newDefaultClassResolverinstance.- Type Parameters:
T- the type ofDynOobjects the resolver will handle- Parameters:
resolvedClass- the class to be returned for all resolution requests- Returns:
- a new configured
DefaultClassResolverinstance
-
setResolvedClass
Sets the class that will be returned for all resolution requests.- Parameters:
resolvedClass- the class to be returned by this resolver
-
getResolvedClass
Returns the configured class regardless of the input values.- Specified by:
getResolvedClassin interfaceClassResolver<T extends DynO>- Parameters:
values- the input values (ignored by this implementation)- Returns:
- the configured class
-