QDox
  1. QDox
  2. QDOX-249

Please create and support JavaMethod.isDeprecated

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      It would be very useful to be able to determine if a JavaMethod is marked as @java.lang.Deprecated. See MGWT-352 for a concrete use case.

        Issue Links

          Activity

          Robert Scholte made changes -
          Field Original Value New Value
          Link This issue relates to MGWT-352 [ MGWT-352 ]
          Hide
          Robert Scholte added a comment -

          This is out of scope for QDox.
          I don't want to add a getter for every type of doclettag or Annotation.
          The following example is based on QDox2, it should be possible to do the same with QDox-1.x

              public boolean isDeprecated( JavaAnnotatedElement elm )
              {
                  for ( JavaAnnotation annotation : elm.getAnnotations() )
                  {
                      if ( "java.lang.Deprecated".equals( annotation.getType().getCanonicalName() ) )
                      {
                          return true;
                      }
                  }
                  return elm.getTagByName( "deprecated" ) != null;
              }
          
          
          Show
          Robert Scholte added a comment - This is out of scope for QDox. I don't want to add a getter for every type of doclettag or Annotation. The following example is based on QDox2, it should be possible to do the same with QDox-1.x public boolean isDeprecated( JavaAnnotatedElement elm ) { for ( JavaAnnotation annotation : elm.getAnnotations() ) { if ( "java.lang.Deprecated" .equals( annotation.getType().getCanonicalName() ) ) { return true ; } } return elm.getTagByName( "deprecated" ) != null ; }
          Robert Scholte made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Robert Scholte [ rfscholte ]
          Resolution Won't Fix [ 2 ]

            People

            • Assignee:
              Robert Scholte
              Reporter:
              jieryn
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: