int (@NotNull ASTNode child) { LOG.assertTrue(child.getTreeParent() == this); IElementType i = child.getElementType(); if (i == JavaElementType.JAVA_CODE_REFERENCE) { return getChildRole(child, ChildRole.BASE_CLASS_REFERENCE); } else if (i == JavaElementType.EXPRESSION_LIST) { return ChildRole.ARGUMENT_LIST; } else if (i == JavaElementType.FIELD) { return ChildRole.FIELD; } else if (i == JavaElementType.METHOD) { return ChildRole.METHOD; } else if (i == JavaElementType.CLASS_INITIALIZER) { return ChildRole.CLASS_INITIALIZER; } else if (i == JavaElementType.CLASS) { return ChildRole.CLASS; } else if (i == JavaTokenType.LBRACE) { return getChildRole(child, ChildRole.LBRACE); } else if (i == JavaTokenType.RBRACE) { return getChildRole(child, ChildRole.RBRACE); } else if (i == JavaTokenType.COMMA) { return ChildRole.COMMA; } else { return ChildRoleBase.NONE; } }