<dependency>
<groupId>com.thoughtworks.paranamer</groupId>
<artifactId>paranamer</artifactId>
<version>2.8</version>
</dependency>
import com.thoughtworks.paranamer.*;
import com.thoughtworks.paranamer.bytecode.*;
import com.thoughtworks.paranamer.AdaptiveParanamer;
public class MyClass {
public static void main(String[] args) {
Paranamer paranamer = new AdaptiveParanamer(new BytecodeReadingParanamer());
// Configure naming conventions and parsing algorithms
paranamer.setNamingConvention(NamingConvention.JAVABEANS_ACCESSOR);
paranamer.setAlgorithm(Algorithm.HEURISTIC);
// Use paranamer to analyze class names and provide suggestions
}
}
String[] parameterNames = paranamer.lookupParameterNames(method);
String propertyName = paranamer.lookupParameterNames(beanPropertyAccessor);