// static private methods
//
static private Traits constructTraits(final Class<?> klass) {
if (klass==null) {
throw new LibraryException("null Traits"); // TODO: message
}
if (klass!=Traits.class) {
throw new LibraryException(ReflectConstants.WRONG_ARGUMENT_TYPE);
}
try {
return (Traits) klass.newInstance();
} catch (final Exception e) {
throw new LibraryException("cannot create Traits", e); // TODO: message
}
}