Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fully qualified reference to Java method signature

Tags:

java

What is the proper way to write a fully qualified reference to a method name in Java?

  1. Message[] com.sun.mail.imap.IMAPFolder#addMessages(Message[])
  2. Message[] com.sun.mail.imap.IMAPFolder.addMessages(Message[])
  3. Some other way
like image 472
Robottinosino Avatar asked Mar 26 '26 02:03

Robottinosino


1 Answers

If the signature of the method is Message[] addMessages(Message[] msgs)...

...and the class name is IMAPFolder...

...and it's in the package com.sun.map.imap...

...then the fully qualified method name would be com.sun.map.imap.IMAPFolder.addMessages(Message[] msgs).

Visible class/instance variables share the same pattern, although for the sake of OO design, this is typically discouraged.

Normally, one only concerns themselves with the fully qualified object name, not the method/[instance|class] variable name.

like image 106
Makoto Avatar answered Mar 28 '26 16:03

Makoto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!