public static boolean isTrait(final Class clazz){
  return clazz != null && clazz.getAnnotation(Trait.class) != null;
}

public static boolean isTrait ( final Class clazz ) { return clazz != null && clazz . getAnnotation ( Trait . class ) != null ; }
returns true if the specified class is a trait .
