protected static synchronized void registerAllowedChildClass ( Class < ? extends ElementBase > clazz , Class < ? extends ElementBase > childClass , int maxOccurrences ) { allowedChildClasses . addCardinality ( clazz , childClass , maxOccurrences ) ; }
A ElementBase subclass should call this in its static initializer block to register any subclasses that may be a child .