parameters check outside of the method

M

Maciek Zywno

hello

I guess that usually methods parameters are checked against being null,
outside of some range etc. in a method body just before an actual method
logic code. Then probably either runtime exception is thrown if there is
something wrong with parameters or proceed to the actual method logic.

I am curious of your opinion about the idea to make some parameters
check validation configuration in xml (some generic solution i.e. e.g.
checks against null) and let some proxy read this configuration and do
parameters check before invoking real method? Maybe it would be possible
to take such parameters validation outside meethod and make it this
validation declaratively configurable?

Does it sound logcal?
I would appreaciate any opinion :)

regards

Maciek Zywno
 
S

Sudsy

Maciek Zywno wrote:
I am curious of your opinion about the idea to make some parameters
check validation configuration in xml (some generic solution i.e. e.g.
checks against null) and let some proxy read this configuration and do
parameters check before invoking real method? Maybe it would be possible
to take such parameters validation outside meethod and make it this
validation declaratively configurable?

Check out XML Schema @ <http://www.w3.org/XML/Schema>
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top