code: public NodeDefinitionData[] getAllChildNodeDefinitions(final InternalQName... nodeTypeNames)
     {
        final Collection<NodeDefinitionData> defsAny = new ArrayList<NodeDefinitionData>();
        final HashMap<InternalQName, NodeDefinitionData> defs = new HashMap<InternalQName, NodeDefinitionData>();
  
        for (final InternalQName ntname : nodeTypeNames)
        {
           for (final InternalQName suname : this.nodeTypeRepository.getSupertypes(ntname))
           {
              for (final NodeDefinitionData cnd : this.nodeTypeRepository.getNodeType(suname)
                 .getDeclaredChildNodeDefinitions())
              {
                 if (cnd.getName().equals(Constants.JCR_ANY_NAME))
                 {
                    defsAny.add(cnd);
                 }
                 else
                 {
                    defs.put(cnd.getName(), cnd);
                 }
              }
           }
  
           for (final NodeDefinitionData cnd : this.nodeTypeRepository.getNodeType(ntname)
              .getDeclaredChildNodeDefinitions())
           {
              if (cnd.getName().equals(Constants.JCR_ANY_NAME))
              {
                 defsAny.add(cnd);
              }
              else
              {
                 defs.put(cnd.getName(), cnd);
              }
           }
        }
  
        defsAny.addAll(defs.values());
        
        return defsAny.toArray(new NodeDefinitionData[defsAny.size()]);
     }
docs: {@inheritDoc}