コード例 #1
0
 /**
  * Return the string representation of the flags for a problem
  *
  * @param category
  * @param flags
  * @return the string for the problem flags
  */
 public static String getProblemFlagsName(int category, int flags) {
   switch (category) {
     case IApiProblem.CATEGORY_COMPATIBILITY:
       return Util.getDeltaFlagsName(flags);
     case IApiProblem.CATEGORY_SINCETAGS:
     case IApiProblem.CATEGORY_USAGE:
     case IApiProblem.CATEGORY_VERSION:
     case IApiProblem.CATEGORY_API_BASELINE:
     case IApiProblem.CATEGORY_API_COMPONENT_RESOLUTION:
       {
         switch (flags) {
           case IApiProblem.LEAK_EXTENDS:
             return "LEAK_EXTENDS"; //$NON-NLS-1$
           case IApiProblem.LEAK_FIELD:
             return "LEAK_FIELD"; //$NON-NLS-1$
           case IApiProblem.LEAK_IMPLEMENTS:
             return "LEAK_IMPLEMENTS"; //$NON-NLS-1$
           case IApiProblem.LEAK_METHOD_PARAMETER:
             return "LEAK_METHOD_PARAMETER"; //$NON-NLS-1$
           case IApiProblem.LEAK_CONSTRUCTOR_PARAMETER:
             return "LEAK_CONSTRUCTOR_PARAMETER"; //$NON-NLS-1$
           case IApiProblem.LEAK_RETURN_TYPE:
             return "LEAK_RETURN_TYPE"; //$NON-NLS-1$
           case IApiProblem.CONSTRUCTOR_METHOD:
             return "CONSTRUCTOR_METHOD"; //$NON-NLS-1$
           case IApiProblem.NO_FLAGS:
             return "NO_FLAGS"; //$NON-NLS-1$
           case IApiProblem.INDIRECT_REFERENCE:
             return "INDIRECT_REFERENCE"; //$NON-NLS-1$
           case IApiProblem.METHOD:
             return "METHOD"; //$NON-NLS-1$
           case IApiProblem.FIELD:
             return "FIELD"; //$NON-NLS-1$
           default:
             return Util.UNKNOWN_FLAGS;
         }
       }
     case IApiProblem.CATEGORY_API_USE_SCAN_PROBLEM:
       {
         switch (flags) {
           case IApiProblem.API_USE_SCAN_DELETED:
             return "DELETED"; //$NON-NLS-1$
           case IApiProblem.API_USE_SCAN_UNRESOLVED:
             return "UNRESOLVED"; //$NON-NLS-1$
           default:
             return Util.UNKNOWN_FLAGS;
         }
       }
     default:
       return Util.UNKNOWN_FLAGS;
   }
 }