maybe it's very silly question. Please understand and forgive. I'm trying to find a way to implement annotation that can change method paramter.
Please see the code:
/**
* This method does some scary things in OS file system.
* @param anyFileSystemPath is a file system path :)
*/
public File makeSomeFileSystemStuff(String anyFileSystemPath){
//some code goes here...
}
I would like to create an annotation:
public File makeSomeFileSystemStuff(@IsValid String anyFileSystemPath){
//some code goes here...
}
Where @IsValid annotation validates path (is should be at least with read access and should exist of course). Also I would like to be sure that each path ends with "/". So This annotation should append "/" to paramter value if "/" is not present at the end of line.
How can I do that?
I've tries to goolge like: java annotation change method paramter value, get method paramter value, e.t.c. but didn't find something useful for me :( Please advice.