net.sf.oval.guard
Class ParameterNameResolverParanamerImpl

java.lang.Object
  extended by net.sf.oval.guard.ParameterNameResolverParanamerImpl
All Implemented Interfaces:
ParameterNameResolver

public class ParameterNameResolverParanamerImpl
extends Object
implements ParameterNameResolver

This implementation that uses com.thoughtworks.paranamer.Paranamer (http://paranamer.codehaus.org/) to determine the names of parameter names as a fallback the results of a ParameterNameResolverEnumerationImpl are returned

Author:
Sebastian Thomschke

Constructor Summary
ParameterNameResolverParanamerImpl()
           
ParameterNameResolverParanamerImpl(com.thoughtworks.paranamer.Paranamer paranamer)
           
 
Method Summary
 String[] getParameterNames(Constructor<?> constructor)
          Returns an empty String array if no parameters are declared.
 String[] getParameterNames(Method method)
          Returns an empty String array if no parameters are declared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterNameResolverParanamerImpl

public ParameterNameResolverParanamerImpl()

ParameterNameResolverParanamerImpl

public ParameterNameResolverParanamerImpl(com.thoughtworks.paranamer.Paranamer paranamer)
Method Detail

getParameterNames

public String[] getParameterNames(Constructor<?> constructor)
                           throws ReflectionException
Returns an empty String array if no parameters are declared.

Specified by:
getParameterNames in interface ParameterNameResolver
Parameters:
constructor - the constructor
Returns:
an array holding the parameter names of the given constructor.
Throws:
ReflectionException - in case retrieving the parameter names fails

getParameterNames

public String[] getParameterNames(Method method)
                           throws ReflectionException
Returns an empty String array if no parameters are declared

Specified by:
getParameterNames in interface ParameterNameResolver
Parameters:
method - the method
Returns:
an array holding the parameter names of the given method.
Throws:
ReflectionException - in case retrieving the parameter names fails


Copyright © 2005–2015 The OVal Development Team. All rights reserved.