Beispiel #1
0
 /**
  * Given a ClassDoc, return the name of its type (Class, Interface, etc.).
  *
  * @param cd the ClassDoc to check.
  * @param lowerCaseOnly true if you want the name returned in lower case. If false, the first
  *     letter of the name is capatilized.
  * @return
  */
 public static String getTypeName(Configuration config, ClassDoc cd, boolean lowerCaseOnly) {
   String typeName = "";
   if (cd.isOrdinaryClass()) {
     typeName = "doclet.Class";
   } else if (cd.isInterface()) {
     typeName = "doclet.Interface";
   } else if (cd.isException()) {
     typeName = "doclet.Exception";
   } else if (cd.isError()) {
     typeName = "doclet.Error";
   } else if (cd.isAnnotationType()) {
     typeName = "doclet.AnnotationType";
   } else if (cd.isEnum()) {
     typeName = "doclet.Enum";
   }
   return config.getText(lowerCaseOnly ? typeName.toLowerCase() : typeName);
 }