Method validation support (II)

Description

This is the follow-up issue for the method validation feature after the first BV 1.1 early draft.

Environment

None

Activity

Show:
Matthew Adams
September 11, 2012, 6:04 PM

Can you add the ability to validate static methods? I see no technical reason why an instance needs to be provided.

Using the existing proposed validateAllParameters methods, I suppose one could provide null or the correct Class object, but I'd recommend passing null for the target object or, alternatively, I'd recommend the addition of another method like "validateStaticMethodParameters" or similar that omits the target object entirely to avoid the passing of the wrong Class object (possible with inheritance). The BV implementation, if it needs the Class object, could always ask the Method object for its Class via getDeclaringClass().

Fixed

Assignee

Gunnar Morling

Reporter

Gunnar Morling

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure