abc.weaving.residues
Class SingleValueVar

java.lang.Object
  extended by abc.weaving.residues.WeavingVar
      extended by abc.weaving.residues.SingleValueVar

public class SingleValueVar
extends WeavingVar

For cases where there is just one value needed in the weaving context Don't ever use it in a context where a get() might be done on it

Author:
Ganesh Sittampalam, Ondrej Lhotak

Field Summary
 Type type
           
 Value value
           
 
Constructor Summary
SingleValueVar(Type type)
           
 
Method Summary
 Local get()
          Get the soot local corresponding to this variable (only valid once it has been set)
 Type getType()
          Get the soot type corresponding to this variable
 boolean hasType()
          Has this variable got a type yet?
 WeavingVar inline(ConstructorInliningMap cim)
           
 void resetForReweaving()
           
 Stmt set(LocalGeneratorEx localgen, Chain units, Stmt begin, WeavingContext wc, Value val)
          Set the variable to the value v and return the last statement added (or begin if none)
 java.lang.String toString()
           
 
Methods inherited from class abc.weaving.residues.WeavingVar
inline, maybeBox, mustBox
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public Type type

value

public Value value
Constructor Detail

SingleValueVar

public SingleValueVar(Type type)
Method Detail

inline

public WeavingVar inline(ConstructorInliningMap cim)
Specified by:
inline in class WeavingVar

resetForReweaving

public void resetForReweaving()
Specified by:
resetForReweaving in class WeavingVar

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

set

public Stmt set(LocalGeneratorEx localgen,
                Chain units,
                Stmt begin,
                WeavingContext wc,
                Value val)
Description copied from class: WeavingVar
Set the variable to the value v and return the last statement added (or begin if none)

Specified by:
set in class WeavingVar

get

public Local get()
Description copied from class: WeavingVar
Get the soot local corresponding to this variable (only valid once it has been set)

Specified by:
get in class WeavingVar

hasType

public boolean hasType()
Description copied from class: WeavingVar
Has this variable got a type yet?

Specified by:
hasType in class WeavingVar

getType

public Type getType()
Description copied from class: WeavingVar
Get the soot type corresponding to this variable

Specified by:
getType in class WeavingVar