How to limit number of lines allowed for a Method in RAD 6.0

Posted on 2007-10-07
Last Modified: 2013-12-15
Hi I am using RAD (Rational Application Developer) 6.0, I want to have a limitation for the number of lines allowed in a method.

so that all our developers will be allerted if the method gets too long.

Please suggest me.

Question by:objectkk
    LVL 23

    Expert Comment

    As far I know eclipse doesn't have this feature.
    LVL 3

    Accepted Solution


    Maybe you can use Checkstyle (, a tool to check Java code.

    In my project we installed the Checkstyle plugin ( and one of its many features is the methodLength: where you can define a maximum number of lines for methods; if your method is longer than the defined length Eclipse will show an error.

    Take a look at Checkstyle, we use it integrated in Eclipse, but Checkstyle configuration says that it's also possible to use it as an Ant task or as command line tool.

    Author Comment

    Thank You Wily.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    what is spring 3 36
    Exception after setting jdbc session management 2 18
    wordlen challenge 3 32
    Modeling a class in java 5 24
    I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now