Package soot.dotnet

Class AssemblyFile

    • Constructor Detail

      • AssemblyFile

        public AssemblyFile​(String fullyQualifiedAssemblyPathFilename)
        Constructs a new AssemblyFile with the path to the file
        Parameters:
        fullyQualifiedAssemblyPathFilename - e.g. /home/user/cs/myassembly.dll
    • Method Detail

      • getMethodBody

        public ProtoIlInstructions.IlFunctionMsg getMethodBody​(String className,
                                                               String method,
                                                               int peToken)
        Get Method Body with IL Instructions
        Parameters:
        className - given class
        method - given method name
        Returns:
        list/tree of il instructions otherwise null
      • getMethodBodyOfProperty

        public ProtoIlInstructions.IlFunctionMsg getMethodBodyOfProperty​(String className,
                                                                         String propertyName,
                                                                         boolean isSetter)
        Get Method Body of property methods
        Parameters:
        className - declaring class
        propertyName - name of property
        isSetter - request setter or getter
        Returns:
        proto message with method body
      • isAssembly

        public boolean isAssembly()
        Check if given file is an assembly file
        Returns:
        true if this object referenced to a file is an assembly
      • getTypeDefinition

        public ProtoAssemblyAllTypes.TypeDefinition getTypeDefinition​(String className)
        Get Type definition as Proto Message
        Parameters:
        className - requested type
        Returns:
        proto message with the given type definition
      • getAllTypeNames

        public Collection<String> getAllTypeNames()
        Get all types of given assembly as a list of strings
        Returns:
        list of strings with all types
      • getAllReferencedModuleTypes

        public List<String> getAllReferencedModuleTypes()
        Get all module type names which are references from this assembly
        Returns:
        list of strings with all possible referenced module type names
      • getFullPath

        public String getFullPath()
      • getAssemblyFileName

        public String getAssemblyFileName()
      • nativeGetManifestResourceStream

        public byte[] nativeGetManifestResourceStream​(String pathToNativeHost,
                                                      String absolutePathAssembly,
                                                      String name)
        Returns a manifest resource stream
        Parameters:
        pathToNativeHost - Path where the library file of the native host is located, e.g. /Users/user/soot-dotnet/src/Soot.Dotnet.NativeHost/bin/Debug/libNativeHost.dylib
        absolutePathAssembly - e.g. /home/user/cs/myassembly.dll
        name - the name of the resource
        Returns:
        the content of the resource or null if not found