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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:36:51+00:00 2026-05-27T00:36:51+00:00

Given Java bytecode and ASM bytecode analysis framework, how can I resolve a target

  • 0

Given Java bytecode and ASM bytecode analysis framework,
how can I resolve a target method when polymorphic call occurs?

For instance:

class ClassA { 
    public void foo() {…}
}

class ClassB extends ClassA {
    public void foo() {…}
}
…
ClassA inst = new ClassB();
inst.foo();

The following bytecode is generated for the latter line:

…
INVOKEVIRTUAL ClassA.foo()V
…

This instructure targets a parent method.
But the actual method is ClassB.foo().

How can I resolve the “real” method that will be called?

  • 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-27T00:36:51+00:00Added an answer on May 27, 2026 at 12:36 am

    In general: you can’t. It’s undecidable. But there are special case which can be analyzed. One way to do it is to apply a points-to-analysis. Which usually is a whole program analysis. In the presence of bytecode rewriting and or reflection additional problems occur.

    So basically you have to decide how much effort you are willing to spend. You have the following options:

    • You perform an ad-hoc analysis which would be able to detect your trivial case from above.
    • You apply a lot of theory of static analysis to this problem.
    • You find someone else who already performed the second option.

    What do you want to achieve in the first place?

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

Sidebar

Related Questions

I am looking for a framework to turn given Java class into WebService (may
Possible Duplicate: How do you find all subclasses of a given class in Java?
I'm looking a utility method so that given a class will return the full
Given a java.lang.String instance, I want to verify that it doesn't contain any unicode
Looking for a Smalltalk compiler that given Smalltalk (Instantiations) will emit either Java bytecode,
Given a java package x.y.z, can I alias x.y.z to a shorter name, so
Given a Java web application using CometD, how can I publish a message to
I was wondering if there is a way to measure a given bytecode (class
It is great that using Intermediate Language (.Net: MSIL, Java: Bytecode) we can achieve
Given a Java Object, how can I get a list of Objects that referring

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.