title: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Class;
body: <p>when I'm executing the below code I'm getting Class cast exception. I believe in an object is trying to cast with class can anyone help me     </p>
  
  <pre><code> public abstract AGridFilterMenu refreshFilters();
  
  
   public AGridFilterMenu supportFilter(String style, Class&lt;? extends AFilterItem&gt; clazz, By... childLocators) {
        ArrayList&lt;Class&lt;By&gt;&gt; signature = new ArrayList&lt;&gt;();
        for(int i = 0; i&lt; childLocators.length; i++) {
            signature.add(By.class);
        }
  
        try {
          Constructor&lt;? extends AFilterItem&gt; construct = clazz.getConstructor((Class&lt;?&gt;[]) signature.toArray());
          constructors.put(style, construct);
          filteritemChildLocators.put(style, childLocators);
      } catch (NoSuchMethodException | SecurityException e) {
          throw new TestCodeException("Unsupported FilterItem signature", e);
      }
        return this;
    }
  
    public AFilterItem getFilter(String filterName) {
      logger.trace(String.format("Retrieving filter %s", filterName));
      AFilterItem item = filters.get(filterName);`enter code here`
      item.bind();
      return item;
    }
  </code></pre>