Results 1 to 3 of 3
- 10-24-2010, 07:25 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Count the numbers of parameters programmatically that a method has in JAVA?
Hello I'm new here in this forum and I'm still learning Java, but I don't think that this question fits in any other category, I'm sorry if I'm wrong. I would like to count the numbers of parameters programmatically that a method has.
It's for my home work that consists in transmitting data over UDP and I'm creating the protocol which will make it happen. I'm was thinking in how to transmit more than one parameter in a message, so I came up with the idea of
send each parameter in a different DatagramPacket rebuilding the identified message, but for reliability of the system and efficiency I would like that the parameters passed through the message checks with the numbers of parameters that the server or the client will need to execute otherwise throw a error.
I believe it's done with reflection.
Thank you very much.
- 10-24-2010, 08:06 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,380
- Blog Entries
- 7
- Rep Power
- 17
- 10-24-2010, 04:34 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
[SOLVED] how to count how many times you used a method
By Laythe in forum New To JavaReplies: 8Last Post: 06-07-2009, 02:29 AM -
Need to dynamicaly get all parameters in a method call.
By DavidJohns in forum Advanced JavaReplies: 2Last Post: 05-21-2008, 07:15 AM -
Netbeans 6.0 - code completion of method parameters
By mwildam in forum NetBeansReplies: 9Last Post: 12-18-2007, 09:02 AM -
is synchronization on method passing local variables as parameters needed
By reddzer in forum Java ServletReplies: 0Last Post: 11-10-2007, 04:47 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks