org.springframework.core.annotation.AnnotationUtils#getRepeatableAnnotations ( )源码实例Demo

下面列出了org.springframework.core.annotation.AnnotationUtils#getRepeatableAnnotations ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

/**
 * Execute SQL scripts configured via {@link Sql @Sql} for the supplied
 * {@link TestContext} and {@link ExecutionPhase}.
 */
private void executeSqlScripts(TestContext testContext, ExecutionPhase executionPhase) throws Exception {
	boolean classLevel = false;

	Set<Sql> sqlAnnotations = AnnotationUtils.getRepeatableAnnotations(testContext.getTestMethod(), Sql.class,
		SqlGroup.class);
	if (sqlAnnotations.isEmpty()) {
		sqlAnnotations = AnnotationUtils.getRepeatableAnnotations(testContext.getTestClass(), Sql.class,
			SqlGroup.class);
		if (!sqlAnnotations.isEmpty()) {
			classLevel = true;
		}
	}

	for (Sql sql : sqlAnnotations) {
		executeSqlScripts(sql, executionPhase, testContext, classLevel);
	}
}
 
@Override
public org.springframework.jmx.export.metadata.ManagedOperationParameter[] getManagedOperationParameters(Method method)
		throws InvalidMetadataException {

	Set<ManagedOperationParameter> anns = AnnotationUtils.getRepeatableAnnotations(
			method, ManagedOperationParameter.class, ManagedOperationParameters.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedOperationParameter.class);
}
 
@Override
public org.springframework.jmx.export.metadata.ManagedNotification[] getManagedNotifications(Class<?> clazz)
		throws InvalidMetadataException {

	Set<ManagedNotification> anns = AnnotationUtils.getRepeatableAnnotations(
			clazz, ManagedNotification.class, ManagedNotifications.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedNotification.class);
}
 
源代码4 项目: lams   文件: AnnotationJmxAttributeSource.java
@Override
public org.springframework.jmx.export.metadata.ManagedOperationParameter[] getManagedOperationParameters(Method method)
		throws InvalidMetadataException {

	Set<ManagedOperationParameter> anns = AnnotationUtils.getRepeatableAnnotations(
			method, ManagedOperationParameter.class, ManagedOperationParameters.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedOperationParameter.class);
}
 
源代码5 项目: lams   文件: AnnotationJmxAttributeSource.java
@Override
public org.springframework.jmx.export.metadata.ManagedNotification[] getManagedNotifications(Class<?> clazz)
		throws InvalidMetadataException {

	Set<ManagedNotification> anns = AnnotationUtils.getRepeatableAnnotations(
			clazz, ManagedNotification.class, ManagedNotifications.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedNotification.class);
}
 
@Override
public org.springframework.jmx.export.metadata.ManagedOperationParameter[] getManagedOperationParameters(Method method)
		throws InvalidMetadataException {

	Set<ManagedOperationParameter> anns = AnnotationUtils.getRepeatableAnnotations(
			method, ManagedOperationParameter.class, ManagedOperationParameters.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedOperationParameter.class);
}
 
@Override
public org.springframework.jmx.export.metadata.ManagedNotification[] getManagedNotifications(Class<?> clazz)
		throws InvalidMetadataException {

	Set<ManagedNotification> anns = AnnotationUtils.getRepeatableAnnotations(
			clazz, ManagedNotification.class, ManagedNotifications.class);
	return copyPropertiesToBeanArray(anns, org.springframework.jmx.export.metadata.ManagedNotification.class);
}