Accessing .NET extension methods from Java

.NET supports extension methods, which are a way to add methods to an existing class without actually altering the class; the extension methods are really specially constructed methods in a different class. Extension methods are purely a compile-time construct; they do not exist as such at run time.

If a class has an extension method, it will not appear as a proxied method in the proxy of the class, but you can still access it through the original class.  For example, Concat() is an extension method of the generic collection List<>. As an extension method, it will not appear in the Java proxy class List__1. However, Concat() is actually a static method in System.Linq.Enumerable, and can be accessed through a proxy of Enumerable. This means that you cannot write a proxy call myList.Concat(myOtherList), but you can write the equivalent proxy call Enumerable.Concat(myList, myOtherList).