QDox
  1. QDox
  2. QDOX-178

Annotations on method parameters are inaccessible

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.10
    • Fix Version/s: 1.10.1
    • Component/s: Java API
    • Labels:
      None
    • Number of attachments :
      0

      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

        Hide
        Robert Scholte added a comment -

        Fix in rev-676

        Show
        Robert Scholte added a comment - Fix in rev-676
        Robert Scholte made changes -
        Field Original Value New Value
        Assignee Robert Scholte [ rfscholte ]
        Fix Version/s 1.11 [ 15653 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Paul Hammant made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Antti Karanta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: