public class ReflectionResolver extends AbstractResolver implements com.google.common.cache.RemovalListener<org.trimou.engine.resolver.MemberKey,com.google.common.base.Optional<org.trimou.engine.resolver.MemberWrapper>>
Reflections.getAccesibleField(Class, String),
Reflections.getAccesibleMethod(Class, String)| Modifier and Type | Field and Description |
|---|---|
static ConfigurationKey |
MEMBER_CACHE_MAX_SIZE_KEY
Limit the size of the cache (e.g. to avoid problems when dynamic class
compilation is involved).
|
static int |
REFLECTION_RESOLVER_PRIORITY |
BUILTIN_RESOLVERS_DEFAULT_PRIORITY, BUILTIN_TEMPLATE_LOCATORS_DEFAULT_PRIORITY, EXTENSION_RESOLVERS_DEFAULT_PRIORITY| Constructor and Description |
|---|
ReflectionResolver() |
| Modifier and Type | Method and Description |
|---|---|
Set<ConfigurationKey> |
getConfigurationKeys() |
int |
getPriority() |
void |
init(Configuration configuration)
Initialize the instance.
|
void |
onRemoval(com.google.common.cache.RemovalNotification<org.trimou.engine.resolver.MemberKey,com.google.common.base.Optional<org.trimou.engine.resolver.MemberWrapper>> notification) |
Object |
resolve(Object contextObject,
String name)
Resolve the value from specified context object and name.
|
toStringpublic static final int REFLECTION_RESOLVER_PRIORITY
public static final ConfigurationKey MEMBER_CACHE_MAX_SIZE_KEY
CacheBuilder.maximumSize(long)public Object resolve(Object contextObject, String name)
Resolvernull in case of the resolver is not capable
of resolving it.public int getPriority()
getPriority in interface WithPrioritypublic void init(Configuration configuration)
ConfigurationAwareinit in interface ConfigurationAwareinit in class AbstractResolverpublic Set<ConfigurationKey> getConfigurationKeys()
getConfigurationKeys in interface ConfigurationAwaregetConfigurationKeys in class AbstractResolverpublic void onRemoval(com.google.common.cache.RemovalNotification<org.trimou.engine.resolver.MemberKey,com.google.common.base.Optional<org.trimou.engine.resolver.MemberWrapper>> notification)
onRemoval in interface com.google.common.cache.RemovalListener<org.trimou.engine.resolver.MemberKey,com.google.common.base.Optional<org.trimou.engine.resolver.MemberWrapper>>Copyright © 2013. All Rights Reserved.