Details
Description
Accessing annotations and its parameters is supported if the annotation is on a class or a method, but annotations on method parameters are not supported - there is nothing in JavaParameter to access annotations on the parameter.
Here's a small example of using this annotation:
@NativeAccessible
static void get_tmp_dir( String targetfilename, @ParamInfo( direction = ParamInfo.Direction.OUT ) byte[] tmpDirOutput ) throws IOException {
A code generator is used to generate the necessary JNI code to make this method accessible from C/Fortran. The direction information affects whether the data is copied from a native buffer before method call (in), after method call (out) or both (inout). Currently we are using reflection to read the annotations in the generator but would like to get rid of it .
This is slightly related to http://jira.codehaus.org/browse/QDOX-103 but apparently the fix to that issue only fixed the parsing but did not add accessibility to the said annotations.
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Robert Scholte [ rfscholte ] | |
Fix Version/s | 1.11 [ 15653 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Fix in rev-676