Java: introduce PsiArrayInitializerMemberValue.getInitializerCount() (IJ-CR-176760)

GitOrigin-RevId: d2cd802dbb3edff7218517221db96b39840e720a
This commit is contained in:
Bas Leijdekkers
2025-09-26 14:02:14 +00:00
committed by intellij-monorepo-bot
parent f3f0542bd9
commit ff4d693212
7 changed files with 51 additions and 23 deletions
@@ -21,6 +21,16 @@ public class PsiArrayInitializerMemberValueImpl extends CompositePsiElement impl
return getChildrenAsPsiElements(ElementType.ANNOTATION_MEMBER_VALUE_BIT_SET, PsiAnnotationMemberValue.ARRAY_FACTORY);
}
@Override
public int getInitializerCount() {
return countChildren(ElementType.ANNOTATION_MEMBER_VALUE_BIT_SET);
}
@Override
public boolean isEmpty() {
return findChildByType(ElementType.ANNOTATION_MEMBER_VALUE_BIT_SET) == null;
}
@Override
public ASTNode findChildByRole(int role) {
LOG.assertTrue(ChildRole.isUnique(role));