what is the mean of "signature dependencies"

L

lifenglv

I can't understand the mean of "signature dependencies" in java. The
whole sentence is as following:
"Where a class included in this specification has methods, fields or
constructors with signature dependencies on classesnot included in the
implemented profile, these methods are not required to be present in
an implementation. A compliantimplementation choice may require these
methods and classes to be present." anyone can help me?
 
O

Owen Jacobson

I can't understand the mean of "signature dependencies" in java. The
whole sentence is as following:
"Where a class included in this specification has methods, fields or
constructors with signature dependencies on classesnot included in the
implemented profile, these methods are not required to be present in
an implementation. A compliantimplementation choice may require these
methods and classes to be present." anyone can help me?

The "signature" of a method is the return type of the method, the name
of the method, and the number, types, and order of its arguments.
Informally, it usually includes the exception list as well. Thus:

java.lang.String someMethod (java.lang.Integer index,
java.sql.ResultSet rs) throws java.sql.SQLException

declares a method whose signature mentions four other classes (String,
Integer, ResultSet, and SQLException). Because of the way Java's
bytecode verification and loading works, this means that both clients
of and providers of the method must have access to all of those
classes.
 
L

Lew

Owen said:
The "signature" of a method is the return type of the method, the name
of the method, and the number, types, and order of its arguments.
Informally, it usually includes the exception list as well. Thus:

Formally, it always includes the checked exceptions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top