org.jikesrvm.runtime
Class EntrypointHelper

java.lang.Object
  extended by org.jikesrvm.runtime.EntrypointHelper

public class EntrypointHelper
extends Object

Helper class for retrieving entrypoints. Entrypoints are fields and methods of the virtual machine that are needed by compiler-generated machine code or C runtime code.


Constructor Summary
EntrypointHelper()
           
 
Method Summary
static RVMField getField(Class<?> klass, String member, Class<?> type)
          Get description of virtual machine field.
(package private) static RVMField getField(String klass, String member, Class<?> type)
          Get description of virtual machine field.
static RVMField getField(String klass, String member, String descriptor)
           
private static RVMMember getMember(String classDescriptor, String memberName, String memberDescriptor)
          Get description of virtual machine component (field or method).
static RVMMethod getMethod(Class<?> klass, Atom member, Class<?>... argTypes)
           
static NormalMethod getMethod(Class<?> klass, String member, String descriptor)
          Get description of virtual machine method.
static NormalMethod getMethod(String klass, String member, String descriptor)
           
static NormalMethod getMethod(String klass, String member, String descriptor, boolean runtimeServiceMethod)
           
static MethodReference getMethodReference(Class<?> klass, Atom member, Class<?>... argTypes)
           
private static String makeDescriptor(Class<?>... argTypes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntrypointHelper

public EntrypointHelper()
Method Detail

getMember

private static RVMMember getMember(String classDescriptor,
                                   String memberName,
                                   String memberDescriptor)
Get description of virtual machine component (field or method).

Note: This is method is intended for use only by VM classes that need to address their own fields and methods in the runtime virtual machine image. It should not be used for general purpose class loading.

Parameters:
classDescriptor - class descriptor - something like "Lorg/jikesrvm/RuntimeEntrypoints;"
memberName - member name - something like "invokestatic"
memberDescriptor - member descriptor - something like "()V"
Returns:
corresponding RVMMember object

getMethod

public static NormalMethod getMethod(String klass,
                                     String member,
                                     String descriptor,
                                     boolean runtimeServiceMethod)

getMethod

public static NormalMethod getMethod(String klass,
                                     String member,
                                     String descriptor)

makeDescriptor

private static String makeDescriptor(Class<?>... argTypes)

getMethod

public static RVMMethod getMethod(Class<?> klass,
                                  Atom member,
                                  Class<?>... argTypes)

getMethodReference

public static MethodReference getMethodReference(Class<?> klass,
                                                 Atom member,
                                                 Class<?>... argTypes)

getField

public static RVMField getField(String klass,
                                String member,
                                String descriptor)

getField

public static RVMField getField(Class<?> klass,
                                String member,
                                Class<?> type)
Get description of virtual machine field.

Parameters:
klass - class containing field
member - member name - something like "invokestatic"
type - of field
Returns:
corresponding RVMField

getField

static RVMField getField(String klass,
                         String member,
                         Class<?> type)
Get description of virtual machine field.

Parameters:
klass - class containing field
member - member name - something like "invokestatic"
type - of field
Returns:
corresponding RVMField

getMethod

public static NormalMethod getMethod(Class<?> klass,
                                     String member,
                                     String descriptor)
Get description of virtual machine method.

Parameters:
klass - class containing method
member - member name - something like "invokestatic"
descriptor - member descriptor - something like "()V"
Returns:
corresponding RVMMethod