本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 );
}
示例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 );
}