Class DotnetBodyVariableManager


  • public class DotnetBodyVariableManager
    extends Object
    Part of the DotnetBody Manager for variables in a .NET Body (Store, initialization, etc.)
    • Constructor Detail

      • DotnetBodyVariableManager

        public DotnetBodyVariableManager​(DotnetBody dotnetBody,
                                         Body mainJb)
    • Method Detail

      • fillMethodParameter

        public void fillMethodParameter​(List<Unit> unwrapCalls,
                                        Map<Local,​Local> unwrappedToWrapped)
        Add parameters of the .NET method to the Jimple Body
      • addInitLocalVariables

        public void addInitLocalVariables​(List<ProtoIlInstructions.IlVariableMsg> variableMsgList)
        Add and Initialize all known variables/locals at the beginning
        Parameters:
        variableMsgList -
      • addOrGetVariable

        public Local addOrGetVariable​(ProtoIlInstructions.IlVariableMsg v,
                                      Type type,
                                      Body jbTmp)
        Type of local is got by the protoVariableMsg but in some cases we need to define the type of the local
        Parameters:
        v -
        type -
        jbTmp -
        Returns:
      • addLocalVariable

        public void addLocalVariable​(Local local)
      • inlineLocals

        public static Value inlineLocals​(Value v,
                                         Body jb)
        Recursively get value of a locals chain
        Parameters:
        v -
        jb -
        Returns:
      • addLocalsToCast

        public void addLocalsToCast​(String local)
        Sometimes we need to cast locals to fulfill the validation. In this case we add them to this set and cast them later on
        Parameters:
        local -
      • localsToCastContains

        public boolean localsToCastContains​(String local)
      • addReferenceLocal

        public void addReferenceLocal​(Local element,
                                      Local referenceHolder)
      • getReferenceLocal

        public Local getReferenceLocal​(Local element)