|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.copernicus.c.CNames
public class CNames
A class that determines names of various entities to use for C code generation.
| Red (ssb) |
| Red (ssb) |
| Field Summary | |
|---|---|
static java.lang.String |
arrayAllocateFunction
The name of the runtime function or macro to be used for allocating an array. |
static java.lang.String |
arrayClassPrefix
The prefix of array class descriptors that correspond to primitive types. |
static java.lang.String |
arrayLengthFunction
The name of the runtime function or macro to be used for determining the length of an array. |
static java.lang.String |
arrayReferenceFunction
The name of the runtime function or macro to be used for computing array references. |
static java.lang.String |
instanceOfFunction
The name of the runtime function or macro to be used for implementing the Java instanceof operator. |
| Method Summary | |
|---|---|
static java.lang.String |
classNameOf(soot.SootClass source)
Determine the C name for the class-specific structure type that implements a Soot class. |
static java.lang.String |
classNameToFileName(java.lang.String className)
Returns the C filename corresponding to a class. |
static java.lang.String |
classStructureNameOf(soot.SootClass source)
Determine the C name for the class-specific structure variable that implements a Soot class. |
static void |
clearLocalNames()
Clear the set of local variable names. |
static java.lang.String |
fieldNameOf(soot.SootField field)
Return the name associated with a field in a Soot class. |
static java.lang.String |
functionNameOf(soot.SootMethod method)
Return the name of the C function that implements a given Soot method. |
static int |
hashNumberOf(soot.SootClass source)
Return a number representing the hashCode for this class. |
static int |
hashNumberOf(soot.SootMethod method)
Return a number representing the hash code for this method. |
static java.lang.String |
includeFileNameOf(soot.SootClass source)
Return the include file name for a given class. |
static java.lang.String |
initializerNameOf(soot.SootClass source)
Given a class, return the name of the function that implements initialization of the class, including all functionality in the static initializer for the class (if it exists), and all class-level initialization required on the C data structures that implement the class. |
static java.lang.String |
instanceNameOf(soot.SootClass source)
Determine the C name for the instance-specific structure type that implements a Soot class. |
static java.lang.String |
interfaceLookupNameOf(soot.SootClass source)
Return the C name of the method that performs lookups to disambiguate interface references. |
static boolean |
isSystemClass(java.lang.String className)
Returns whether a given class is a System class. |
static java.lang.String |
localNameOf(soot.Local local)
Return the name of a local. |
static java.lang.String |
methodNameOf(soot.SootMethod method)
Return the name of the C structure member that represents a given Soot method. |
static java.lang.String |
sanitize(java.lang.String name)
Return a version of a string with all $, <, >, or - characters replaced by _. |
static void |
setup()
Initialize C name generation. |
static java.lang.String |
superclassPointerName()
Return the name of the class structure member that points to the superclass structure. |
static java.lang.String |
typeNameOf(soot.Type type)
Determine the C name associated with a Soot type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String arrayAllocateFunction
public static final java.lang.String arrayClassPrefix
public static final java.lang.String arrayLengthFunction
public static final java.lang.String arrayReferenceFunction
public static final java.lang.String instanceOfFunction
| Method Detail |
|---|
public static java.lang.String classNameOf(soot.SootClass source)
classNameOf(SootClass)". Additionally,
the identifier classNameOf(SootClass) (i.e., without
the struct qualifier) is defined in the generated code to be a
pointer type that points to the class-specific structure.
source - The class.
public static java.lang.String classNameToFileName(java.lang.String className)
className - The name of a class.
public static java.lang.String classStructureNameOf(soot.SootClass source)
classNameOf(SootClass).
source - The class.
public static void clearLocalNames()
public static java.lang.String fieldNameOf(soot.SootField field)
field - The field.
public static java.lang.String functionNameOf(soot.SootMethod method)
method - The method.
public static int hashNumberOf(soot.SootMethod method)
method - The SootMethod for which we want the hash number.
public static int hashNumberOf(soot.SootClass source)
source - The class.
public static java.lang.String includeFileNameOf(soot.SootClass source)
source - The class.
public static java.lang.String initializerNameOf(soot.SootClass source)
classStructureNameOf(soot.SootClass).
source - The class.
public static java.lang.String instanceNameOf(soot.SootClass source)
instanceNameOf(SootClass)". Additionally,
the identifier instanceNameOf(SootClass) (i.e., without
the struct qualifier) is defined in the generated code to be a pointer
type that points to the class-specific structure.
source - The Soot class.
public static java.lang.String interfaceLookupNameOf(soot.SootClass source)
source - The class for which this method needs to be generated.
public static boolean isSystemClass(java.lang.String className)
className - A class.
public static java.lang.String localNameOf(soot.Local local)
local - The local.
public static java.lang.String methodNameOf(soot.SootMethod method)
classNameOf(SootClass)).
method - The Soot method.
public static java.lang.String sanitize(java.lang.String name)
name - The String to be converted.
public static void setup()
public static java.lang.String superclassPointerName()
public static java.lang.String typeNameOf(soot.Type type)
instanceNameOf(SootClass).
type - The type.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||