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


Java TypeSignature类代码示例

本文整理汇总了Java中consulo.internal.dotnet.asm.signature.TypeSignature的典型用法代码示例。如果您正苦于以下问题:Java TypeSignature类的具体用法?Java TypeSignature怎么用?Java TypeSignature使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TypeSignature类属于consulo.internal.dotnet.asm.signature包,在下文中一共展示了TypeSignature类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildParameters

import consulo.internal.dotnet.asm.signature.TypeSignature; //导入依赖的package包/类
public static void buildParameters(@NotNull StringBuilder builder,
		@NotNull final List<ParameterSignature> parameters,
		@Nullable final TypeDef typeDef,
		final boolean appendName)
{
	builder.append("(");

	join(builder, parameters, (builder1, parameterSignature) ->
	{
		ParameterInfo parameterInfo = parameterSignature.getParameterInfo();
		if(parameterInfo != null)
		{
			if(BitUtil.isSet(parameterInfo.getFlags(), ParamAttributes.HasDefault))
			{
				builder1.append("[opt] ");
			}

			if(BitUtil.isSet(parameterInfo.getFlags(), ParamAttributes.In))
			{
				builder1.append("[in] ");
			}

			if(BitUtil.isSet(parameterInfo.getFlags(), ParamAttributes.Out))
			{
				builder1.append("[out] ");
			}
		}

		TypeSignature typeSignature = parameterSignature;
		if(parameterSignature.getType() == ELEMENT_TYPE_TYPEONLY)
		{
			typeSignature = parameterSignature.getInnerType();
		}

		typeToString(builder1, typeSignature, typeDef);

		if(appendName && parameterInfo != null)
		{
			builder1.append(" ");
			appendValidName(builder1, parameterInfo.getName());
		}
		return null;
	}, ", ");
	builder.append(")");
}
 
开发者ID:consulo,项目名称:dotnet-msil-decompiler,代码行数:46,代码来源:MsilMethodBuilder.java

示例2: isAllowedAssembly

import consulo.internal.dotnet.asm.signature.TypeSignature; //导入依赖的package包/类
@RequiredReadAction
@Override
public boolean isAllowedAssembly(@NotNull String assemblyName)
{
	VirtualFile archiveRootForLocalFile = ArchiveVfsUtil.getArchiveRootForLocalFile(myModuleFile);
	if(archiveRootForLocalFile == null)
	{
		return false;
	}

	VirtualFile assemblyFile = archiveRootForLocalFile.findChild("AssemblyInfo.msil");
	if(assemblyFile == null)
	{
		return false;
	}
	PsiFileImpl file = (PsiFileImpl) PsiManager.getInstance(myProject).findFile(assemblyFile);
	if(!(file instanceof MsilFile))
	{
		return false;
	}

	for(PsiElement psiElement : ((MsilFile) file).getMembers())
	{
		if(psiElement instanceof MsilAssemblyEntry)
		{
			MsilAssemblyEntry assemblyEntry = (MsilAssemblyEntry) psiElement;

			MsilCustomAttribute[] attributes = assemblyEntry.getAttributes();
			for(MsilCustomAttribute attribute : attributes)
			{
				if(DotNetTypeRefUtil.isVmQNameEqual(attribute.toTypeRef(), attribute, DotNetTypes2.System.Runtime.CompilerServices.InternalsVisibleToAttribute))
				{
					MsilCustomAttributeArgumentList argumentList = MsilCustomAttributeStubber.build(attribute);
					List<MsiCustomAttributeValue> constructorArguments = argumentList.getConstructorArguments();
					if(constructorArguments.size() != 1)
					{
						continue;
					}

					MsiCustomAttributeValue msiCustomAttributeValue = constructorArguments.get(0);
					if(msiCustomAttributeValue.getTypeSignature() == TypeSignature.STRING && Comparing.equal(msiCustomAttributeValue.getValue(), assemblyName))
					{
						return true;
					}
				}
			}
		}
	}
	return false;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:51,代码来源:DotNetModuleAsAssemblyModule.java

示例3: MsiCustomAttributeValue

import consulo.internal.dotnet.asm.signature.TypeSignature; //导入依赖的package包/类
public MsiCustomAttributeValue(TypeSignature typeSignature, Object value)
{
	myTypeSignature = typeSignature;
	myValue = value;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:6,代码来源:MsiCustomAttributeValue.java

示例4: getTypeSignature

import consulo.internal.dotnet.asm.signature.TypeSignature; //导入依赖的package包/类
public TypeSignature getTypeSignature()
{
	return myTypeSignature;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:5,代码来源:MsiCustomAttributeValue.java

示例5: MsilCustomAttributeEnumValue

import consulo.internal.dotnet.asm.signature.TypeSignature; //导入依赖的package包/类
public MsilCustomAttributeEnumValue(TypeSignature typeSignature, Number value, List<String> values)
{
	super(typeSignature, value);
	myValues = values;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:6,代码来源:MsilCustomAttributeEnumValue.java


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