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

项目:intellij-ce-playground    文件:ClsReferenceListImpl.java   
public ClsReferenceListImpl(@NotNull PsiClassReferenceListStub stub) {
  super(stub);
  myRefs = new AtomicNotNullLazyValue<ClsJavaCodeReferenceElementImpl[]>() {
    @NotNull
    @Override
    protected ClsJavaCodeReferenceElementImpl[] compute() {
      String[] strings = getStub().getReferencedNames();
      if (strings.length > 0) {
        ClsJavaCodeReferenceElementImpl[] refs = new ClsJavaCodeReferenceElementImpl[strings.length];
        for (int i = 0; i < strings.length; i++) {
          refs[i] = new ClsJavaCodeReferenceElementImpl(ClsReferenceListImpl.this, strings[i]);
        }
        return refs;
      }
      else {
        return EMPTY_REFS_ARRAY;
      }
    }
  };
}
项目:intellij-ce-playground    文件:PsiReferenceListImpl.java   
@Override
@NotNull
public PsiClassType[] getReferencedTypes() {
  PsiClassReferenceListStub stub = getStub();
  if (stub != null) {
    return stub.getReferencedTypes();
  }

  PsiJavaCodeReferenceElement[] refs = getReferenceElements();
  PsiElementFactory factory = JavaPsiFacade.getInstance(getProject()).getElementFactory();
  PsiClassType[] types = new PsiClassType[refs.length];
  for (int i = 0; i < types.length; i++) {
    types[i] = factory.createType(refs[i]);
  }

  return types;
}
项目:tools-idea    文件:ClsReferenceListImpl.java   
public ClsReferenceListImpl(@NotNull PsiClassReferenceListStub stub) {
  super(stub);
  myRefs = new AtomicNotNullLazyValue<ClsJavaCodeReferenceElementImpl[]>() {
    @NotNull
    @Override
    protected ClsJavaCodeReferenceElementImpl[] compute() {
      String[] strings = getStub().getReferencedNames();
      if (strings.length > 0) {
        ClsJavaCodeReferenceElementImpl[] refs = new ClsJavaCodeReferenceElementImpl[strings.length];
        for (int i = 0; i < strings.length; i++) {
          refs[i] = new ClsJavaCodeReferenceElementImpl(ClsReferenceListImpl.this, strings[i]);
        }
        return refs;
      }
      else {
        return EMPTY_REFS_ARRAY;
      }
    }
  };
}
项目:tools-idea    文件:PsiReferenceListImpl.java   
@Override
@NotNull
public PsiClassType[] getReferencedTypes() {
  PsiClassReferenceListStub stub = getStub();
  if (stub != null) {
    return stub.getReferencedTypes();
  }

  PsiJavaCodeReferenceElement[] refs = getReferenceElements();
  PsiElementFactory factory = JavaPsiFacade.getInstance(getProject()).getElementFactory();
  PsiClassType[] types = new PsiClassType[refs.length];
  for (int i = 0; i < types.length; i++) {
    types[i] = factory.createType(refs[i]);
  }

  return types;
}
项目:consulo-java    文件:ClsReferenceListImpl.java   
public ClsReferenceListImpl(@NotNull PsiClassReferenceListStub stub)
{
    super(stub);
    myRefs = new AtomicNotNullLazyValue<ClsJavaCodeReferenceElementImpl[]>()
    {
        @NotNull
        @Override
        protected ClsJavaCodeReferenceElementImpl[] compute()
        {
            String[] strings = getStub().getReferencedNames();
            if(strings.length > 0)
            {
                ClsJavaCodeReferenceElementImpl[] refs = new ClsJavaCodeReferenceElementImpl[strings.length];
                for(int i = 0; i < strings.length; i++)
                {
                    refs[i] = new ClsJavaCodeReferenceElementImpl(ClsReferenceListImpl.this, strings[i]);
                }
                return refs;
            }
            else
            {
                return EMPTY_REFS_ARRAY;
            }
        }
    };
}
项目:consulo-java    文件:PsiReferenceListImpl.java   
@Override
@NotNull
public PsiClassType[] getReferencedTypes()
{
    PsiClassReferenceListStub stub = getGreenStub();
    if(stub != null)
    {
        return stub.getReferencedTypes();
    }

    PsiJavaCodeReferenceElement[] refs = getReferenceElements();
    PsiElementFactory factory = JavaPsiFacade.getInstance(getProject()).getElementFactory();
    PsiClassType[] types = new PsiClassType[refs.length];
    for(int i = 0; i < types.length; i++)
    {
        types[i] = factory.createType(refs[i]);
    }

    return types;
}
项目:intellij-ce-playground    文件:PsiReferenceListImpl.java   
public PsiReferenceListImpl(PsiClassReferenceListStub stub, IStubElementType nodeType) {
  super(stub, nodeType);
}
项目:tools-idea    文件:PsiReferenceListImpl.java   
public PsiReferenceListImpl(PsiClassReferenceListStub stub, IStubElementType nodeType) {
  super(stub, nodeType);
}
项目:consulo-java    文件:PsiReferenceListImpl.java   
public PsiReferenceListImpl(@NotNull PsiClassReferenceListStub stub)
{
    super(stub, stub.getStubType());
}