Class MethodInfoList

    • Constructor Detail

      • MethodInfoList

        public MethodInfoList()
        Construct a new modifiable empty list of MethodInfo objects.
      • MethodInfoList

        public MethodInfoList​(int sizeHint)
        Construct a new modifiable empty list of MethodInfo objects, given a size hint.
        Parameters:
        sizeHint - the size hint
      • MethodInfoList

        public MethodInfoList​(java.util.Collection<MethodInfo> methodInfoCollection)
        Construct a new modifiable empty MethodInfoList, given an initial collection of MethodInfo objects.
        Parameters:
        methodInfoCollection - the collection of MethodInfo objects.
    • Method Detail

      • findReferencedClassInfo

        protected void findReferencedClassInfo​(java.util.Map<java.lang.String,​ClassInfo> classNameToClassInfo,
                                               java.util.Set<ClassInfo> refdClassInfo,
                                               LogNode log)
        Get ClassInfo objects for any classes referenced in the type descriptor or type signature.
        Parameters:
        classNameToClassInfo - the map from class name to ClassInfo.
        refdClassInfo - the referenced class info
        log - the log
      • containsName

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

        public MethodInfoList get​(java.lang.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, so this returns a MethodInfoList rather than a single MethodInfo.)
        Parameters:
        methodName - The name of a method.
        Returns:
        A MethodInfoList of MethodInfo objects from this list that have the given name (there may be more than one method with a given name, due to overloading, so this returns a MethodInfoList rather than a single MethodInfo). Returns the empty list if no method had a matching name.
      • getSingleMethod

        public MethodInfo getSingleMethod​(java.lang.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:
        java.lang.IllegalArgumentException - if there are two or more methods with the given name.