当前位置: 首页>>代码示例>>Java>>正文


Java AnnotationInstance.name方法代码示例

本文整理汇总了Java中org.jboss.jandex.AnnotationInstance.name方法的典型用法代码示例。如果您正苦于以下问题:Java AnnotationInstance.name方法的具体用法?Java AnnotationInstance.name怎么用?Java AnnotationInstance.name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.jandex.AnnotationInstance的用法示例。


在下文中一共展示了AnnotationInstance.name方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getHttpVerb

import org.jboss.jandex.AnnotationInstance; //导入方法依赖的package包/类
private String getHttpVerb(MethodInfo method) {
	getLog().debug("Getting http verb from method:");
	getLog().debug(method.name());

	List<AnnotationInstance> methodAnnotations = method.annotations();
	for (AnnotationInstance annotation : methodAnnotations) {
		DotName annotationName = annotation.name();
		if (!annotationName.equals(PATH_ANNOTATION)) {
			if (annotationName.equals(GET_ANNOTATION))
				return "GET ";
			if (annotationName.equals(POST_ANNOTATION))
				return "POST ";
			if (annotationName.equals(PUT_ANNOTATION))
				return "PUT ";
			if (annotationName.equals(DELETE_ANNOTATION))
				return "DELETE ";
			if (annotationName.equals(OPTIONS_ANNOTATION))
				return "OPTIONS ";
			if (annotationName.equals(HEAD_ANNOTATION))
				return "HEAD ";
		}
	}
	return null;
}
 
开发者ID:ContaAzul,项目名称:jaxrs-path-analyzer,代码行数:25,代码来源:PathAnalyzer.java

示例2: containsPathAnnotation

import org.jboss.jandex.AnnotationInstance; //导入方法依赖的package包/类
private boolean containsPathAnnotation(MethodInfo method) {
	List<AnnotationInstance> annotations = method.annotations();
	for (AnnotationInstance annotation : annotations) {
		DotName annotationName = annotation.name();
		if (annotationName.equals(PATH_ANNOTATION)) {
			return true;
		}
	}
	return false;
}
 
开发者ID:ContaAzul,项目名称:jaxrs-path-analyzer,代码行数:11,代码来源:PathAnalyzer.java

示例3: getProducer

import org.jboss.jandex.AnnotationInstance; //导入方法依赖的package包/类
private String getProducer(MethodInfo method) {
	getLog().debug("Getting producer from method:");
	getLog().debug(method.name());

	List<AnnotationInstance> methodAnnotations = method.annotations();
	for (AnnotationInstance annotation : methodAnnotations) {
		DotName annotationName = annotation.name();
		if (annotationName.equals(PRODUCES_ANNOTATION)) {
			return "PRODUCES(".concat(getValueFromAnnotation(annotation)).concat(") ");
		}

	}
	return null;
}
 
开发者ID:ContaAzul,项目名称:jaxrs-path-analyzer,代码行数:15,代码来源:PathAnalyzer.java

示例4: getConsumer

import org.jboss.jandex.AnnotationInstance; //导入方法依赖的package包/类
private String getConsumer(MethodInfo method) {
	getLog().debug("Getting producer from method:");
	getLog().debug(method.name());

	List<AnnotationInstance> methodAnnotations = method.annotations();
	for (AnnotationInstance annotation : methodAnnotations) {
		DotName annotationName = annotation.name();
		if (annotationName.equals(CONSUMES_ANNOTATION))
			return "CONSUMES(".concat(getValueFromAnnotation(annotation)).concat(") ");
	}
	return null;
}
 
开发者ID:ContaAzul,项目名称:jaxrs-path-analyzer,代码行数:13,代码来源:PathAnalyzer.java

示例5: addAnnotationToMap

import org.jboss.jandex.AnnotationInstance; //导入方法依赖的package包/类
private static void addAnnotationToMap(AnnotationInstance instance, Map<DotName, List<AnnotationInstance>> annotations) {
	DotName dotName = instance.name();
	List<AnnotationInstance> list;
	if ( annotations.containsKey( dotName ) ) {
		list = annotations.get( dotName );
	}
	else {
		list = new ArrayList<AnnotationInstance>();
		annotations.put( dotName, list );
	}
	list.add( instance );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:JandexHelper.java

示例6: beforePush

import org.jboss.jandex.AnnotationInstance; //导入方法依赖的package包/类
@Override
public void beforePush(IndexBuilder indexBuilder, DotName classDotName, AnnotationInstance annotationInstance) {
	DotName annName = annotationInstance.name();
	if ( !match( annName ) ) {
		return;
	}
	Map<DotName, List<AnnotationInstance>> map = indexBuilder.getIndexedAnnotations( classDotName );
	overrideIndexedAnnotationMap( annName, annotationInstance, map );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:AbstractAnnotationFilter.java


注:本文中的org.jboss.jandex.AnnotationInstance.name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。