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


Java DotName.createSimple方法代码示例

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


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

示例1: getClassInfo

import org.jboss.jandex.DotName; //导入方法依赖的package包/类
@Override
public ClassInfo getClassInfo(String name) {
	DotName dotName = DotName.createSimple( name );
	return index.getClassByName( dotName );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:AnnotationBindingContextImpl.java

示例2: createClassInfo

import org.jboss.jandex.DotName; //导入方法依赖的package包/类
ClassInfo createClassInfo(String className) {
	if ( StringHelper.isEmpty( className ) ) {
		throw new AssertionFailure( "Class Name used to create ClassInfo is empty." );
	}
	DotName classDotName = DotName.createSimple( className );
	if ( classes.containsKey( classDotName ) ) {
		//classInfoAnnotationsMap.put( classDotName, new HashMap<DotName, List<AnnotationInstance>>(classes.get( classDotName ).annotations()) );
		return classes.get( classDotName );
	}
	Class clazz = serviceRegistry.getService( ClassLoaderService.class ).classForName( className );
	DotName superName = null;
	DotName[] interfaces = null;
	short access_flag;
	ClassInfo annClassInfo = index.getClassByName( classDotName );
	if ( annClassInfo != null ) {
		superName = annClassInfo.superName();
		interfaces = annClassInfo.interfaces();
		access_flag = annClassInfo.flags();
	}
	else {
		Class superClass = clazz.getSuperclass();
		if ( superClass != null ) {
			superName = DotName.createSimple( superClass.getName() );
		}
		Class[] classInterfaces = clazz.getInterfaces();
		if ( classInterfaces != null && classInterfaces.length > 0 ) {
			interfaces = new DotName[classInterfaces.length];
			for ( int i = 0; i < classInterfaces.length; i++ ) {
				interfaces[i] = DotName.createSimple( classInterfaces[i].getName() );
			}
		}
		access_flag = (short) ( clazz.getModifiers() | 0x20 );//(modifiers | ACC_SUPER)
	}
	Map<DotName, List<AnnotationInstance>> map = new HashMap<DotName, List<AnnotationInstance>>();
	classInfoAnnotationsMap.put( classDotName, map );
	ClassInfo classInfo = ClassInfo.create(
			classDotName, superName, access_flag, interfaces, map
	);
	classes.put( classDotName, classInfo );
	addSubClasses( superName, classInfo );
	addImplementors( interfaces, classInfo );
	return classInfo;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:44,代码来源:IndexBuilder.java


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