Class DotnetMethod

  • All Implemented Interfaces:
    DotnetTypeMember

    public class DotnetMethod
    extends AbstractDotnetMember
    Represents a .NET Method SourceLocator -> ClassProvider -> ClassSource -> MethodSource (DotnetMethod)
    • Method Detail

      • isConstructor

        public boolean isConstructor()
      • isStatic

        public boolean isStatic()
      • getName

        public String getName()
      • toSootMethod

        public SootMethod toSootMethod()
        Create a SootMethod of this .NET Method
        Returns:
      • toSootMethod

        public SootMethod toSootMethod​(MethodSource methodSource)
        Create SootMethod with specific MethodSource (used by Events and Properties) Events and Properties have other sources for method bodies
        Parameters:
        methodSource -
        Returns:
      • jimplifyMethodBody

        public Body jimplifyMethodBody​(ProtoIlInstructions.IlFunctionMsg ilFunctionMsg)
        Generate Jimple Body of this Method
        Parameters:
        ilFunctionMsg - ProtoMsg Method Body
        Returns:
      • getDeclaringClass

        public SootClass getDeclaringClass()
      • getSootMethodSignature

        public SootMethod getSootMethodSignature()
      • hasCallByRefParameters

        public boolean hasCallByRefParameters()
        Check if this method contains call-by-ref parameters (e.g. MyMethod(param1&))
        Returns:
        bool
      • hasGenericParameters

        public boolean hasGenericParameters()
        Check whether this method has generics or call-by-ref parameters
        Returns:
        bool
      • hasCilPrimitiveParameters

        public boolean hasCilPrimitiveParameters()
        Check whether this method contains CIL primitives, such as uint sbyte
        Returns:
      • getUniqueName

        public String getUniqueName()
        Process Name Mangling to achieve a unique name in the declared class Convert method name to a unique method name if it has generics or call-by-ref as parameters
        Returns:
        unique name
      • convertCtorName

        public static String convertCtorName​(String methodName)
        Convert Dotnet/CLI constructor names to java byte code constructors, if available
        Parameters:
        methodName - dotnet constructor name
        Returns:
        java constructor name