nz.net.juju.jaune
Class Support

java.lang.Object
  |
  +--nz.net.juju.jaune.Support

public class Support
extends java.lang.Object

The support class provides static helper methods to the rest of the compiler including mapping methods to labels, locating methods, and finding definitions and implementations of methods. RETARGET: The label formats depend on the target.


Field Summary
static java.lang.String LABEL_CLASS
          Suffix for the class label.
 
Constructor Summary
Support()
           
 
Method Summary
static gnu.bytecode.Method findDefinition(gnu.bytecode.ClassType ctype, gnu.bytecode.CpoolNameAndType cmethod)
          Finds the first definition of the given method in the class heirachy.
static gnu.bytecode.Method findDefinition(gnu.bytecode.Method method)
          Finds the first definition of the given method in the class heirachy.
static gnu.bytecode.Method findImplementation(gnu.bytecode.ClassType ctype, gnu.bytecode.CpoolNameAndType cmethod)
          Finds the most recent implementation of the given method.
static gnu.bytecode.Method findImplementation(gnu.bytecode.ClassType ctype, gnu.bytecode.Method method)
          Finds the most recent implementation of the given method.
static int getFieldId(gnu.bytecode.Field meth)
          Returns the unique global field ID for this field.
static java.lang.String getLabel(gnu.bytecode.ClassType cl)
          Returns the unqiue string label for this class.
static java.lang.String getLabel(gnu.bytecode.Field field)
          Returns the unique label for this field.
static java.lang.String getLabel(gnu.bytecode.Method meth)
          Returns the unique label for this method.
static int getMethodId(gnu.bytecode.Method meth)
          Returns the unique global method ID for this method.
static java.lang.String getSpecialLabel(gnu.bytecode.ClassType classType, java.lang.String special)
          Returns the unique label for a special method such as init, clinit in this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL_CLASS

public static final java.lang.String LABEL_CLASS
Suffix for the class label.
Constructor Detail

Support

public Support()
Method Detail

getLabel

public static java.lang.String getLabel(gnu.bytecode.ClassType cl)
Returns the unqiue string label for this class.

getLabel

public static java.lang.String getLabel(gnu.bytecode.Method meth)
Returns the unique label for this method. A label is of the form: {PREFIX}{Normalised-Class}{SEP|SPECIAL}{Method}{Overload-ID} where

getLabel

public static java.lang.String getLabel(gnu.bytecode.Field field)
Returns the unique label for this field.
See Also:
getLabel(gnu.bytecode.ClassType)

getSpecialLabel

public static java.lang.String getSpecialLabel(gnu.bytecode.ClassType classType,
                                               java.lang.String special)
Returns the unique label for a special method such as init, clinit in this class.

getMethodId

public static int getMethodId(gnu.bytecode.Method meth)
Returns the unique global method ID for this method.

getFieldId

public static int getFieldId(gnu.bytecode.Field meth)
Returns the unique global field ID for this field.

findDefinition

public static gnu.bytecode.Method findDefinition(gnu.bytecode.ClassType ctype,
                                                 gnu.bytecode.CpoolNameAndType cmethod)
                                          throws java.lang.Exception
Finds the first definition of the given method in the class heirachy.

findImplementation

public static gnu.bytecode.Method findImplementation(gnu.bytecode.ClassType ctype,
                                                     gnu.bytecode.CpoolNameAndType cmethod)
                                              throws java.lang.Exception
Finds the most recent implementation of the given method.

findImplementation

public static gnu.bytecode.Method findImplementation(gnu.bytecode.ClassType ctype,
                                                     gnu.bytecode.Method method)
                                              throws java.lang.Exception
Finds the most recent implementation of the given method.

findDefinition

public static gnu.bytecode.Method findDefinition(gnu.bytecode.Method method)
                                          throws java.lang.Exception
Finds the first definition of the given method in the class heirachy.