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


Java NullableLazyValue.of方法代码示例

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


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

示例1: MsilPropertyAsCSharpPropertyDeclaration

import com.intellij.openapi.util.NullableLazyValue; //导入方法依赖的package包/类
@RequiredReadAction
public MsilPropertyAsCSharpPropertyDeclaration(PsiElement parent, MsilPropertyEntry variable, List<Pair<DotNetXXXAccessor, MsilMethodEntry>> pairs)
{
	super(parent, getAdditionalModifiers(variable, pairs), variable);
	myAccessors = buildAccessors(this, pairs);

	myTypeForImplementValue = NullableLazyValue.of(() ->
	{
		String nameFromBytecode = getVariable().getNameFromBytecode();
		String typeBeforeDot = StringUtil.getPackageName(nameFromBytecode);
		SomeType someType = SomeTypeParser.parseType(typeBeforeDot, nameFromBytecode);
		if(someType != null)
		{
			return new DummyType(getProject(), MsilPropertyAsCSharpPropertyDeclaration.this, someType);
		}
		return null;
	});
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:19,代码来源:MsilPropertyAsCSharpPropertyDeclaration.java

示例2: MsilEventAsCSharpEventDeclaration

import com.intellij.openapi.util.NullableLazyValue; //导入方法依赖的package包/类
@RequiredReadAction
public MsilEventAsCSharpEventDeclaration(PsiElement parent, MsilEventEntry variable, List<Pair<DotNetXXXAccessor, MsilMethodEntry>> pairs)
{
	super(parent, MsilPropertyAsCSharpPropertyDeclaration.getAdditionalModifiers(variable, pairs), variable);
	myAccessors = MsilPropertyAsCSharpPropertyDeclaration.buildAccessors(this, pairs);

	myTypeForImplementValue = NullableLazyValue.of(() ->
	{
		String nameFromBytecode = getVariable().getNameFromBytecode();
		String typeBeforeDot = StringUtil.getPackageName(nameFromBytecode);
		SomeType someType = SomeTypeParser.parseType(typeBeforeDot, nameFromBytecode);
		if(someType != null)
		{
			return new DummyType(getProject(), MsilEventAsCSharpEventDeclaration.this, someType);
		}
		return null;
	});
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:19,代码来源:MsilEventAsCSharpEventDeclaration.java

示例3: MsilMethodAsCSharpMethodDeclaration

import com.intellij.openapi.util.NullableLazyValue; //导入方法依赖的package包/类
@RequiredReadAction
public MsilMethodAsCSharpMethodDeclaration(PsiElement parent, @Nullable MsilClassEntry declaration, @NotNull GenericParameterContext genericParameterContext, @NotNull MsilMethodEntry methodEntry)
{
	super(parent, CSharpModifier.EMPTY_ARRAY, methodEntry);
	myDelegate = declaration;

	setGenericParameterList(declaration != null ? declaration : methodEntry, genericParameterContext);

	myTypeForImplementValue = NullableLazyValue.of(() ->
	{
		String nameFromBytecode = myOriginal.getNameFromBytecode();
		String typeBeforeDot = StringUtil.getPackageName(nameFromBytecode);
		SomeType someType = SomeTypeParser.parseType(typeBeforeDot, nameFromBytecode);
		if(someType != null)
		{
			return new DummyType(getProject(), MsilMethodAsCSharpMethodDeclaration.this, someType);
		}
		return null;
	});
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:21,代码来源:MsilMethodAsCSharpMethodDeclaration.java

示例4: MsilModifierListToCSharpModifierList

import com.intellij.openapi.util.NullableLazyValue; //导入方法依赖的package包/类
@RequiredReadAction
public MsilModifierListToCSharpModifierList(@NotNull CSharpModifier[] additional, @NotNull PsiElement parent, @NotNull DotNetModifierList modifierList)
{
	super(parent, modifierList);
	myAdditional = additional;
	myModifierList = modifierList;

	if(myModifierList.hasModifier(MsilTokens.SERIALIZABLE_KEYWORD))
	{
		addAdditionalAttribute(new CSharpLightAttributeBuilder(myModifierList, DotNetTypes.System.Serializable));
	}

	if(myModifierList.hasModifier(MsilTokens.BRACKET_OUT_KEYWORD))
	{
		addAdditionalAttribute(new CSharpLightAttributeBuilder(myModifierList, DotNetTypes2.System.Runtime.InteropServices.OutAttribute));
	}

	if(myModifierList.hasModifier(MsilTokens.BRACKET_IN_KEYWORD))
	{
		addAdditionalAttribute(new CSharpLightAttributeBuilder(myModifierList, DotNetTypes2.System.Runtime.InteropServices.InAttribute));
	}

	myAttributeHolderValue = NullableLazyValue.of(() -> ExternalAttributesUtil.findHolder(myModifierList));
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:25,代码来源:MsilModifierListToCSharpModifierList.java

示例5: EvaluationContextImpl

import com.intellij.openapi.util.NullableLazyValue; //导入方法依赖的package包/类
public EvaluationContextImpl(@NotNull SuspendContextImpl suspendContext, @NotNull StackFrameProxyImpl frameProxy)
{
	myThisObject = NullableLazyValue.of(() ->
	{
		try
		{
			return frameProxy.thisObject();
		}
		catch(EvaluateException ignore)
		{
		}
		return null;
	});
	myFrameProxy = frameProxy;
	mySuspendContext = suspendContext;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:17,代码来源:EvaluationContextImpl.java

示例6: MsilPropertyAsCSharpIndexMethodDeclaration

import com.intellij.openapi.util.NullableLazyValue; //导入方法依赖的package包/类
@RequiredReadAction
public MsilPropertyAsCSharpIndexMethodDeclaration(PsiElement parent, MsilPropertyEntry propertyEntry, List<Pair<DotNetXXXAccessor, MsilMethodEntry>> pairs)
{
	super(parent, propertyEntry);

	myAccessors = MsilPropertyAsCSharpPropertyDeclaration.buildAccessors(this, pairs);
	myModifierList = new MsilModifierListToCSharpModifierList(MsilPropertyAsCSharpPropertyDeclaration.getAdditionalModifiers(propertyEntry, pairs), this, propertyEntry.getModifierList());

	String name = getName();
	if(!Comparing.equal(name, DotNetPropertyDeclaration.DEFAULT_INDEX_PROPERTY_NAME))
	{
		CSharpLightAttributeBuilder attribute = new CSharpLightAttributeBuilder(propertyEntry, DotNetTypes.System.Runtime.CompilerServices.IndexerName);

		attribute.addParameterExpression(name);

		myModifierList.addAdditionalAttribute(attribute);
	}
	Pair<DotNetXXXAccessor, MsilMethodEntry> p = pairs.get(0);

	DotNetParameter firstParameter = p.getSecond().getParameters()[0];
	myParameters = new DotNetParameter[]{new MsilParameterAsCSharpParameter(this, firstParameter, this, 0)};

	myTypeForImplementValue = NullableLazyValue.of(() ->
	{
		String nameFromBytecode = myOriginal.getNameFromBytecode();
		String typeBeforeDot = StringUtil.getPackageName(nameFromBytecode);
		SomeType someType = SomeTypeParser.parseType(typeBeforeDot, nameFromBytecode);
		if(someType != null)
		{
			return new DummyType(getProject(), MsilPropertyAsCSharpIndexMethodDeclaration.this, someType);
		}
		return null;
	});

	myReturnTypeRefValue = NotNullLazyValue.createValue(() -> MsilToCSharpUtil.extractToCSharp(myOriginal.toTypeRef(false), myOriginal));
	myParameterTypeRefsValue = NotNullLazyValue.createValue(() ->
	{
		DotNetParameter[] parameters = getParameters();
		DotNetTypeRef[] typeRefs = new DotNetTypeRef[parameters.length];
		for(int i = 0; i < parameters.length; i++)
		{
			DotNetParameter parameter = parameters[i];
			typeRefs[i] = parameter.toTypeRef(false);
		}
		return typeRefs;
	});
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:48,代码来源:MsilPropertyAsCSharpIndexMethodDeclaration.java


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