code: public static TraceComponent register(Class<?> aClass) {
          TraceComponent tc;
  
          /*
           * Check for TraceOptions annotations to specify trace groups and/or
           * message bundle name. Class-level annotation takes priority over
           * package-level.
           */
          TraceOptions options = aClass.getAnnotation(TraceOptions.class);
          if (options == null) {
              options = aClass.getPackage().getAnnotation(TraceOptions.class);
          }
  
          String name = aClass.getName();
          if (options == null) {
              tc = new TraceComponent(name, aClass, (String) null, null);
          } else {
              String[] traceGroups = options.traceGroups();
              if (traceGroups.length == 0) {
                  String traceGroup = options.traceGroup();
                  if (traceGroup.trim().isEmpty()) {
                      traceGroups = TraceComponent.EMPTY_STRING_ARRAY;
                  } else {
                      traceGroups = new String[] { traceGroup };
                  }
              }
  
              tc = new TraceComponent(name, aClass, traceGroups, false, options.messageBundle());
          }
  
          registerTraceComponent(tc);
          return tc;
      }
docs: Register the provided class with the trace service. This method will look
  for a trace group name, list of trace group names, and a message bundle
  name specified through the {@link com.ibm.websphere.ras.annotation.TraceOptions} annotation. The
  annotation can be specified at the class and/or the package level; the
  class-level annotation will be given priority. If both traceGroup and
  traceGroups are specified, traceGroups will be given priority.
  
  @param aClass
  a valid <code>Class</code> to register a component for with
  the trace manager. The className is obtained from the Class
  and is used as the name in the registration process.
  @return TraceComponent the <code>TraceComponent</code> corresponding to
  the name of the specified class.