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; } } }; }
@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; }
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; } } }; }
@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; }
public PsiReferenceListImpl(PsiClassReferenceListStub stub, IStubElementType nodeType) { super(stub, nodeType); }
public PsiReferenceListImpl(@NotNull PsiClassReferenceListStub stub) { super(stub, stub.getStubType()); }