protected class AbstractNlsBundleFactory.NlsBundleInvocationHandler extends Object implements InvocationHandler
InvocationHandler for the dynamic NlsBundle instance.| Modifier and Type | Field and Description |
|---|---|
private String |
bundleName |
private Map<String,AbstractNlsBundleFactory.NlsBundleMethodInfo> |
method2BundleInfoMap
The cache for the
AbstractNlsBundleFactory.NlsBundleMethodInfos. |
private NlsBundleOptions |
options
The
NlsBundleOptions. |
| Constructor and Description |
|---|
NlsBundleInvocationHandler(String bundleName,
NlsBundleOptions options)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
createArgumentMap(Method method,
AbstractNlsBundleFactory.NlsBundleMethodInfo methodInfo,
Object[] arguments)
|
protected NlsTemplate |
createTemplate(Method method)
|
protected String[] |
getArgumentNames(Method method)
|
private AbstractNlsBundleFactory.NlsBundleMethodInfo |
getOrCreateMethodInfo(Method method,
Object[] args,
String methodName,
Object proxy)
Gets
AbstractNlsBundleFactory.NlsBundleMethodInfo for methodName from cache or creates it and puts it into the cache. |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
private final String bundleName
invoke(Object, Method, Object[])private final NlsBundleOptions options
NlsBundleOptions.private final Map<String,AbstractNlsBundleFactory.NlsBundleMethodInfo> method2BundleInfoMap
AbstractNlsBundleFactory.NlsBundleMethodInfos.public NlsBundleInvocationHandler(String bundleName, NlsBundleOptions options)
bundleName - is the qualified name of the ResourceBundle.options - are the NlsBundleOptions.protected Map<String,Object> createArgumentMap(Method method, AbstractNlsBundleFactory.NlsBundleMethodInfo methodInfo, Object[] arguments)
protected String[] getArgumentNames(Method method)
method - is the NlsBundle-Method that has been invoked.argument-names.public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowableprivate AbstractNlsBundleFactory.NlsBundleMethodInfo getOrCreateMethodInfo(Method method, Object[] args, String methodName, Object proxy)
AbstractNlsBundleFactory.NlsBundleMethodInfo for methodName from cache or creates it and puts it into the cache.method - is the Method or null for generic invocation (lookup).args - are the method arguments or null for generic invocation (lookup).methodName - is the name of the Method.proxy - is the proxy object used for generic invocation to find the Method by
methodName if not given.AbstractNlsBundleFactory.NlsBundleMethodInfo. May be null for generic invocation if method for
methodName was not found (does not exist).protected NlsTemplate createTemplate(Method method)
method - is the Method of an NlsBundle.NlsTemplate.Copyright © 2001–2015 mmm-Team. All rights reserved.