當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。