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


Java DotName.equals方法代码示例

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


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

示例1: getHttpVerb

import org.jboss.jandex.DotName; //导入方法依赖的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: getAccessFromIndex

import org.jboss.jandex.DotName; //导入方法依赖的package包/类
protected AccessType getAccessFromIndex(DotName className) {
	Map<DotName, List<AnnotationInstance>> indexedAnnotations = indexBuilder.getIndexedAnnotations( className );
	List<AnnotationInstance> accessAnnotationInstances = indexedAnnotations.get( ACCESS );
	if ( MockHelper.isNotEmpty( accessAnnotationInstances ) ) {
		for ( AnnotationInstance annotationInstance : accessAnnotationInstances ) {
			if ( annotationInstance.target() != null && annotationInstance.target() instanceof ClassInfo ) {
				ClassInfo ci = (ClassInfo) ( annotationInstance.target() );
				if ( className.equals( ci.name() ) ) {
					//todo does ci need to have @Entity or @MappedSuperClass ??
					return AccessType.valueOf( annotationInstance.value().asEnum() );
				}
			}
		}
	}
	return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:EntityMocker.java

示例3: containsPathAnnotation

import org.jboss.jandex.DotName; //导入方法依赖的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

示例4: getProducer

import org.jboss.jandex.DotName; //导入方法依赖的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

示例5: getConsumer

import org.jboss.jandex.DotName; //导入方法依赖的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

示例6: overrideSchemaCatalogByDefault

import org.jboss.jandex.DotName; //导入方法依赖的package包/类
private void overrideSchemaCatalogByDefault(DotName annName, Map<DotName, List<AnnotationInstance>> indexedAnnotationMap, EntityMappingsMocker.Default defaults) {
	List<AnnotationInstance> annotationInstanceList = indexedAnnotationMap.get( annName );
	if ( annotationInstanceList == null || annotationInstanceList.isEmpty() ) {
		return;
	}
	List<AnnotationInstance> newAnnotationInstanceList = new ArrayList<AnnotationInstance>( annotationInstanceList.size() );
	for ( AnnotationInstance annotationInstance : annotationInstanceList ) {
		if ( annName.equals( IndexedAnnotationFilter.SECONDARY_TABLES ) ) {
			AnnotationInstance[] secondaryTableAnnotationInstanceArray = annotationInstance.value().asNestedArray();
			AnnotationValue[] newAnnotationValueArray = new AnnotationValue[secondaryTableAnnotationInstanceArray.length];
			for ( int i = 0; i < secondaryTableAnnotationInstanceArray.length; i++ ) {
				newAnnotationValueArray[i] = MockHelper.nestedAnnotationValue(
						"", overrideSchemaCatalogByDefault(
						secondaryTableAnnotationInstanceArray[i],
						defaults
				)
				);
			}
			AnnotationInstance secondaryTablesAnnotationInstance = MockHelper.create(
					annName,
					annotationInstance.target(),
					new AnnotationValue[] {
							AnnotationValue.createArrayValue( "value", newAnnotationValueArray )
					}
			);
			newAnnotationInstanceList.add( secondaryTablesAnnotationInstance );
		}
		else {
			newAnnotationInstanceList.add( overrideSchemaCatalogByDefault( annotationInstance, defaults ) );
		}
	}
	indexedAnnotationMap.put( annName, newAnnotationInstanceList );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:34,代码来源:DefaultConfigurationHelper.java


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