public void registerTag ( String namespacePrefix , String tagName , Class < ? > clazz ) { if ( ! _namespaces . containsKey ( namespacePrefix ) ) throw new RuntimeException ( "Namespace prefix '" + namespacePrefix + "' has not been registered yet" ) ; _xstream . alias ( namespacePrefix + ":" + tagName , clazz ) ; _xstream . addPermission ( new WildcardTypePermission ( new String [ ] { clazz . getName ( ) } ) ) ; _tags . computeIfAbsent ( namespacePrefix , k -> new HashSet <> ( ) ) . add ( tagName ) ; }
Registers a tag corresponding to a specific class in the given namespace .