mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
[java] Less raw types
GitOrigin-RevId: 0bb21ea1ab22c45d79e74e8c839c6b8495a9036a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
aee119040c
commit
33a3a3d3d9
@@ -12,7 +12,7 @@ import com.intellij.psi.javadoc.PsiDocComment;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class ClsMemberImpl<T extends PsiMemberStub> extends ClsRepositoryPsiElement<T> implements PsiDocCommentOwner, PsiNameIdentifierOwner {
|
||||
public abstract class ClsMemberImpl<T extends PsiMemberStub<?>> extends ClsRepositoryPsiElement<T> implements PsiDocCommentOwner, PsiNameIdentifierOwner {
|
||||
private final NotNullLazyValue<PsiDocComment> myDocComment;
|
||||
private final NotNullLazyValue<PsiIdentifier> myNameIdentifier;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class ClsRepositoryPsiElement<T extends StubElement> extends ClsElementImpl implements StubBasedPsiElement<T> {
|
||||
public abstract class ClsRepositoryPsiElement<T extends StubElement<?>> extends ClsElementImpl implements StubBasedPsiElement<T> {
|
||||
private final T myStub;
|
||||
|
||||
protected ClsRepositoryPsiElement(final T stub) {
|
||||
@@ -50,7 +50,7 @@ public abstract class ClsRepositoryPsiElement<T extends StubElement> extends Cls
|
||||
|
||||
@Override
|
||||
public PsiFile getContainingFile() {
|
||||
StubElement p = myStub;
|
||||
StubElement<?> p = myStub;
|
||||
while (!(p instanceof PsiFileStub)) {
|
||||
p = p.getParentStub();
|
||||
}
|
||||
@@ -70,8 +70,8 @@ public abstract class ClsRepositoryPsiElement<T extends StubElement> extends Cls
|
||||
|
||||
@Override
|
||||
public PsiElement @NotNull [] getChildren() {
|
||||
@SuppressWarnings("unchecked") List<StubElement> stubs = getStub().getChildrenStubs();
|
||||
if (stubs.size() == 0) return EMPTY_ARRAY;
|
||||
List<StubElement<?>> stubs = getStub().getChildrenStubs();
|
||||
if (stubs.isEmpty()) return EMPTY_ARRAY;
|
||||
PsiElement[] children = new PsiElement[stubs.size()];
|
||||
for (int i = 0; i < stubs.size(); i++) {
|
||||
children[i] = stubs.get(i).getPsi();
|
||||
@@ -81,13 +81,13 @@ public abstract class ClsRepositoryPsiElement<T extends StubElement> extends Cls
|
||||
|
||||
@Override
|
||||
public PsiElement getFirstChild() {
|
||||
@SuppressWarnings("unchecked") List<StubElement> children = getStub().getChildrenStubs();
|
||||
List<StubElement<?>> children = getStub().getChildrenStubs();
|
||||
return children.isEmpty() ? null : children.get(0).getPsi();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement getLastChild() {
|
||||
@SuppressWarnings("unchecked") List<StubElement> children = getStub().getChildrenStubs();
|
||||
List<StubElement<?>> children = getStub().getChildrenStubs();
|
||||
return children.isEmpty() ? null : children.get(children.size() - 1).getPsi();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user