Java 类com.intellij.psi.impl.java.stubs.PsiParameterStub 实例源码

项目:consulo-java    文件:ClsParameterImpl.java   
public ClsParameterImpl(@NotNull PsiParameterStub stub)
{
    super(stub);
    myType = new AtomicNotNullLazyValue<PsiTypeElement>()
    {
        @NotNull
        @Override
        protected PsiTypeElement compute()
        {
            PsiParameterStub stub = getStub();
            String typeText = TypeInfo.createTypeText(stub.getType(false));
            assert typeText != null : stub;
            return new ClsTypeElementImpl(ClsParameterImpl.this, typeText, ClsTypeElementImpl.VARIANCE_NONE);
        }
    };
}
项目:intellij-ce-playground    文件:PsiParameterStubImpl.java   
public boolean isAutoGeneratedName() {
  final List children = getParentStub().getChildrenStubs();
  int paramIndex = 0;
  for (Object o : children) {
    if (o instanceof PsiParameterStub) {
      paramIndex++;
      if (o == this) break;
    }
  }
  return ("p" + paramIndex).equals(getName());
}
项目:intellij-ce-playground    文件:ClsParameterImpl.java   
public ClsParameterImpl(@NotNull PsiParameterStub stub) {
  super(stub);
  myType = new AtomicNotNullLazyValue<PsiTypeElement>() {
    @NotNull
    @Override
    protected PsiTypeElement compute() {
      PsiParameterStub stub = getStub();
      String typeText = TypeInfo.createTypeText(stub.getType(false));
      assert typeText != null : stub;
      return new ClsTypeElementImpl(ClsParameterImpl.this, typeText, ClsTypeElementImpl.VARIANCE_NONE);
    }
  };
}
项目:intellij-ce-playground    文件:PsiParameterImpl.java   
@Override
@NotNull
public final String getName() {
  PsiParameterStub stub = getStub();
  if (stub != null) {
    return stub.getName();
  }

  return getNameIdentifier().getText();
}
项目:intellij-ce-playground    文件:PsiParameterImpl.java   
@Override
public boolean isVarArgs() {
  final PsiParameterStub stub = getStub();
  if (stub != null) {
    return stub.isParameterTypeEllipsis();
  }

  myCachedType = null;
  final PsiTypeElement typeElement = getTypeElement();
  return typeElement != null && SourceTreeToPsiMap.psiToTreeNotNull(typeElement).findChildByType(JavaTokenType.ELLIPSIS) != null;
}
项目:tools-idea    文件:PsiParameterStubImpl.java   
public boolean isAutoGeneratedName() {
  final List children = getParentStub().getChildrenStubs();
  int paramIndex = 0;
  for (Object o : children) {
    if (o instanceof PsiParameterStub) {
      paramIndex++;
      if (o == this) break;
    }
  }
  return ("p" + paramIndex).equals(getName());
}
项目:tools-idea    文件:ClsParameterImpl.java   
public ClsParameterImpl(@NotNull PsiParameterStub stub) {
  super(stub);
  myType = new AtomicNotNullLazyValue<PsiTypeElement>() {
    @NotNull
    @Override
    protected PsiTypeElement compute() {
      PsiParameterStub stub = getStub();
      String typeText = TypeInfo.createTypeText(stub.getType(false));
      assert typeText != null : stub;
      return new ClsTypeElementImpl(ClsParameterImpl.this, typeText, ClsTypeElementImpl.VARIANCE_NONE);
    }
  };
}
项目:tools-idea    文件:PsiParameterImpl.java   
@Override
@NotNull
public final String getName() {
  PsiParameterStub stub = getStub();
  if (stub != null) {
    return stub.getName();
  }

  return getParameterIdentifier().getText();
}
项目:tools-idea    文件:PsiParameterImpl.java   
@Override
public boolean isVarArgs() {
  final PsiParameterStub stub = getStub();
  if (stub != null) {
    return stub.isParameterTypeEllipsis();
  }

  myCachedType = null;
  final PsiTypeElement typeElement = getTypeElement();
  return typeElement != null && SourceTreeToPsiMap.psiToTreeNotNull(typeElement).findChildByType(JavaTokenType.ELLIPSIS) != null;
}
项目:consulo-java    文件:PsiParameterImpl.java   
@Override
@NotNull
public final String getName()
{
    PsiParameterStub stub = getStub();
    if(stub != null)
    {
        return stub.getName();
    }

    return getNameIdentifier().getText();
}
项目:consulo-java    文件:PsiParameterImpl.java   
@Override
public boolean isVarArgs()
{
    final PsiParameterStub stub = getStub();
    if(stub != null)
    {
        return stub.isParameterTypeEllipsis();
    }

    myCachedType = null;
    final PsiTypeElement typeElement = getTypeElement();
    return typeElement != null && SourceTreeToPsiMap.psiToTreeNotNull(typeElement).findChildByType(JavaTokenType
            .ELLIPSIS) != null;
}
项目:intellij-ce-playground    文件:ClsParameterImpl.java   
private int getIndex() {
  final PsiParameterStub stub = getStub();
  return stub.getParentStub().getChildrenStubs().indexOf(stub);
}
项目:intellij-ce-playground    文件:PsiParameterImpl.java   
public PsiParameterImpl(@NotNull PsiParameterStub stub) {
  this(stub, JavaStubElementTypes.PARAMETER);
}
项目:intellij-ce-playground    文件:PsiParameterImpl.java   
protected PsiParameterImpl(@NotNull PsiParameterStub stub, @NotNull IStubElementType type) {
  super(stub, type);
}
项目:tools-idea    文件:ClsParameterImpl.java   
private int getIndex() {
  final PsiParameterStub stub = getStub();
  return stub.getParentStub().getChildrenStubs().indexOf(stub);
}
项目:tools-idea    文件:PsiReceiverParameterImpl.java   
public PsiReceiverParameterImpl(@NotNull PsiParameterStub stub) {
  super(stub, JavaStubElementTypes.RECEIVER_PARAMETER);
}
项目:tools-idea    文件:PsiParameterImpl.java   
public PsiParameterImpl(@NotNull PsiParameterStub stub) {
  this(stub, JavaStubElementTypes.PARAMETER);
}
项目:tools-idea    文件:PsiParameterImpl.java   
protected PsiParameterImpl(@NotNull PsiParameterStub stub, @NotNull IStubElementType type) {
  super(stub, type);
}
项目:consulo-java    文件:ClsParameterImpl.java   
private int getIndex()
{
    final PsiParameterStub stub = getStub();
    return stub.getParentStub().getChildrenStubs().indexOf(stub);
}
项目:consulo-java    文件:PsiParameterImpl.java   
public PsiParameterImpl(@NotNull PsiParameterStub stub)
{
    this(stub, JavaStubElementTypes.PARAMETER);
}
项目:consulo-java    文件:PsiParameterImpl.java   
protected PsiParameterImpl(@NotNull PsiParameterStub stub, @NotNull IStubElementType type)
{
    super(stub, type);
}