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