Class MethodInfoList

    • Method Detail

      • getNames

        public List<String> getNames()
        Returns:
        The names of all methods in this list, by calling MethodInfo.getName() for each item in the list.
      • getAsStrings

        public List<String> getAsStrings()
        Returns:
        The string representations of all methods in this list (with annotations, modifiers, params, etc.), by calling MethodInfo.toString() for each item in the list.
      • containsName

        public boolean containsName​(String methodName)
        Parameters:
        methodName - The name of a class.
        Returns:
        true if the list contains a method with the given name.
      • get

        public MethodInfoList get​(String methodName)
        Returns a list of all methods matching a given name. (There may be more than one method with a given name, due to overloading.)
        Parameters:
        methodName - The name of a method.
        Returns:
        A list of MethodInfo objects in the list with the given name (there may be more than one method with a given name, due to overloading). Returns the empty list if no method had a matching name.
      • getSingleMethod

        public MethodInfo getSingleMethod​(String methodName)
        Returns a single method with the given name, or null if not found. Throws IllegalArgumentException if there are two methods with the given name.
        Parameters:
        methodName - The name of a method.
        Returns:
        The MethodInfo object from the list with the given name, if there is exactly one method with the given name. Returns null if there were no methods with the given name.
        Throws:
        IllegalArgumentException - if there are two or more methods with the given name.