Gets the first property of a given class.
@param clazz the property class
@param <T> the property class
@return the property or null if not found
17413
public <T extends ICalProperty> T getProperty(Class<T> clazz) {
		return clazz.cast(properties.first(clazz));
	}
168747
public static File getClassFile(Class<?> clazz) {
    File dir = new File(clazz.getProtectionDomain().getCodeSource().getLocation().getPath());
    if (!dir.isDirectory()) return null; // class file might be contained in Jar
    File clazzFile = new File(dir, clazz.getName().replace('.', File.separatorChar) + ".class");
    return clazzFile.isFile() ? clazzFile : null;
  }
1105919
public <T> Mapping<T> getMapping(Class<T> clazz) {
        return (cache != null) ? cache.getMapping(clazz, annotationSet)
                : new Mapping<T>(clazz, annotationSet);
    }
1130105
public static Class<?> getPrimitiveClass(final Class<?> clazz) {

    if (clazz == null) {
      return null;
    }
    int index = ArrayUtils.indexOf(WRAPPER_CLASSES, clazz);
    if (index != ArrayUtils.INDEX_OF_NOT_FOUND) {
      return PRIMITIVE_CLASSES[index];
    }
    return clazz;
  }
593062
public static Method getGetterMethod(Class<?> clazz, String propertyName) {
		String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(propertyName);

		Method method = getMethod(clazz, getterMethodName);

		// retry on another name
		if (method == null) {
			getterMethodName = IS_PREFIX + StringUtils.capitalize(propertyName);
			method = getMethod(clazz, getterMethodName);
		}
		return method;
	}
594396
public String getClassTypeName(Class<?> clazz) {
        
        String type = null;

        if (clazz.isInterface()) {
            type = "interface";
        }
        else if (clazz.isPrimitive() || clazz.isArray()) {
            // type already null
        }
        else {
            type = "class";
        }

        return type;
    }
210654
public String getTypeName(Class<?> clazz) {
		Type type = typeAnnotations.get(clazz);

		if (type != null) {
			return type.value();
		}
		return null;
	}
142902
public static String getColumnFromProperty(Class<?> clazz, String propertyName)
   {
      return Introspector.getIntrospected(clazz).getColumnNameForProperty(propertyName);
   }
1185501
public static <T> T getBean(Class<T> clazz) {
        ApplicationContext appContext = getAppContext();
        
        try {
            return appContext == null ? null : appContext.getBean(clazz);
        } catch (Exception e) {
            return null;
        }
    }
1310964
public Annotation getAnnotation(final Class<? extends Annotation> clazz) {
        final List<Annotation> found = foundAnnotations.get(clazz);
        return found == null || found.isEmpty() ? null : found.get(found.size() - 1);
    }
668261
public static ClassLoader getClassLoader(Class<?> clazz) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        if (loader != null) {
            return loader;
        }
        if (clazz != null) {
            loader = clazz.getClassLoader();
            if (loader != null) {
                return loader;
            }
        }
        return ClassLoader.getSystemClassLoader();
    }
837739
public static Field getField(Class<?> clazz, String fieldName)
      throws NoSuchFieldException {
    if (clazz == Object.class) {
      return null;
    }
    try {
      Field field = clazz.getDeclaredField(fieldName);
      return field;
    } catch (NoSuchFieldException e) {
      return getField(clazz.getSuperclass(), fieldName);
    }
  }
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();
    }
582128
public Config getConfig(Class<?> clazz) {
        Config config = DEFAULT_CONFIG;

        Config globalConfig = Config.Implementation.fromProperties(getConfigProperties());
        if (globalConfig != null) {
            config = new Config.Implementation(config, globalConfig);
        }

        Config classConfig = clazz.getAnnotation(Config.class);
        if (classConfig != null) {
            config = new Config.Implementation(config, classConfig);
        }

        return config;
    }
632823
public I getNewInstance(Class<I> clazz) {
        Constructor<I> ctor;
        try {
            ctor = clazz.getConstructor();
            return ctor.newInstance();
        } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException
                | IllegalArgumentException | InvocationTargetException e) {
            throw new InitializationException("Given class not found", e);
        }
    }
81369
public static Type getDeclaredBeanType(Class<?> clazz) {
        Type[] actualTypeArguments = Reflections.getActualTypeArguments(clazz);
        if (actualTypeArguments.length == 1) {
            return actualTypeArguments[0];
        } else {
            return null;
        }
    }
512331
private <T> T get(Class<T> clazz) {
    try {
      return clazz.cast(get());
    } catch (ClassCastException e) {
      return null;
    }
  }