code: @SuppressWarnings("unchecked")
      private static Filter<ArchivePath> getFilterInstance(final String filterClassName, final Class<?>[] ctorTypes,
          final Object[] ctorArguments) {
          // Precondition checks
          assert filterClassName != null && filterClassName.length() > 0 : "Filter class name must be specified";
          assert ctorTypes != null : "Construction types must be specified";
          assert ctorArguments != null : "Construction arguments must be specified";
          assert ctorTypes.length == ctorArguments.length : "The number of ctor arguments and their types must match";
  
          // Find the filter impl class in the configured CLs
          final Class<Filter<ArchivePath>> filterClass;
          try {
              filterClass = (Class<Filter<ArchivePath>>) ClassLoaderSearchUtil.findClassFromClassLoaders(filterClassName,
                  ShrinkWrap.getDefaultDomain().getConfiguration().getClassLoaders());
          } catch (final ClassNotFoundException cnfe) {
              throw new IllegalStateException("Could not find filter implementation class " + filterClassName
                  + " in any of the configured CLs", cnfe);
          }
  
          // Make the new instance
          return SecurityActions.newInstance(filterClass, ctorTypes, ctorArguments, Filter.class);
      }
docs: Creates a new {@link Filter} instance using the given impl class name, constructor arguments and type
  
  @param filterClassName
  @param ctorTypes
  @param ctorArguments
  @return