|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dellroad.jc.cgen.C
Utility routines for generating C code.
Method Summary | |
static String |
accessDefs(int flags)
|
static String |
accessDefs(SootClass c)
|
static String |
accessDefs(SootField f)
|
static String |
accessDefs(SootMethod m)
|
static String |
encode(String name)
|
static String |
encode(String name,
boolean ignoreSlashes)
|
static void |
include(String s)
|
static String |
jc_type(Type t)
|
static String |
jc_type(Value v)
|
static void |
main(String[] args)
|
static String |
name(SootClass c)
|
static String |
name(SootField f)
|
static String |
name(SootMethod m)
|
static String |
paramsDecl(SootMethod m,
boolean withNames)
|
static String |
primName(Type t)
|
static boolean |
reserved(String s)
Tells us whether the token is a reserved word that cannot be used in C source. |
static String |
string(String s)
Returns string(s, true) . |
static String |
string(String s,
boolean enquote)
Returns a doubly-quoted C string containing the UTF-8 encoded value of s with special characters suitably escaped.
|
static String |
type(SootClass sc)
|
static String |
type(SootClass sc,
boolean withStruct)
|
static String |
type(SootField f)
|
static String |
type(SootField f,
boolean withStruct)
|
static String |
type(SootMethod m)
|
static String |
type(SootMethod m,
boolean withStruct)
|
static String |
type(Type t)
Equivalent to type(t, false) . |
static String |
type(Type t,
boolean withStruct)
Return the C type for an object of type t ,
which must be a normal Java type, i.e., a type that can
be the type of a variable.
|
static String |
type(Value v)
|
static String |
type(Value v,
boolean withStruct)
|
static CExpr |
value(ValueBox vb)
|
static String |
valueType(Type t)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static String string(String s)
string(s, true)
.
public static String string(String s, boolean enquote)
s
with special characters suitably escaped.
If enquote
is true, then enclose the string
in double quotes.
public static String name(SootClass c)
public static String name(SootField f)
public static String name(SootMethod m)
public static boolean reserved(String s)
public static String encode(String name)
public static String encode(String name, boolean ignoreSlashes)
public static String type(SootClass sc)
public static String type(SootMethod m)
public static String type(SootField f)
public static String type(Value v)
public static String type(SootClass sc, boolean withStruct)
public static String type(SootMethod m, boolean withStruct)
public static String type(SootField f, boolean withStruct)
public static String type(Value v, boolean withStruct)
public static CExpr value(ValueBox vb)
public static String type(Type t)
type(t, false)
.
public static String type(Type t, boolean withStruct)
t
,
which must be a normal Java type, i.e., a type that can
be the type of a variable.
Reference types have the struct
code prefixed
if withStruct
is true, but never have '*' appended.
public static String valueType(Type t)
public static String jc_type(Value v)
public static String jc_type(Type t)
public static String primName(Type t)
public static String accessDefs(SootClass c)
public static String accessDefs(SootField f)
public static String accessDefs(SootMethod m)
public static String accessDefs(int flags)
public static String paramsDecl(SootMethod m, boolean withNames)
public static void include(String s)
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |