The Reflection API uses a design pattern for retrieval and filtering. The following table shows when one class is a container for a number of other classes.
Member | Description |
---|---|
Xxx[] FindXxx(XxxFilter filter, Object filterCriteria) | Finds and returns the Xxx instances that match the criteria specified by filter. That is, if filter.invoke(x) returns true, then include x in the resultant array. Otherwise, omit it. |
Xxx GetXxx(<parameters>) | Return the Xxx instance that is uniquely specified by <parameters>. If no such instance exists, return null. Note that <parameters> uniquely specifies an Xxx instance. |
Xxx[] GetXxxs() | Return all of the Xxx instances. If no Xxx instances exist, return an array containing zero elements. |
Xxx[] GetXxxs(<parameters>) | Return all of the Xxx instances. If no Xxx instances exist, return an array containing zero elements. Note that <parameters> does not necessarily specify a unique Xxx instance. |
The diagram below shows this design pattern in action for Module (which may contain zero or more classes), Type (which may contain zero or more methods) and MethodInfo.