Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7692085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:46:18+00:00 2026-05-31T20:46:18+00:00

Checkstyle’s AbstractClassName check uses the following default pattern to check for class names that

  • 0

Checkstyle’s “AbstractClassName” check uses the following default pattern to check for class names that should be declared as abstract:

^Abstract.*$|^.*Factory$

I understand that classes starting with ‘Abstract’ are supposed to be declared as abstract. But why should this also hold true for classes ending with ‘Factory’?

Is this really best practice? And if so how should I name my factory classes instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:46:19+00:00Added an answer on May 31, 2026 at 8:46 pm

    The default regular expression came about from the Abstract Factory pattern – see http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html.

    I admit that I have not seen this naming convention used in the wild. It is a simple matter to change the check configuration to use the pattern:

    ^Abstract.*$
    

    Like always, Checkstyle should be used as guide as to what is best practice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Based on this question it appears that the default template for CheckStyle will allow
I am working in a PHP project that uses checkstyle to validate the code.
Checkstyle says: Class should define a constructor. PMD says: Avoid unnecessary constructors - the
I use checkstyle to analyze my code. A useful rule is PackageHtml, that checks,
I recently installed Checkstyle plugin for Eclipse and personally think that it is awesome.
I generate default quickstart Maven example, and type mvn checkstyle:checkstyle , it always try
Checkstyle checks that comments are not longer than 80 characters long. How do i
Our company uses checkstyle to ensure the java source code having no nested if..else.
I'm taking a course that is requiring the use of Checkstyle. I'm quite confused
I'd like to write my own Check using CheckStyle and incorporate this in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.