Contracts for overloaded methods and constructors
|
Contracts for overloaded methods and constructors is now supported.
Note however that overloaded methods with the same number of parameters
where the parameter types have the same name (but not the same package)
is not supported.
For example, the following will not work:
public void foo(java.lang.String s)
public void foo(my.company.String s)
|
Resolving simple
contractClassName attributes
|
It is now possible to specify the contract class
name
with its simple name in the
ContractReference annotation, if the contract class if defined in the
same package as the target class.
Assume the classes below are defined in the same
package
(of course, they may be in different source trees).
Then the following code now works:
public class DummyContract extends ContractBase<Dummy> {
...
}
@ContractReference(contractClassName="DummyContract")
public class Dummy {
...
}
|