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

  • Home
  • SEARCH
  • 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 8532323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:41:23+00:00 2026-06-11T09:41:23+00:00

How can I create a code template in NetBeans 7.1.1 for this: public static

  • 0

How can I create a code template in NetBeans 7.1.1 for this:

public static void someMethodName(String arg1, Integer arg2) {
    LOG.debug("someMethodName{}, {}", new Object[]{arg1, arg2});
...
}
  • 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-06-11T09:41:24+00:00Added an answer on June 11, 2026 at 9:41 am

    Something like the following should work 🙂

    public static ${ret default="void"} ${mname default="someMethodName"}(${Type1 default="String"} ${var1 default="arg1"}, ${Type2 default="Integer"} ${var2 default="arg2"}) {
        LOG.debug("${mname}{}, {}", new Object[] {${var1}, ${var2}});
        ${cursor}
    }
    

    But you probably wanted to be able to specify the number of parameters. Unfortunately something like the following:

    public static ${ret default="void"} ${mname default="someMethodName"}(${args default=""}) {
        LOG.debug("${mname}{}, {}", new Object[] {${args}});
        ${cursor}
    }
    

    would not work because it would include the type names also in the LOG line:

    public static void someMethodName(String arg1, int arg2) {
        LOG.debug("someMethodName{}, {}", new Object[]{String arg1, int arg2});
    
    }
    

    A workaround that comes to my mind is to use the first solution and provide different code templates for different number of method parameters (e.g. Psm1, Psm2, …).

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

Sidebar

Related Questions

With this code we can create a simple word document but I need to
I'm a bit confused, how can I create public and private members. My code
I'm using this pretty handy JavaScript template library: https://github.com/blueimp/JavaScript-Templates . I can create elements
I can create function pointers in Fortran 90, with code like real, external ::
I want to know if I can create a WebBrowser through code in Vb.NET,
Can you create a line of code, within a while-loop, that will create a
How can I create anti-noise with code or an application? It doesn't have to
How can I create an environment in client-side javascript where any code related to
How can I create pdf documents with 2D barcodes (for example QR code http://en.wikipedia.org/wiki/QR_Code
Can I fire show create table query in Java code for mysql? What I

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.