Code example for Annotation

Methods: annotationType

0
	private void setScope(Class<?> clazz) {
		Annotation ann;
		if ((ann = clazz.getAnnotation(ApplicationScoped.class)) != null
				|| (ann = clazz.getAnnotation(Dependent.class)) != null
				|| (ann = clazz.getAnnotation(ContextScoped.class)) != null)
			mBinding.setScope(ann.annotationType());
	} 
 
	private void validateAnnotation(Class<?> clazz) {
		AndroidVersion version = clazz.getAnnotation(AndroidVersion.class);
		if (version != null && Build.VERSION.SDK_INT < version.value())
			mBindings.unregister(mBinding);
 
		DeviceModel model = clazz.getAnnotation(DeviceModel.class);
		if (model != null && !Build.MODEL.equals(model.value()))
			mBindings.unregister(mBinding);
	} 
 
	private <I> I checkNotNull(I obj, String msg) {
		if (obj == null)
			throw new ConfigurationException(msg);