get stylers with a certain baseclass from a collection of stylers.

@param <E>
@param stylers
@param clazz
@return
@throws VectorPrintException
186425
public static <E extends BaseStyler> List<E> getStylers(Collection<? extends BaseStyler> stylers, Class<E> clazz)
       throws VectorPrintException {
      List<E> st = new ArrayList<>(1);
      for (BaseStyler s : stylers) {
         if (clazz.isAssignableFrom(s.getClass())) {
            st.add((E) s);
         }
      }
      return st;
   }
1161009
public static List<Method> getBeanSetters(Class<?> clazz) {
    List<Method> methods = CollectUtils.newArrayList();
    for (Method m : clazz.getMethods()) {
      if (m.getName().startsWith("set") && m.getName().length() > 3) {
        if (Modifier.isPublic(m.getModifiers()) && !Modifier.isStatic(m.getModifiers())
            && m.getParameterTypes().length == 1) {
          methods.add(m);
        }
      }
    }
    return methods;
  }
904175
public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) {
        PropertyDescriptor[] properties = propertyDescriptors(clazz);
        Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>();

        for (PropertyDescriptor property : properties) {
            if ("class".equals(property.getName()) == false) {
                mappedProperties.put(property.getName(), property);
            }
        }

        return mappedProperties;
    }
561376
public <T extends DajlabModelInterface> T get(Class<T> clazz) {

		T ret = null;
		try {
			ret = (T) dajlab.get(clazz.getName());
		} catch (ClassCastException e) {
			e.printStackTrace();
		}
		return ret;
	}
570379
public static List<Field> getSelfAndSuperClassFields(Class<?> clazz) {//YongZ added this method
		List<Field> fields = new ArrayList<Field>();
		for (Field field : clazz.getDeclaredFields())
			fields.add(field);

		Class<?> superclass = clazz.getSuperclass();
		while (superclass != null) {
			if (Object.class.equals(superclass)) {
				break;
			}
			for (Field field : superclass.getDeclaredFields())
				fields.add(field);
			superclass = superclass.getSuperclass();
		}
		return fields;
	}
574838
@SuppressWarnings("unchecked")
    public <T> Set<T> getSet(Class<T> clazz) {
        return (Set<T>) objects;
    }
461592
public <T extends BaseNlpEntity> List<T> getEntities(Class<T> clazz) {
    List<BaseNlpEntity> resultList = new ArrayList<>();
    for (BaseNlpEntity item : getEntities()) {
      if (item.getClass().equals(clazz)) {
        resultList.add(item);
      }
    }
    return (List<T>) resultList;
  }
647656
public static <T> Set<Class<? extends T>> getNonAbstractSubclasses(Class<T> clazz) {
        return ClassGraphUtil/*TraverseClasspath*/.getNonAbstractSubClasses(clazz);
    }
1058648
@Override
   public final void processImage(com.itextpdf.text.Image img) throws VectorPrintException {
      applySettings(img);
      for (BaseStyler bs : stylers) {
         // these stylers are configured in the setup after this importing stylers, apply here
         if (bs.canStyle(img) && bs.shouldStyle(data, img)) {
            bs.style(img, data);
         }
      }
      
      if (getValue(SEPARATE_PAGE, Boolean.class)) {
         if (getValue(FITTOIMAGE, Boolean.class)) {
            getDocument().setPageSize(new Rectangle(img.getScaledWidth(), img.getScaledHeight()));
         } else if (getValue(FITTOPAGE, Boolean.class)) {
            img.scaleToFit(getDocument().getPageSize().getWidth(),getDocument().getPageSize().getHeight());
         }
         if (getValue(NOFOOTER, Boolean.class)) {
            getSettings().put(ReportConstants.PRINTFOOTER, "false");
         }
         getDocument().newPage();
      }
      if (getValue(DRAWDIRECT, Boolean.class)) {
         this.imageBeingProcessed = img;
         drawOnPage(imageBeingProcessed);
         this.imageBeingProcessed = null;
      } else {
         addToDocument(img);
      }
   }
851757
public List<CommandInterceptor> getInterceptorsWithClass(Class clazz) {
      ArrayList<CommandInterceptor> list =
            new ArrayList<>(asyncInterceptorChain.getInterceptors().size());
      asyncInterceptorChain.getInterceptors().forEach(ci -> {
         if (clazz == ci.getClass()) {
            list.add((CommandInterceptor) ci);
         }
      });
      return list;
   }
156223
public static Field[] jlClassGetFields(Class<?> clazz) {
		ReloadableType rtype = getRType(clazz);
		if (rtype == null) {
			return clazz.getFields();
		}
		else {
			List<Field> allFields = new ArrayList<Field>();
			gatherFields(clazz, allFields, new HashSet<Class<?>>());
			return allFields.toArray(new Field[allFields.size()]);
		}
	}
668889
public static List<Class<?>> getAllClasses(Class<?> clazz) {
        List<Class<?>> types = new ArrayList<>();
        while (clazz != null) {
            types.add(clazz);
            clazz = clazz.getSuperclass();
        }
        return types;
    }
690873
@SuppressWarnings("unchecked")
    private static <T> Constructor<T>[] getConstructorsToOverwrite(Class<T> clazz) {
        return (Constructor<T>[]) clazz.getDeclaredConstructors();
    }
583325
static List<Field> getAllFieldsOfClass0(Class<?> clazz) {
        List<Field> fields = CollectionUtil.createArrayList();
        for (Class<?> itr = clazz; hasSuperClass(itr); ) {
            fields.addAll(Arrays.asList(itr.getDeclaredFields()));
            itr = itr.getSuperclass();
        }

        return fields;
    }
895706
public static Field[] getFields (Class<?> clazz)
    {
        ArrayList<Field> list = new ArrayList<Field>();
        getFields(clazz, list);
        return list.toArray(new Field[list.size()]);
    }
1173965
public static Method[] getDeclaredMethods(Class clazz) {
	Method[] methods = clazz.getMethods();
	ArrayList list = new ArrayList();
	for (int i = 0; i < methods.length; i++) {
	    if (methods[i].getDeclaringClass() == clazz) list.add(methods[i]);
	}
	if (list.size() == 0) return new Method[0];
	return (Method[]) list.toArray(new Method[list.size()]);
    }
1009202
public static Collection<String> getPropertyNames(
                    final Class<?> clazz
                    )
    {
        if (clazz == null) {
            throw new IllegalArgumentException( "no class specified" );
        }

        Map<String, PropertyAccessor>  accessors = _getAccessors( clazz );

        return accessors.keySet();
    }