org.bridj.util
Class BytecodeAnalyzer

java.lang.Object
  extended by org.bridj.util.BytecodeAnalyzer

public final class BytecodeAnalyzer
extends Object

Util class that scavenges through a class' bytecode to retrieve the original order of fields and methods, as defined in the sources (unlike what the reflection APIs return : they don't guarantee the order).

Author:
ochafik

Method Summary
static List<String> getFieldNames(Class c, Class recurseTo)
           
static List<String> getMethodNames(Class c, Class recurseTo)
           
static List<String[]> getNativeMethodSignatures(Class c)
          Returns array of String[] { declaringClassInternalName, methodName, signature }
static List<String[]> getNativeMethodSignatures(String internalName, ClassLoader classLoader)
          Returns array of String[] { declaringClassInternalName, methodName, signature }
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNativeMethodSignatures

public static List<String[]> getNativeMethodSignatures(Class c)
                                                throws IOException
Returns array of String[] { declaringClassInternalName, methodName, signature }

Throws:
IOException

getNativeMethodSignatures

public static List<String[]> getNativeMethodSignatures(String internalName,
                                                       ClassLoader classLoader)
                                                throws IOException
Returns array of String[] { declaringClassInternalName, methodName, signature }

Throws:
IOException

getFieldNames

public static List<String> getFieldNames(Class c,
                                         Class recurseTo)
                                  throws IOException
Throws:
IOException

getMethodNames

public static List<String> getMethodNames(Class c,
                                          Class recurseTo)
                                   throws IOException
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.