Class JavaMethodId

  • All Implemented Interfaces:
    Comparable<ConstructId>

    public class JavaMethodId
    extends JavaId
    Identifies a method relative to its class (normal or nested).
    • Constructor Detail

      • JavaMethodId

        public JavaMethodId​(JavaId _c,
                            String _simple_name,
                            List<String> _parameter_types)

        Constructor for JavaMethodId.

        Parameters:
        _c - a JavaId object.
        _simple_name - a String object.
        _parameter_types - a List object.
    • Method Detail

      • getQualifiedName

        public String getQualifiedName()
        Returns the fully qualified name, i.e., with parameter types and the surrounding class.
        Specified by:
        getQualifiedName in class ConstructId
        Returns:
        a String object.
      • getName

        public String getName()
        Returns the method name, including parameter types in brackets.
        Specified by:
        getName in class ConstructId
        Returns:
        a String object.
      • getSimpleName

        public String getSimpleName()
        Returns the method name, excluding parameter types and brackets.
        Specified by:
        getSimpleName in class ConstructId
        Returns:
        a String object.
      • isTestMethod

        public boolean isTestMethod()
        Returns true if the method has the @Test annotation or both the method name and its class name have the postfix or suffix 'test'.
        Returns:
        a boolean.