Utility method for validating that there is exactly one instance of each
of the given properties.
@param warnings the list to add the warnings to
@param classes the properties to check
494339
protected void checkRequiredCardinality(List<ValidationWarning> warnings, Class<? extends ICalProperty>... classes) {
		for (Class<? extends ICalProperty> clazz : classes) {
			List<? extends ICalProperty> props = getProperties(clazz);

			if (props.isEmpty()) {
				warnings.add(new ValidationWarning(2, clazz.getSimpleName()));
				continue;
			}

			if (props.size() > 1) {
				warnings.add(new ValidationWarning(3, clazz.getSimpleName()));
				continue;
			}
		}
	}
833648
public boolean isToClass(Class<?> toClass) {
        List<DomainClass> domainClasses = reflectionHelper.getAnnotationWithMeta(toClass, DomainClass.class);
        return 0 != domainClasses.size();
    }
463469
protected final List<?> listref(Class<?>... classes) {
    List<Object> items = CollectUtils.newArrayList(classes.length);
    for (Class<?> clazz : classes) {
      items.add(new ReferenceValue(clazz.getName()));
    }
    return items;
  }
854163
public void registerFormatter(Class<IFormatter>... formatterClasses) {
        for (Class<IFormatter> cls : formatterClasses) {
            try {
                IFormatter fmt = cls.newInstance();
                extensionManager().registerFormatter(fmt);
            } catch (Exception e) {
                Logger.error(e, "Error get formatter instance from class[%s]", cls);
            }
        }
    }
1230812
public static synchronized void verify(Object... objects) {
        for (Object mock : objects) {
            if (mock instanceof Class<?>) {
                verifyClass((Class<?>) mock);
            } else {
                EasyMockMethodInvocationControl invocationControl = (EasyMockMethodInvocationControl) MockRepository.getInstanceMethodInvocationControl(mock);
                if (invocationControl != null) {
                    invocationControl.verify();
                } else {
                    if (isNiceReplayAndVerifyMode() && !isEasyMocked(mock)) {
                        // ignore non-mock
                    } else {
                        /*
                               * Delegate to easy mock class extension if we have no
                               * handler registered for this object.
                               */
                        try {
                            org.easymock.EasyMock.verify(mock);
                        } catch (RuntimeException e) {
                            throw new RuntimeException(mock + " is not a mock object", e);
                        }
                    }
                }
            }
        }
    }
215650
function checkTypes(classes) {
    var classCount = 0, nullType = 0, nullOf = 0, propCount = 0;
    for (var classKey in classes) {
        ++classCount;
        for (var definePropertyKey in classes[classKey].amorphicProperties) {
            var defineProperty = classes[classKey].amorphicProperties[definePropertyKey];
            if (!defineProperty.type) {
                ++nullType;
                console.log('Warning: ' + classKey + '.' + definePropertyKey + ' has no type');
            }
            if (defineProperty instanceof Array && !defineProperty.of) {
                console.log('Warning: ' + classKey + '.' + definePropertyKey + ' has no of');
                ++nullOf
            }
            ++propCount;
        }
    }
    console.log(classCount + ' classes loaded with ' + propCount + ' properties (' + nullType + ' null types, ' + nullOf + ' null ofs)');
}
677904
static boolean isIn(TypeName value, Class<?>... classes) {
		for (Class<?> item : classes) {
			if (value.toString().equals(TypeName.get(item).toString())) {
				return true;
			}
		}

		return false;
	}
288937
public ObjectGraph excludeClasses(Class<?>... classes) {
    for (Class<?> c : classes) {
      if (c == null) {
        throw new NullPointerException("Null class not allowed");
      }
      excludedClasses.add(c);
    }
    return this;
  }
923802
private static boolean isCompatibleClasses(final Class<?> one, final Class<?> two) {
        return one.isAssignableFrom(two) || two.isAssignableFrom(one);
    }
889742
public void setPropertiesClass(Class<?> propertiesClass) {
        Validate.notNull(propertiesClass);
        setProperty(SOABaseProperty.PROPERTIES_CLASS, propertiesClass.getName());
    }
1203374
public void setValidationWarnings(java.util.Collection<ValidationWarning> validationWarnings) {
        if (validationWarnings == null) {
            this.validationWarnings = null;
            return;
        }

        this.validationWarnings = new com.amazonaws.internal.SdkInternalList<ValidationWarning>(validationWarnings);
    }
286080
@BQConfigProperty("Specify the levels of specific warnings")
	public void setWarningLevels(Map<String, Severity> levels) {
		if (levels == null) {
			this.warningLevels = new HashMap<>();
		} else {
			this.warningLevels = levels;
		}
	}
129597
private void ensureTableIfNecessary(ClassDescriptorDef classDef, String checkLevel)
    {
        if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_OJB_PERSISTENT, false))
        {
            if (!classDef.hasProperty(PropertyHelper.OJB_PROPERTY_TABLE))
            {
                classDef.setProperty(PropertyHelper.OJB_PROPERTY_TABLE, classDef.getDefaultTableName());
            }
        }
    }
158399
public static void checkForInstantiation(Class<?> clazz) {
		final String errorMessage = checkForInstantiationError(clazz);

		if (errorMessage != null) {
			throw new RuntimeException("The class '" + clazz.getName() + "' is not instantiable: " + errorMessage);
		}
	}
154766
protected void checkStatus(List<ValidationWarning> warnings, Status... allowed) {
		Status actual = getProperty(Status.class);
		if (actual == null) {
			return;
		}

		List<String> allowedValues = new ArrayList<String>(allowed.length);
		for (Status status : allowed) {
			String value = status.getValue().toLowerCase();
			allowedValues.add(value);
		}

		String actualValue = actual.getValue().toLowerCase();
		if (!allowedValues.contains(actualValue)) {
			warnings.add(new ValidationWarning(13, actual.getValue(), allowedValues));
		}
	}
615139
public static void assertPropertyIdentifiers( Collection<String> properties) throws IllegalArgumentException
    {
    if( properties != null)
      {
      for( String property : properties)
        {
        assertIdentifier( property);
        }
      }
    }
267109
@SuppressWarnings("unchecked")
    protected List<T> getEnabledListeners(Class<? extends T>... classes) {
        List<T> listeners = new ArrayList<T>();
        for (Class<? extends T> clazz : classes) {
            Set<Bean<?>> beans = getBeanManager().getBeans(clazz);
            if (!beans.isEmpty()) {
                Bean<T> bean = (Bean<T>) getBeanManager().resolve(beans);
                CreationalContext<T> context = getBeanManager().createCreationalContext(bean);
                listeners.add((T) getBeanManager().getReference(bean, clazz, context));
            }
        }
        return listeners;
    }