@classmethod<EOL><INDENT>def class_traits(cls, **metadata):<DEDENT>
traits = dict([memb for memb in getmembers(cls) ifisinstance(memb[<NUM_LIT:1>], TraitType)])<EOL>if len(metadata) == <NUM_LIT:0>:<EOL><INDENT>return traits<EOL><DEDENT>for meta_name, meta_eval in list(metadata.items()):<EOL><INDENT>if type(meta_eval) is not FunctionType:<EOL><INDENT>metadata[meta_name] = _SimpleTest(meta_eval)<EOL><DEDENT><DEDENT>result = {}<EOL>for name, trait in list(traits.items()):<EOL><INDENT>for meta_name, meta_eval in list(metadata.items()):<EOL><INDENT>if not meta_eval(trait.get_metadata(meta_name)):<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>result[name] = trait<EOL><DEDENT><DEDENT>return result<EOL>
Get a list of all the traits of this class.

        This method is just like the :meth:`traits` method, but is unbound.

        The TraitTypes returned don't know anything about the values
        that the various HasTrait's instances are holding.

        This follows the same algorithm as traits does and does not allow
        for any simple way of specifying merely that a metadata name
        exists, but has any value.  This is because get_metadata returns
        None if a metadata key doesn't exist.