int (@NotNull ASTNode child) { assert child.getTreeParent() == this; IElementType i = child.getElementType(); if (i == SEMICOLON) { if (!isEnum()) return ChildRoleBase.NONE; if (child == findEnumConstantListDelimiter()) { return ChildRole.ENUM_CONSTANT_LIST_DELIMITER; } else { return ChildRoleBase.NONE; } } else if (i == CLASS) { return ChildRole.CLASS; } else if (i == FIELD) { return ChildRole.FIELD; } else if (i == METHOD || i == ANNOTATION_METHOD) { return ChildRole.METHOD; } else if (i == CLASS_INITIALIZER) { return ChildRole.CLASS_INITIALIZER; } else if (i == TYPE_PARAMETER_LIST) { return ChildRole.TYPE_PARAMETER_LIST; } else if (i == JavaDocElementType.DOC_COMMENT) { return getChildRole(child, ChildRole.DOC_COMMENT); } else if (ElementType.JAVA_PLAIN_COMMENT_BIT_SET.contains(i)) { return ChildRoleBase.NONE; } else if (i == MODIFIER_LIST) { return ChildRole.MODIFIER_LIST; } else if (i == EXTENDS_LIST) { return ChildRole.EXTENDS_LIST; } else if (i == IMPLEMENTS_LIST) { return ChildRole.IMPLEMENTS_LIST; } else if (i == PERMITS_LIST) { return ChildRole.PERMITS_LIST; } else if (ElementType.CLASS_KEYWORD_BIT_SET.contains(i)) { return getChildRole(child, ChildRole.CLASS_OR_INTERFACE_KEYWORD); } else if (i == IDENTIFIER) { return getChildRole(child, ChildRole.NAME); } else if (i == LBRACE) { return getChildRole(child, ChildRole.LBRACE); } else if (i == RBRACE) { return getChildRole(child, ChildRole.RBRACE); } else if (i == COMMA) { return ChildRole.COMMA; } else if (i == AT) { return ChildRole.AT; } else { return ChildRoleBase.NONE; } }