Reads property descriptors of class

@param clazz Class for which we are getting property descriptors
@return Array of Class PropertyDescriptors
763893
public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) {
        BeanInfo beanInfo = null;
        try {
            beanInfo = Introspector.getBeanInfo(clazz);

        } catch (IntrospectionException ex) {
            throw new IllegalArgumentException(
                    "Bean introspection failed: " + ex.getMessage());
        }

        return beanInfo.getPropertyDescriptors();
    }
1202611
private Set<Annotation> getFieldAnnotations(final Class<?> clazz)
	{
		try
		{
			return new LinkedHashSet<Annotation>(asList(clazz.getDeclaredField(propertyName).getAnnotations()));
		}
		catch (final NoSuchFieldException e)
		{
			if (clazz.getSuperclass() != null)
			{
				return getFieldAnnotations(clazz.getSuperclass());
			}
			else
			{
				logger.debug("Cannot find propertyName: {}, declaring class: {}", propertyName, clazz);
				return new LinkedHashSet<Annotation>(0);
			}
		}
	}
1401
public static Properties getFieldsAsProperties(Object obj, Class<?>[] clazzes) throws Exception {
        Properties props = new Properties();
        for (Field field : obj.getClass().getDeclaredFields()) {
            if (Modifier.isStatic(field.getModifiers()))
                continue;
            field.setAccessible(true);
            Class<?> type = field.getType();
            if (clazzes == null || contains(type, clazzes)) {
                Object val = field.get(obj);
                if (val != null)
                    props.put(field.getName(), val.toString());

            }
        }

        return props;
    }
66468
public static List<StartContainerConfig> getContainers(Class clazz) {
      if (!cacheSCC.containsKey(clazz)) {
         cacheSCC.put(clazz, new ArrayList<>(1));
         ContainerStart cs = (ContainerStart) clazz.getAnnotation(ContainerStart.class);
         if (cs != null) {
            cacheSCC.get(clazz).add(fromContainerStart(cs));
         }
         Containers c = (Containers) clazz.getAnnotation(com.vectorprint.report.itext.annotations.Containers.class);
         if (c != null) {
            for (ContainerStart s : c.containers()) {
               cacheSCC.get(clazz).add(fromContainerStart(s));
            }
         }
      }
      return cacheSCC.get(clazz);
   }
1062636
private static PropertyDescriptor getPropertyDescriptor( final Class<?> type, final String propertyName ) {

        Exceptions.requireNonNull(type);
        Exceptions.requireNonNull(propertyName);

        if ( !propertyName.contains( "." ) ) {
            return doGetPropertyDescriptor( type, propertyName );
        } else {
            String[] propertyNames = propertyName.split( "[.]" );
            Class<?> clazz = type;
            PropertyDescriptor propertyDescriptor = null;
            for ( String pName : propertyNames ) {
                propertyDescriptor = doGetPropertyDescriptor( clazz, pName );
                if ( propertyDescriptor == null ) {
                    return null;
                }
                clazz = propertyDescriptor.getPropertyType();
            }
            return propertyDescriptor;
        }
    }
132837
public static Method[] getAllInstanceMethods(final Class<?> clazz) {
        if (clazz == null) {
            return null;
        }

        List<Method> methods = new ArrayList<Method>();
        for (Method method : clazz.getMethods()) {
            if (!Modifier.isStatic(method.getModifiers())
                    && Modifier.isPublic(method.getModifiers())) {
                methods.add(method);
            }
        }

        return methods.toArray(new Method[methods.size()]);
    }
547541
public static Map<String, Method> getSetters(Class<?> clazz) {
		Map<String, Method> setters = new HashMap<String, Method>();
		Method[] methods = clazz.getMethods();
		for (Method method : methods) {
			String methodName = method.getName();
			if (method.getParameterTypes().length == 1
					&& methodName.startsWith("set") && methodName.length() > 3
					&& method.getReturnType() == Void.TYPE) {
				String propertyName = methodName.substring(3, 4).toLowerCase();
				if (methodName.length() > 4) {
					propertyName += methodName.substring(4);
				}
				setters.put(propertyName, method);
			}
		}
		return setters;
	}
660548
public static Class<?>[] getDeclaredClasses(Class<?> clazz) {
        assertReflectionAccessor();
        try {
            return accessor.getDeclaredClasses(clazz);
        } catch (Exception e) {
            throw SneakyException.sneakyThrow(e);
        }
    }
1208529
public static List<Field> getColumns(Class<?> clazz)
			throws NoColumnAnnotationException {
		if(clazz == null) {
			throw new NoColumnAnnotationException("class is null");
		}
			
		List<Field> result = _getAnnotationColumns(clazz, Column.class);
		if (result.isEmpty()) {
			throw new NoColumnAnnotationException("class " + clazz.getName()
					+ " does not have any @Column fields");
		}
		
		return result;
	}
1040450
private Field[] fields(Class<?> clazz)
    {

        Map<String, Field> fields = new HashMap<String, Field>();
        do
        {
            for (Field field : clazz.getDeclaredFields())
            {
                if (!fields.containsKey(field.getName()))
                {
                    fields.put(field.getName(), field);
                }
            }
            clazz = clazz.getSuperclass();
        }
        while (clazz != Object.class);

        return fields.values().toArray(new Field[fields.size()]);

    }
44552
protected List<Field> getFields(Class<?> clazz) {
        List<Field> fields = new ArrayList<Field>();

        while (clazz != null && !isBoundaryClass(clazz)) {
            for (Field field : clazz.getDeclaredFields()) {
                if (!field.isAnnotationPresent(Inject.class)) {
                    continue;
                }
                fields.add(field);
            }
            clazz = clazz.getSuperclass();
        }
        return fields;
    }
1020820
public static String[] getFieldNames(Class clazz) {
	Field[] fields = clazz.getFields();
	String[] names = new String[fields.length];
	for (int i = 0; i < names.length; i++) {
	    names[i] = fields[i].getName();
	}
	return names;
    }
580857
public static List<Class<?>> getSuperclasses(Class<?> clazz) {
        return getSuperclassesAsStream(clazz).collect(Collectors.toList());
    }
77826
public static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, final String fieldName) throws BeanException {
		return getPropertyDescriptor(clazz, fieldName, false);
	}
918887
@CheckForNull
    public Descriptor getDescriptor(Class<? extends Describable> type) {
        for( Descriptor d : getExtensionList(Descriptor.class) )
            if(d.clazz==type)
                return d;
        return null;
    }
243379
public static Method[] getAllMethod(Class<?> clazz) {
        if (clazz == null) {
            return null;
        }
        try {
            return clazz.getDeclaredMethods();
        } catch (SecurityException e) {
            e.printStackTrace();
        }
        return null;
    }
489844
public <T extends UserProperty> T getProperty(Class<T> clazz) {
        for (UserProperty p : properties) {
            if (clazz.isInstance(p))
                return clazz.cast(p);
        }
        return null;
    }