net.sf.sasl.language.placeholder.aop.resolver
Class ParanamerChainDelegator

java.lang.Object
  extended by net.sf.sasl.language.placeholder.aop.resolver.ParanamerChainDelegator
All Implemented Interfaces:
IParameterNameLoader

public class ParanamerChainDelegator
extends Object
implements IParameterNameLoader

Simple delegator class to paranamer implementations which tries to resolve parameter names over different paranamer resolve strategies until one strategie succeeds. The class does basically the same as AdaptiveParanamer. If all resolvers fail than the default parameter table will be of the form "arg0", "arg1", ...

Since:
0.0.1 (sasl-common-aspect-library)
Author:
Philipp Förmer
See Also:
http://paranamer.codehaus.org/}

Constructor Summary
ParanamerChainDelegator()
           
 
Method Summary
 List<com.thoughtworks.paranamer.Paranamer> getChainList()
          Returns the list of paranamer implementations which will be used for resolution of parameter names.
 String[] loadParameterTable(Method method)
          Tries to load the parameter names of the method.
 void setChainList(List<com.thoughtworks.paranamer.Paranamer> chainList)
          Sets a list of paranamer implementations which will be used for resolution of parameter names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParanamerChainDelegator

public ParanamerChainDelegator()
Method Detail

getChainList

public List<com.thoughtworks.paranamer.Paranamer> getChainList()
Returns the list of paranamer implementations which will be used for resolution of parameter names.

Returns:
null or non null
Since:
0.0.1 (sasl-common-aspect-library)

setChainList

public void setChainList(List<com.thoughtworks.paranamer.Paranamer> chainList)
Sets a list of paranamer implementations which will be used for resolution of parameter names. For resolution list element n has a higher priority as list element n+1. That means if list element n resolves parameter names for a method successfully, than list element n+1 will be never called for parameter name resolution for that method.

Parameters:
chainList - null or non null
Since:
0.0.1 (sasl-common-aspect-library)

loadParameterTable

public String[] loadParameterTable(Method method)
                            throws IllegalArgumentException
Description copied from interface: IParameterNameLoader
Tries to load the parameter names of the method. Returns a string array of the parameter names on success. If the parameter names could not get loaded than null is returned.

Specified by:
loadParameterTable in interface IParameterNameLoader
Parameters:
method - non null
Returns:
null or non null array
Throws:
IllegalArgumentException
Since:
0.0.1 (sasl-common-aspect-library)
See Also:
philipp.aop.logging.parameter.IParameterNameLoader}


Copyright © 2010. All Rights Reserved.