public class Main { T foo(T arg) { return arg; } class MyClass { void myMethod() { } // NetBeans claims this method has no usages } public Main() { String x = ""; foo(x); // code completion does not work here MyClass y = new MyClass(); foo(y).myMethod(); // this method invocation is not updated during refactoring (rename) } }