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 8405439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:51:13+00:00 2026-06-09T22:51:13+00:00

I have to create several proxies, to add, for example, logging. Something like that:

  • 0

I have to create several proxies, to add, for example, logging. Something like that:

interface IMath {
    public int add(a, b);
}

class Math implements IMath {
    public int add(a, b) { return a + b; }
}

class MathWithLogs implements IMath {
    private IMath realMath;
    public int add(a, b) {
        Log.d("tag", "valueable info");
        return realMath.add(a, b);
    }
}

Everything is fine as long as these interfaces aren’t 20 methods and I have to add something to just one.

My question is, is there a way to autogenerate wrapper classes with some plugin for eclipse?

Or maybe there is a way to do something with annotations to invoke methods from realMath unless stated otherwise (like @Override)?

  • 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-09T22:51:15+00:00Added an answer on June 9, 2026 at 10:51 pm

    Right click in any source file (.java) and navigate to source -> Override/Implement Methods/Generate Delegate Methods.

    The first will paste the body of all methods of your immediate interface.
    the second will do the same for all the hierarchy up to Object(I guess, not sure).
    Hope this helps.

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

Sidebar

Related Questions

I have a C++ class that I need to create several instances of in
I'd like to create several instances of a class in CodeIgniter. I have created
I'd like to create several builders, with common tags, in order to have xml
I'm trying to write a MySQL script that creates several tables. I have: CREATE
I have a class which reads an XML file to create several screens in
I'm trying to create several buttons that have 4-5 frames of animation in them,
If I have a class with several functions: class Example: def func1(self): print 'Hi1'
I have create some functions that are hooked on several WHMCS hooks. Some of
I'd like to create several modules that will be used in nearly all scripts
I have a base class with several derived classes that extend it. I want

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.