getConstructor with no parameters

The problem is clear when you read the javadoc of .getConstructor(): Returns a Constructor object that reflects the specified public constructor of the class represented by this Class object. Emphasis mine. In your code, the constructor is not public! Example: // Note: class is NOT public — its default constructor won’t be either final class … Read more