Help us understand the problem. What is going on with this article?

Android Studio でビルドされたクラスのメソッドのシグネチャを確認する

More than 3 years have passed since last update.


javap -s を使う

クラスファイルは app/build/intermediates/classes/debug/パッケージ/クラス名.class に入っている

javap -s /path/to/HogefugaApp/app/build/intermediates/classes/debug/com/covelline/hogefugaapp/FooManager.class


JNI で C++ から Java のメソッドを叩く時に、メソッドシグネチャが欲しい

Java のクラスがこういうふうになっている場合について

package com.covelline.hogefugaapp;

import android.content.Context;

public class FooManager {
    private Context context;

    FooManager(Context context) {
        this.context = context;

    public void removeAll() {
        // ...

    public void load(int index, String name) {
        // ...

    public void restart(int index) {
        // ...

    public boolean isAvailable(int index) {
        // ...

    public byte[] getImage(int id) {
        // ...


javap -s の出力はこうなる

欲しかった byte[] getFrame(int id) のシグネチャは (I)[B だとわかった

Compiled from ""
public class com.covelline.hogefugaapp.FooManager {
    descriptor: (Landroid/content/Context;)V

  public void removeAll();
    descriptor: ()V

  public void load(int, java.lang.String);
    descriptor: (ILjava/lang/String;)V

  public void restart(int);
    descriptor: (I)V

  public boolean isAvailable(int);
    descriptor: (I)Z

  public byte[] getFrame(int);
    descriptor: (I)[B
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away