I see this in a stack trace:
myorg.vignettemodules.customregistration.NewsCategoryVAPDAO.getEmailContentByID(I)Lmyorg/pushemail/model/EmailContent;
What does the "(I)L
" mean?
It's a form of name mangling used for disambiguating method overloads. The method name is appended by a series of characters describing the parameters and return type: the parameters appear sequentially inside parentheses, and the return type follows the closing parenthesis. The codes are as follows:
Z
: boolean
B
: byte
C
: char
S
: short
I
: int
J
: long
F
: float
D
: double
L
fully-qualified-class-name ;
: fully qualified class[
type : array of type
V
: void
So, in your case, the (I)Lmyorg/pushemail/model/EmailContent;
means the method takes one argument of type int
and returns an object of type myorg.pushemail.model.EmailContent
.
It means the method takes an int
, and returns myorg.pushemail.model.EmailContent
The string from "L" to ";" is one type descriptor, for the return type. The stuff inside parentheses are the method parameters (in this case, there's just one).
These type descriptors are defined as part of the Java Virtual Machine Specification, in section 4.3.2. Table 4.3-A shows all of the codes used. When a class is compiled, descriptors of this form are used to specify the signature of methods and the types of fields and variables.
In Java serialization, method descriptors are part of the information that is hashed to form the default serialVersionUID
for a Serializable
class.
In RMI, method descriptors are hashed, and the result is used to identify which method is being invoked in the remote interface.
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