I been giving IntelliJ a spin, and loving it so far. But, I got a question, is there any way of quickly getting the fully qualified name of a class from within the editor?
So, if I have some code like
Element element = new Element();
I could quickly get the fully qualifed name of Element, for example, com.whatever.Element
The fully-qualified class name can be obtained using the getName() method.
The term fully qualified file name (or FQFN) means a file on a computer whose exact name is completely specified such that it is unambiguous and cannot be mistaken for any other file on that computer system.
If you use fully qualified name then only declared class of this package will be accessible. Now there is no need to import. But you need to use fully qualified name every time when you are accessing the class or interface. It is generally used when two packages have same class name e.g. java.
Press Ctrl+Alt+Shift+C (Edit | Copy Reference) on "Editor" in the code and you'll have the fully-qualified name in your clipboard.
Or alternatively just right-click on the code and select "Copy Reference".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With