protected Object processElement ( Object obj , Class < ? > expectedType ) { if ( obj == null || obj instanceof Proxy ) { return obj ; } if ( obj instanceof Doc ) { return wrap ( obj ) ; } else if ( expectedType != null && expectedType . isArray ( ) ) { final Class < ? > componentType = expectedType . getComponentType ( ) ; if ( Doc . class . isAssignableFrom ( componentType ) ) { final int len = Array . getLength ( obj ) ; final List < Object > list = new ArrayList <> ( len ) ; final ApidocExcluder excluder = this . configuration . get ( ) . getApidocExcluder ( ) ; for ( int i = 0 ; i < len ; ++ i ) { final Object entry = Array . get ( obj , i ) ; if ( ! ( entry instanceof Doc ) ) { list . add ( processElement ( entry , componentType ) ) ; } else if ( excluder . isExcluded ( ( Doc ) entry ) ) { if ( excluder . isTranslatableToTag ( ( Doc ) entry ) ) { // } } else { list . add ( processElement ( entry , componentType ) ) ; } } final Object newArray = Array . newInstance ( componentType , list . size ( ) ) ; int i = 0 ; for ( final Object element : list ) { Array . set ( newArray , i , element ) ; ++ i ; } return newArray ; } } return obj ; }
Filter the given document .