本文整理汇总了Java中com.intellij.psi.impl.light.LightParameterListBuilder类的典型用法代码示例。如果您正苦于以下问题:Java LightParameterListBuilder类的具体用法?Java LightParameterListBuilder怎么用?Java LightParameterListBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LightParameterListBuilder类属于com.intellij.psi.impl.light包,在下文中一共展示了LightParameterListBuilder类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ManLightMethodBuilderImpl
import com.intellij.psi.impl.light.LightParameterListBuilder; //导入依赖的package包/类
public ManLightMethodBuilderImpl( PsiManager manager, String name )
{
super( manager, JavaLanguage.INSTANCE, name,
new LightParameterListBuilder( manager, JavaLanguage.INSTANCE ), new ManLightModifierListImpl( manager, JavaLanguage.INSTANCE ) );
_nameIdentifier = new LightIdentifier( manager, name );
}
示例2: GrAccessorMethodImpl
import com.intellij.psi.impl.light.LightParameterListBuilder; //导入依赖的package包/类
public GrAccessorMethodImpl(@NotNull GrField property, boolean isSetter, String name) {
super(property.getManager(), GroovyLanguage.INSTANCE, name,
new LightParameterListBuilder(property.getManager(), GroovyLanguage.INSTANCE),
new LightModifierList(property.getManager()) {
@Override
public String getText() {
final String[] modifiers = getModifiers();
if (modifiers.length == 0) return "";
if (modifiers.length == 1) return modifiers[0];
return StringUtil.join(modifiers, " ");
}
});
myProperty = property;
myIsSetter = isSetter;
if (myIsSetter) {
PsiType type = myProperty.getDeclaredType();
if (type == null) {
type = TypesUtil.getJavaLangObject(myProperty);
}
addParameter(myProperty.getName(), type);
}
setMethodReturnType(myIsSetter ? PsiType.VOID : myProperty.getType());
addModifier(PsiModifier.PUBLIC);
if (myProperty.hasModifierProperty(PsiModifier.STATIC)) {
addModifier(PsiModifier.STATIC);
}
else if (myProperty.hasModifierProperty(PsiModifier.FINAL)) { //don't add final modifier to static method
addModifier(PsiModifier.FINAL);
}
if (GrTraitUtil.isTrait(property.getContainingClass())) {
addModifier(PsiModifier.ABSTRACT);
}
setNavigationElement(property);
setBaseIcon(JetgroovyIcons.Groovy.Property);
setContainingClass(myProperty.getContainingClass());
setMethodKind("AccessorMethod");
setOriginInfo("synthetic accessor for '"+myProperty.getName()+"'");
}
示例3: GrAccessorMethodImpl
import com.intellij.psi.impl.light.LightParameterListBuilder; //导入依赖的package包/类
public GrAccessorMethodImpl(@NotNull GrField property, boolean isSetter, String name) {
super(property.getManager(), GroovyFileType.GROOVY_LANGUAGE, name,
new LightParameterListBuilder(property.getManager(), GroovyFileType.GROOVY_LANGUAGE),
new LightModifierList(property.getManager()) {
@Override
public String getText() {
final String[] modifiers = getModifiers();
if (modifiers.length == 0) return "";
if (modifiers.length == 1) return modifiers[0];
return StringUtil.join(modifiers, " ");
}
});
myProperty = property;
myIsSetter = isSetter;
if (myIsSetter) {
PsiType type = myProperty.getDeclaredType();
if (type == null) {
type = TypesUtil.getJavaLangObject(myProperty);
}
addParameter(myProperty.getName(), type);
}
setMethodReturnType(myIsSetter ? PsiType.VOID : myProperty.getType());
addModifier(PsiModifier.PUBLIC);
if (myProperty.hasModifierProperty(PsiModifier.STATIC)) {
addModifier(PsiModifier.STATIC);
}
else if (myProperty.hasModifierProperty(PsiModifier.FINAL)) { //don't add final modifier to static method
addModifier(PsiModifier.FINAL);
}
setNavigationElement(property);
setBaseIcon(JetgroovyIcons.Groovy.Property);
setContainingClass(myProperty.getContainingClass());
setMethodKind("AccessorMethod");
setOriginInfo("synthetic accessor for '"+myProperty.getName()+"'");
}
示例4: getParameterList
import com.intellij.psi.impl.light.LightParameterListBuilder; //导入依赖的package包/类
@NotNull
@Override
public PsiParameterList getParameterList()
{
return new LightParameterListBuilder(PsiManager.getInstance(getProject()), getLanguage());
}