soot.jimple.toolkits.scalar
Class LocalCreation
java.lang.Object
|
+--soot.jimple.toolkits.scalar.LocalCreation
- public class LocalCreation
- extends java.lang.Object
provides an easy interface to handle new var-names. New names are automaticly
added to the chain, and the provided locals are guaranteed to have a unique name.
Field Summary |
static java.lang.String |
DEFAULT_PREFIX
if no prefix is given, this one's used |
Constructor Summary |
LocalCreation(Chain locals)
all actions are done on the given locals-chain. |
LocalCreation(Chain locals,
java.lang.String prefix)
whenever newLocal(type) will be called, the given prefix is
used. |
Method Summary |
Local |
newLocal(java.lang.String prefix,
Type type)
returns a new local with the given prefix and the given type.
the returned local will automaticly added to the locals-chain. |
Local |
newLocal(Type type)
returns a new local with the prefix given to the constructor (or the
default-prefix if none has been given) and the given type.
The returned local will automaticly added to the locals-chain.
The local will be of the form: prefixX (where the last
X is a number, so the localname is unique). |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DEFAULT_PREFIX
public static final java.lang.String DEFAULT_PREFIX
- if no prefix is given, this one's used
LocalCreation
public LocalCreation(Chain locals)
- all actions are done on the given locals-chain. as prefix the
DEFAULT-PREFIX
will be used.
- Parameters:
chain
- the locals-chain of a Jimple-body
LocalCreation
public LocalCreation(Chain locals,
java.lang.String prefix)
- whenever
newLocal(type)
will be called, the given prefix is
used.
- Parameters:
Chain
- the locals-chain of a Jimple-bodyString
- prefix overrides the DEFAULT-PREFIX
newLocal
public Local newLocal(Type type)
- returns a new local with the prefix given to the constructor (or the
default-prefix if none has been given) and the given type.
The returned local will automaticly added to the locals-chain.
The local will be of the form: prefixX (where the last
X is a number, so the localname is unique).
- Parameters:
type
- the Type of the new local.- Returns:
- a new local with a unique name and the given type.
newLocal
public Local newLocal(java.lang.String prefix,
Type type)
- returns a new local with the given prefix and the given type.
the returned local will automaticly added to the locals-chain.
The local will be of the form: prefixX (where the last
X is a number, so the localname is unique).
- Parameters:
prefix
- the prefix for the now local.type
- the Type of the now local.- Returns:
- a local with the given prefix and the given type.