public class LocalCreation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PREFIX
if no prefix is given, this one's used
|
Constructor and Description |
---|
LocalCreation(java.util.Collection<Local> locals)
all actions are done on the given locals-chain.
|
LocalCreation(java.util.Collection<Local> locals,
java.lang.String prefix)
whenever
newLocal(type) will be called, the given prefix is
used. |
Modifier and Type | Method and Description |
---|---|
Local |
newLocal(java.lang.String prefix,
Type type)
returns a new local with the given prefix and the given type.
the returned local will automatically 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 automatically 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). |
public static final java.lang.String DEFAULT_PREFIX
public LocalCreation(java.util.Collection<Local> locals)
DEFAULT-PREFIX
will be used.chain
- the locals-chain of a Jimple-bodypublic LocalCreation(java.util.Collection<Local> locals, java.lang.String prefix)
newLocal(type)
will be called, the given prefix is
used.Chain
- the locals-chain of a Jimple-bodyString
- prefix overrides the DEFAULT-PREFIXpublic Local newLocal(Type type)
type
- the Type of the new local.public Local newLocal(java.lang.String prefix, Type type)
prefix
- the prefix for the now local.type
- the Type of the now local.